mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2025-12-23 21:47:44 -05:00
committed by
GitHub
parent
00f2f043ac
commit
476e57b046
@@ -11,7 +11,7 @@ class FreshRSS_FormAuth {
|
||||
return false;
|
||||
}
|
||||
|
||||
return password_verify($nonce . $hash, $challenge);
|
||||
return password_verify($hash . $nonce, $challenge);
|
||||
}
|
||||
|
||||
/** @return list<string> */
|
||||
|
||||
@@ -75,7 +75,7 @@ function init_crypto_forms() {
|
||||
try {
|
||||
const strong = window.Uint32Array && window.crypto && (typeof window.crypto.getRandomValues === 'function');
|
||||
const s = bcrypt.hashSync(crypto_form.querySelector('.passwordPlain').value, json.salt1);
|
||||
const c = bcrypt.hashSync(json.nonce + s, strong ? bcrypt.genSaltSync(4) : poormanSalt());
|
||||
const c = bcrypt.hashSync(s + json.nonce, strong ? bcrypt.genSaltSync(4) : poormanSalt());
|
||||
challenge.value = c;
|
||||
if (!s || !c) {
|
||||
openNotification('Crypto error!', 'bad');
|
||||
|
||||
Reference in New Issue
Block a user