diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-09-23 14:23:42 +1000 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-09-23 14:23:42 +1000 |
| commit | 964bb83300a75095a19768d3e426a429d77c4d6a (patch) | |
| tree | 0c8d79dce4509a86a869f6d78ccf5a2171ebfd7d /inc/functions.php | |
| parent | 299b0e3f2f0bae47c2739071c7e604f5d97a5065 (diff) | |
OK, now it is secure.
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php index 3448e7db..7c6d3df3 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1973,13 +1973,14 @@ function generate_tripcode($name) { if (isset($config['custom_tripcode']["##{$trip}"])) $trip = $config['custom_tripcode']["##{$trip}"]; else - $trip = '!!' . substr(crypt($trip, substr(base64_encode(sha1($trip . $config['secure_trip_salt'], true)), 0, 9)), -10); + $trip = '!!' . substr(crypt($trip, '_..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}"]; else $trip = '!' . substr(crypt($trip, $salt), -10); } + return array($name, $trip); } |
