diff options
| author | 8chan <admin@8chan.co> | 2015-02-16 16:24:54 -0800 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2016-05-06 15:14:55 +0200 |
| commit | ce3ce4f1b65198083c232897c169313640f23038 (patch) | |
| tree | b29d00885efe30b3eb2b83cead819468280d9686 /inc | |
| parent | 7831da83fc09ff90a0f99641bde5e2d8c08e84c5 (diff) | |
Fix *0 secure tripcodes caused by accidentally feeding + signs to crypt()
Diffstat (limited to 'inc')
| -rwxr-xr-x | inc/functions.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php index 4746b034..6a34e7a8 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -2374,7 +2374,7 @@ function generate_tripcode($name) { if (isset($config['custom_tripcode']["##{$trip}"])) $trip = $config['custom_tripcode']["##{$trip}"]; else - $trip = '!!' . substr(crypt($trip, '_..A.' . substr(base64_encode(sha1($trip . $config['secure_trip_salt'], true)), 0, 4)), -10); + $trip = '!!' . substr(crypt($trip, str_replace('+', '.', '_..A.' . substr(base64_encode(sha1($trip . $config['secure_trip_salt'], true)), 0, 4))), -10); } else { if (isset($config['custom_tripcode']["#{$trip}"])) $trip = $config['custom_tripcode']["#{$trip}"]; |
