소스 검색

Fix bad relogging clients (#2961)

* Fix bad relogging clients

Some clients (like EasyRSS) are still using the old HTTP Authorization
header after having logged to log in with another user.
We should not attempt to process Authorization headers during a login
request

* Typo

* A bit safer

Avoid null exception
Alexandre Alapetite 6 년 전
부모
커밋
17539668ea
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      p/api/greader.php

+ 4 - 3
p/api/greader.php

@@ -929,15 +929,16 @@ ini_set('session.use_cookies', '0');
 register_shutdown_function('session_destroy');
 Minz_Session::init('FreshRSS');
 
-$user = authorizationToUser();
+$user = $pathInfos[1] === 'accounts' ? '' : authorizationToUser();
 FreshRSS_Context::$user_conf = null;
 if ($user !== '') {
 	FreshRSS_Context::$user_conf = get_user_configuration($user);
 	Minz_ExtensionManager::init();
-	Minz_Translate::init(FreshRSS_Context::$user_conf->language);
-
 	if (FreshRSS_Context::$user_conf != null) {
+		Minz_Translate::init(FreshRSS_Context::$user_conf->language);
 		Minz_ExtensionManager::enableByList(FreshRSS_Context::$user_conf->extensions_enabled);
+	} else {
+		Minz_Translate::init();
 	}
 } else {
 	Minz_Translate::init();