From 4ec602e8e3e4a1a9410ffcf0730cddf67b5f27f0 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Wed, 26 Oct 2022 07:53:21 -0400 Subject: Add default redirect when authenticating (#4778) --- app/Controllers/authController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/Controllers') 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}"); -- cgit v1.2.3