OK, now it is secure.
This commit is contained in:
parent
299b0e3f2f
commit
964bb83300
@ -1973,13 +1973,14 @@ function generate_tripcode($name) {
|
|||||||
if (isset($config['custom_tripcode']["##{$trip}"]))
|
if (isset($config['custom_tripcode']["##{$trip}"]))
|
||||||
$trip = $config['custom_tripcode']["##{$trip}"];
|
$trip = $config['custom_tripcode']["##{$trip}"];
|
||||||
else
|
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 {
|
} else {
|
||||||
if (isset($config['custom_tripcode']["#{$trip}"]))
|
if (isset($config['custom_tripcode']["#{$trip}"]))
|
||||||
$trip = $config['custom_tripcode']["#{$trip}"];
|
$trip = $config['custom_tripcode']["#{$trip}"];
|
||||||
else
|
else
|
||||||
$trip = '!' . substr(crypt($trip, $salt), -10);
|
$trip = '!' . substr(crypt($trip, $salt), -10);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array($name, $trip);
|
return array($name, $trip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user