diff options
| author | 2020-05-08 21:54:45 +0200 | |
|---|---|---|
| committer | 2020-05-08 21:54:45 +0200 | |
| commit | 17539668eac84b9f7b86de036c9e23fa226054d6 (patch) | |
| tree | e1617a5253bff4218a8b5c318eb53e74d7ae87d7 | |
| parent | a76caf78e75e65e4ecebae6059a3f0fdc2fa3f22 (diff) | |
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
| -rw-r--r-- | p/api/greader.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/p/api/greader.php b/p/api/greader.php index 51d341f0c..b591e7c44 100644 --- a/p/api/greader.php +++ b/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(); |
