Просмотр исходного кода

Session fix when form + HTTP auth are used (#2286)

https://github.com/Alkarex/FreshRSS/commit/bf51c82d55f6bf1af2a6464ca4f148d6c613d28f
https://github.com/FreshRSS/FreshRSS/issues/2125#issuecomment-473873922
Alexandre Alapetite 7 лет назад
Родитель
Сommit
e84a90943a
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      app/Models/Auth.php

+ 1 - 1
app/Models/Auth.php

@@ -13,7 +13,7 @@ class FreshRSS_Auth {
 	 * This method initializes authentication system.
 	 */
 	public static function init() {
-		if (Minz_Session::param('REMOTE_USER', '') !== httpAuthUser()) {
+		if (isset($_SESSION['REMOTE_USER']) && $_SESSION['REMOTE_USER'] !== httpAuthUser()) {
 			//HTTP REMOTE_USER has changed
 			self::removeAccess();
 		}