Changeset 123

Show
Ignore:
Timestamp:
12/09/06 09:56:37 (7 years ago)
Author:
dez
Message:

Fixes Invalid IP issue for proxy-hopping (NTL) users

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lib/session.php

    r119 r123  
    110110                $this->datahash = md5(serialize($this->data)); 
    111111 
     112 
    112113                // are we actually logged in, fill in more 
    113114                if ($detail['username']) { 
     115                        // Are we using HTTPS? 
     116                        if (!isset($_SERVER['HTTPS'])) { 
     117                                $this->errormsg = "Not using HTTPS"; 
     118                                $this->loggedin = FALSE; 
     119                                return; 
     120                        } 
     121                        // User is valid but they're coming from the wrong IP 
     122                        if ($detail['ip'] != $_SERVER['REMOTE_ADDR']) { 
     123                                $this->errormsg = "Invalid IP"; 
     124                                $this->loggedin = FALSE; 
     125                                return; 
     126                        } 
    114127                        $this->username=$detail['username']; 
    115128                        $this->fetch_detail($detail['username']); 
     
    119132                // update time stamp 
    120133                $DB->Execute( "update {$this->table} set time=NOW() where hash=?", array($this->token)); 
    121  
    122                 // User is valid but something is fishy 
    123                 if ($detail['ip'] != $_SERVER['REMOTE_ADDR']) { 
    124                         $this->errormsg = "Invalid IP"; 
    125                         $this->loggedin = FALSE; 
    126                         return; 
    127                 } 
    128134        } 
    129135 
  • static/Community.txt

    r122 r123  
    1 <p>What are we going to put on this page then?</p><p>I don&#39;t know, but this paragraph was added using the editor :-)&nbsp;</p> 
     1<p>What are we going to put on this page then?</p><p>I don&#39;t know, but this paragraph was added using the editor :-)&nbsp;</p><p>And this one was added without logging in! Egads, it's a wiki!</p>