mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-04 06:35:40 -04:00
PHP 5.2 compatibility
https://github.com/FreshRSS/FreshRSS/pull/1016 https://github.com/FreshRSS/FreshRSS/issues/1015 It is first PHP 5.5 that added support for accessing characters within string literals using []...
This commit is contained in:
@@ -45,8 +45,9 @@ class FreshRSS_javascript_Controller extends Minz_ActionController {
|
||||
}
|
||||
//Failure: Return random data.
|
||||
$this->view->salt1 = sprintf('$2a$%02d$', FreshRSS_user_Controller::BCRYPT_COST);
|
||||
$alphabet = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
||||
for ($i = 22; $i > 0; $i--) {
|
||||
$this->view->salt1 .= './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'[rand(0, 63)];
|
||||
$this->view->salt1 .= $alphabet[rand(0, 63)];
|
||||
}
|
||||
$this->view->nonce = sha1(rand());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user