summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b2a6694)
This way we can identify them and still compare to legacy MD5 hashes
require(JIRAFEAU_ROOT.'lib/template/footer.php');
exit;
} else {
require(JIRAFEAU_ROOT.'lib/template/footer.php');
exit;
} else {
- if (hash_equals($link['key'], hash('sha256', $_POST['key']))) {
+ if (strpos($link['key'], '[SHA256]') == 0 && hash_equals(substr($link['key'], 8), hash('sha256', $_POST['key']))) {
+ $password_challenged = true;
+ }
+ elseif (hash_equals($link['key'], md5($_POST['key']))) {
$password_challenged = true;
} else {
sleep(2);
$password_challenged = true;
} else {
sleep(2);
/* hash password or empty. */
$password = '';
if (!empty($key)) {
/* hash password or empty. */
$password = '';
if (!empty($key)) {
- $password = hash('sha256', $key);
+ $password = '[SHA256]'.hash('sha256', $key);
/* sha256 password or empty */
$password = '';
if (!empty($key)) {
/* sha256 password or empty */
$password = '';
if (!empty($key)) {
- $password = hash('sha256', $key);
+ $password = '[SHA256]'.hash('sha256', $key);
}
/* Store information. */
}
/* Store information. */