]> git.wh0rd.org Git - tt-rss.git/commitdiff
obsolete ip_address field in ttrss_sessions
authorAndrew Dolgov <fox@madoka.spb.ru>
Mon, 27 Mar 2006 16:23:50 +0000 (17:23 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Mon, 27 Mar 2006 16:23:50 +0000 (17:23 +0100)
functions.php
schema/ttrss_schema_mysql.sql
schema/ttrss_schema_pgsql.sql
sessions.php

index 7415f63e998f177de8cf01fe21ea68ee359f9e40..825b198313d0d5c60c984bd2e18981d2e3a7af74 100644 (file)
        }
 
        function validate_session($link) {
-               if (SESSION_CHECK_ADDRESS && !DATABASE_BACKED_SESSIONS && $_SESSION["uid"]) {
+               if (SESSION_CHECK_ADDRESS && $_SESSION["uid"]) {
                        if ($_SESSION["ip_address"]) {
                                if ($_SESSION["ip_address"] != $_SERVER["REMOTE_ADDR"]) {
                                        return false;
index 7f96362b803406b53ff9278194c508a47acb8374..cb616f33377f1b180a74b32680d593ea33e69377 100644 (file)
@@ -263,7 +263,6 @@ create table ttrss_scheduled_updates (id integer not null primary key auto_incre
 create table ttrss_sessions (id varchar(250) unique not null primary key,
        data text,
        expire integer not null,
-       ip_address varchar(15) not null default '',
        index (id), 
        index (expire)) TYPE=InnoDB;
 
index 82c5506a69df4b9b316fca466ed879d7b29415ce..c9dfe02052ef3d15978df167b574315f3a4d40e6 100644 (file)
@@ -239,8 +239,7 @@ create table ttrss_scheduled_updates (id serial not null primary key,
 
 create table ttrss_sessions (id varchar(250) unique not null primary key,
        data text,      
-       expire integer not null,
-       ip_address varchar(15) not null default '');
+       expire integer not null);
 
 create index ttrss_sessions_expire_index on ttrss_sessions(expire);
 
index 5b4da3a890fda3664cda441cc7c7228b037e1e74..ae7e3ccdb416d733bb6277061239ff3d6571d5e3 100644 (file)
        
                global $session_connection,$session_read;                                        
 
-               $ip_address = $_SERVER["REMOTE_ADDR"];
-
-               if (SESSION_CHECK_ADDRESS) {
-                       $address_check_qpart = " AND ip_address = '$ip_address'";
-               }
-
                $query = "SELECT data FROM ttrss_sessions WHERE id='$id' $address_check_qpart";
 
                $res = db_query($session_connection, $query);
                
                $data = db_escape_string(base64_encode($data), $session_connection);
                
-               $ip_address = $_SERVER["REMOTE_ADDR"];
-
-               if (SESSION_CHECK_ADDRESS) {
-                       $address_check_qpart = " AND ip_address = '$ip_address'";
-               }
-               
                if ($session_read) {
                        $query = "UPDATE ttrss_sessions SET data='$data', 
                                        expire='$expire' WHERE id='$id' $address_check_qpart"; 
                } else {
-                       $query = "INSERT INTO ttrss_sessions (id, data, expire, ip_address)
-                                       VALUES ('$id', '$data', '$expire', '$ip_address')";
+                       $query = "INSERT INTO ttrss_sessions (id, data, expire)
+                                       VALUES ('$id', '$data', '$expire')";
                }
                
                db_query($session_connection, $query);
        
                global $session_connection;
 
-               $ip_address = $_SERVER["REMOTE_ADDR"];
-
-               if (SESSION_CHECK_ADDRESS) {
-                       $address_check_qpart = " AND ip_address = '$ip_address'";
-               }
-
                $query = "DELETE FROM ttrss_sessions WHERE id = '$id' $address_check_qpart";
                
                db_query($session_connection, $query);