Changeset 15110c771604f44d1b149a66b2d4f09f00fb585c

Show
Ignore:
Timestamp:
05/04/09 08:24:31 (3 years ago)
Author:
Neutron Soutmun <neo.neutron@…>
Children:
a68d42f968bde01a20d55ffc7c9cd33656fbb900
Parents:
71de5a9f4a4ecbedfd441ffb2fe546714d77239e
git-committer:
Neutron Soutmun <neo.neutron@…> (05/04/09 08:24:31)
Message:

Adjust the generated session_id

[core]
2009-05-04 Neutron Soutmun <neo.neutron@…>

  • +weblogin/ChangeLog: Fork the changelog for weblogin.

[weblogin]
2009-05-04 Neutron Soutmun <neo.neutron@…>

  • rahu_radius.class.php:
    • Adjust the generated session_id to always be the same string length.
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r71de5a9 r15110c7  
     12009-05-04  Neutron Soutmun <neo.neutron@gmail.com> 
     2 
     3        * +weblogin/ChangeLog: Fork the changelog for weblogin. 
     4 
    152009-04-30  Neutron Soutmun <neo.neutron@gmail.com> 
    26 
  • weblogin/rahu_radius.class.php

    r33c7588 r15110c7  
    190190    $randno3 = rand(0,65535); 
    191191    $randno4 = rand(0,65535); 
    192     $randno = sprintf("%s%s%s%s", dechex($randno1), dechex($randno2), 
    193                                     dechex($randno3), dechex($randno4)); 
     192    $randno = sprintf("%s%s%s%s",  
     193                str_pad(dechex($randno1), 4, "0", STR_PAD_LEFT),  
     194                str_pad(dechex($randno2), 4, "0", STR_PAD_LEFT),  
     195                str_pad(dechex($randno3), 4, "0", STR_PAD_LEFT),  
     196                str_pad(dechex($randno4), 4, "0", STR_PAD_LEFT)); 
    194197    $this->session_id = $randno; 
    195198