mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-10 06:17:52 -05:00
HTTP 403 for invalid login
https://github.com/FreshRSS/FreshRSS/issues/1015 And does not leak if user exists or not
This commit is contained in:
@@ -43,7 +43,11 @@ class FreshRSS_javascript_Controller extends Minz_ActionController {
|
||||
} else {
|
||||
Minz_Log::notice('Nonce failure due to invalid username!');
|
||||
}
|
||||
$this->view->nonce = ''; //Failure
|
||||
$this->view->salt1 = '';
|
||||
//Failure: Return random data.
|
||||
$this->view->salt1 = sprintf('$2a$%02d$', FreshRSS_user_Controller::BCRYPT_COST);
|
||||
for ($i = 22; $i > 0; $i--) {
|
||||
$this->view->salt1 .= './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'[rand(0, 63)];
|
||||
}
|
||||
$this->view->nonce = sha1(rand());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user