diff options
| -rwxr-xr-x | app/Controllers/javascriptController.php | 3 | ||||
| -rw-r--r-- | app/Models/Context.php | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/Controllers/javascriptController.php b/app/Controllers/javascriptController.php index f8746240c..e3ae3669e 100755 --- a/app/Controllers/javascriptController.php +++ b/app/Controllers/javascriptController.php @@ -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()); } diff --git a/app/Models/Context.php b/app/Models/Context.php index d8dd81e88..2a58bd4ba 100644 --- a/app/Models/Context.php +++ b/app/Models/Context.php @@ -95,7 +95,7 @@ class FreshRSS_Context { } /** - * Return true iif the current requests target a feed and not a category or all articles. + * Return true if the current request targets a feed (and not a category or all articles), false otherwise. */ public static function isFeed() { return self::$current_get['feed'] != false; |
