diff options
| author | 2025-08-03 13:44:18 +0200 | |
|---|---|---|
| committer | 2025-08-03 13:44:18 +0200 | |
| commit | 502090edcdd96e6b1c2f5471dd7b5670ebf6124f (patch) | |
| tree | d4f642d078a8ad8f6cdca04fc734d031abf55196 | |
| parent | b817598f5711b784c05579e473847e1030b4f75e (diff) | |
Redirect to the login page from bookmarklet instead of 403 (#7782)
Makes it easier than having to sign in then go back to the website I clicked the bookmarklet on.
| -rwxr-xr-x | app/Controllers/feedController.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 4cd5e7369..977143882 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -21,6 +21,13 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { $token_is_ok = ($token != '' && $token == $token_param); $action = Minz_Request::actionName(); $allow_anonymous_refresh = FreshRSS_Context::systemConf()->allow_anonymous_refresh; + + // Likely coming from bookmarklet, redirect to the login page + if ($action === 'add') { + Minz_Request::forward(['c' => 'auth', 'a' => 'login']); + return; + } + if ($action !== 'actualize' || !($allow_anonymous_refresh || $token_is_ok)) { Minz_Error::error(403); |
