aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2015-10-27 22:12:12 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2015-10-27 22:12:12 +0100
commitb4d7630100b6369ffda839d1f6a1f1b22dfd1dc2 (patch)
treecd125fa26d00429368f2e40c80f96e5f96ee01cb
parent8bc5dc5f05cd7374079cd52a3b6e7a91128e464b (diff)
parent29fe97cb2ffe9d21658cc206e80644a6e2fdb9c7 (diff)
Merge branch 'FreshRSS/dev' into dev
-rwxr-xr-xapp/Controllers/javascriptController.php3
-rw-r--r--app/Models/Context.php2
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;