Dotclear

Changeset 3110:9f158da42dca


Ignore:
Timestamp:
10/02/15 16:29:18 (10 years ago)
Author:
Dsls
Branch:
2.8
Message:

php 5.5 leaves NULL chars in unpack ==> add trim, fixes #2097

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/auth.php

    r3103 r3110  
    6262     # If we have a remember cookie, go through auth process with user_key 
    6363     $user_id = substr($_COOKIE['dc_admin'],40); 
    64      $user_id = @unpack('a32',@pack('H*',$user_id)); 
     64     $user_id = trim(@unpack('a32',@pack('H*',$user_id))); 
    6565     if (is_array($user_id)) 
    6666     { 
     
    149149          { 
    150150               $user_id = substr($data['cookie_admin'],40); 
    151                $user_id = @unpack('a32',@pack('H*',$user_id)); 
     151               $user_id = trim(@unpack('a32',@pack('H*',$user_id))); 
    152152               if (is_array($user_id)) 
    153153               { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map