mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-09-14 06:33:31 -04: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:
1 parent
eb912cc7a8
commit
7bb28c3f2b
2 files changed
+9
-8
No files matched your search
@@ -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