diff options
| author | 2022-10-26 07:53:21 -0400 | |
|---|---|---|
| committer | 2022-10-26 13:53:21 +0200 | |
| commit | 4ec602e8e3e4a1a9410ffcf0730cddf67b5f27f0 (patch) | |
| tree | 4c495c29acdcf00e8ca7549b333df1b47daf383a | |
| parent | 9e27ab9200bb78898f7085cbea1a6525aafe13cb (diff) | |
Add default redirect when authenticating (#4778)
| -rw-r--r-- | app/Controllers/authController.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php index 3661e35cb..e8f6807bd 100644 --- a/app/Controllers/authController.php +++ b/app/Controllers/authController.php @@ -159,8 +159,12 @@ class FreshRSS_auth_Controller extends FreshRSS_ActionController { Minz_Translate::init(FreshRSS_Context::$user_conf->language); - // All is good, go back to the index. - Minz_Request::good(_t('feedback.auth.login.success'), Minz_Url::unserialize(Minz_Request::param('original_request'))); + // All is good, go back to the original request or the index. + $url = Minz_Url::unserialize(Minz_Request::param('original_request')); + if ($url === null) { + $url = [ 'c' => 'index', 'a' => 'index' ]; + } + Minz_Request::good(_t('feedback.auth.login.success'), $url); } else { Minz_Log::warning("Password mismatch for user={$username}, nonce={$nonce}, c={$challenge}"); |
