aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/authController.php
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <aledeg@users.noreply.github.com> 2022-10-26 07:53:21 -0400
committerGravatar GitHub <noreply@github.com> 2022-10-26 13:53:21 +0200
commit4ec602e8e3e4a1a9410ffcf0730cddf67b5f27f0 (patch)
tree4c495c29acdcf00e8ca7549b333df1b47daf383a /app/Controllers/authController.php
parent9e27ab9200bb78898f7085cbea1a6525aafe13cb (diff)
Add default redirect when authenticating (#4778)
Diffstat (limited to 'app/Controllers/authController.php')
-rw-r--r--app/Controllers/authController.php8
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}");