summaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
authorGravatar Inverle <inverle@proton.me> 2025-12-04 08:46:11 +0100
committerGravatar GitHub <noreply@github.com> 2025-12-04 08:46:11 +0100
commit60cf5ea297a17db861e73cd65d7b7862bd6bcc24 (patch)
treee1f9a123f79a3f5b449777ea2c17d98ca897adfb /app/Controllers/feedController.php
parent1621f12a15855b3e1b98d58b6e8effe959926b46 (diff)
Improve anonymous authentication logic (#8165)
* Improve anonymous authentication logic * forgot to git add * Fix incorrect token check Because an empty parameter could be just passed if token for the user wasn't set: `&token=`
Diffstat (limited to 'app/Controllers/feedController.php')
-rw-r--r--app/Controllers/feedController.php9
1 files changed, 1 insertions, 8 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index b6ecbeec2..1829417c1 100644
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -13,12 +13,6 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
#[\Override]
public function firstAction(): void {
if (!FreshRSS_Auth::hasAccess()) {
- // Token is useful in the case that anonymous refresh is forbidden
- // and CRON task cannot be used with php command so the user can
- // set a CRON task to refresh his feeds by using token inside url
- $token = FreshRSS_Context::userConf()->token;
- $token_param = Minz_Request::paramString('token');
- $token_is_ok = ($token != '' && $token == $token_param);
$action = Minz_Request::actionName();
$allow_anonymous_refresh = FreshRSS_Context::systemConf()->allow_anonymous_refresh;
@@ -28,8 +22,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
return;
}
- if ($action !== 'actualize' ||
- !($allow_anonymous_refresh || $token_is_ok)) {
+ if ($action !== 'actualize' || !$allow_anonymous_refresh) {
Minz_Error::error(403);
}
}