Changeset 294 for trunk


Ignore:
Timestamp:
Dec 12, 2007 10:55:43 PM (16 years ago)
Author:
quinn
Message:

Changed signing routines so they always compare lower-case values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Utilities.inc.php

    r290 r294  
    724724    }
    725725
    726     return $val . '-' . mb_substr(md5($salt . md5($val . $salt)), 0, $length);
     726    return $val . '-' . mb_strtolower(mb_substr(md5($salt . md5($val . $salt)), 0, $length));
    727727}
    728728
     
    753753function verifySignature($signed_val, $salt=null, $length=18)
    754754{
     755    // All comparisons are done using lower-case strings.
     756    $signed_val = mb_strtolower($signed_val);
    755757    // Strip the value from the signed value.
    756758    $val = removeSignature($signed_val);
Note: See TracChangeset for help on using the changeset viewer.