Changeset 2452 for trunk/modules/auth

Show
Ignore:
Timestamp:
04/08/2008 11:27:44 AM (8 months ago)
Author:
Geert
Message:

It is a good idea to regenerate session identifiers whenever a user's privilege level changes.

Also see: http://shiflett.org/articles/session-fixation

Location:
trunk/modules/auth
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/auth/libraries/Auth.php

    r2441 r2452  
    199199                        // Remove the user object from the session 
    200200                        unset($_SESSION['auth_user']); 
     201 
     202                        // Regenerate session_id 
     203                        $this->session->regenerate(); 
    201204                } 
    202205 
     
    317320                $user->save(); 
    318321 
     322                // Regenerate session_id 
     323                $this->session->regenerate(); 
     324 
    319325                // Store session data 
    320326                $_SESSION['auth_user'] = $user; 
  • trunk/modules/auth/models/user.php

    r2261 r2452  
    2626        public function __set($key, $value) 
    2727        { 
    28                 static $auth; 
    29  
    3028                if ($key === 'password') 
    3129                {