Browse Source

Merge branch 'FreshRSS/dev' into dev

Alexandre Alapetite 10 years ago
parent
commit
b4d7630100
2 changed files with 3 additions and 2 deletions
  1. 2 1
      app/Controllers/javascriptController.php
  2. 1 1
      app/Models/Context.php

+ 2 - 1
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());
 	}

+ 1 - 1
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;