Changeset 5228a55 in github for program/include/rcube_session.php


Ignore:
Timestamp:
Mar 11, 2011 3:55:20 AM (2 years ago)
Author:
alecpl <alec@…>
Children:
382b8b1
Parents:
2430846
Message:
  • Applied fixes from trunk
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_session.php

    rb46e5b74 r5228a55  
    184184 
    185185 
    186   public function regenerate_id() 
    187   { 
    188     $randval = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 
    189  
    190     for ($random = '', $i=1; $i <= 32; $i++) { 
    191       $random .= substr($randval, mt_rand(0,(strlen($randval) - 1)), 1); 
    192     } 
    193  
    194     // use md5 value for id or remove capitals from string $randval 
    195     $random = md5($random); 
    196  
    197     // delete old session record 
    198     $this->destroy(session_id()); 
    199  
    200     session_id($random); 
    201  
    202     $cookie   = session_get_cookie_params(); 
    203     $lifetime = $cookie['lifetime'] ? time() + $cookie['lifetime'] : 0; 
    204  
    205     rcmail::setcookie(session_name(), $random, $lifetime); 
    206  
     186  public function regenerate_id($destroy=true) 
     187  { 
     188    session_regenerate_id($destroy); 
     189 
     190    $this->vars = false; 
     191    $this->key  = session_id(); 
    207192    return true; 
    208193  } 
Note: See TracChangeset for help on using the changeset viewer.