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

Merge branch 'dev' of https://github.com/FreshRSS/FreshRSS into FreshRSS/dev

Alexandre Alapetite 8 лет назад
Родитель
Сommit
7e52d6a7a4
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      app/Models/Auth.php

+ 6 - 0
app/Models/Auth.php

@@ -13,6 +13,11 @@ class FreshRSS_Auth {
 	 * This method initializes authentication system.
 	 */
 	public static function init() {
+		if (Minz_Session::param('REMOTE_USER', '') !== httpAuthUser()) {
+			//HTTP REMOTE_USER has changed
+			self::removeAccess();
+		}
+
 		self::$login_ok = Minz_Session::param('loginOk', false);
 		$current_user = Minz_Session::param('currentUser', '');
 		if ($current_user === '') {
@@ -58,6 +63,7 @@ class FreshRSS_Auth {
 			$login_ok = $current_user != '';
 			if ($login_ok) {
 				Minz_Session::_param('currentUser', $current_user);
+				Minz_Session::_param('REMOTE_USER', $current_user);
 			}
 			return $login_ok;
 		case 'none':