mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-04 13:14:20 -04:00
Add missing access checks for feed-related actions (#7768)
* Add missing access checks for feed-related actions * fix whitespace
This commit is contained in:
@@ -19,6 +19,14 @@ class FreshRSS_javascript_Controller extends FreshRSS_ActionController {
|
||||
}
|
||||
|
||||
public function actualizeAction(): void {
|
||||
if (!FreshRSS_Auth::hasAccess() && !(
|
||||
FreshRSS_Context::systemConf()->allow_anonymous
|
||||
&& FreshRSS_Context::systemConf()->allow_anonymous_refresh
|
||||
)) {
|
||||
Minz_Error::error(403);
|
||||
return;
|
||||
}
|
||||
|
||||
header('Content-Type: application/json; charset=UTF-8');
|
||||
Minz_Session::_param('actualize_feeds', false);
|
||||
|
||||
@@ -34,6 +42,11 @@ class FreshRSS_javascript_Controller extends FreshRSS_ActionController {
|
||||
}
|
||||
|
||||
public function nbUnreadsPerFeedAction(): void {
|
||||
if (!FreshRSS_Auth::hasAccess() && !FreshRSS_Context::systemConf()->allow_anonymous) {
|
||||
Minz_Error::error(403);
|
||||
return;
|
||||
}
|
||||
|
||||
header('Content-Type: application/json; charset=UTF-8');
|
||||
$catDAO = FreshRSS_Factory::createCategoryDao();
|
||||
$this->view->categories = $catDAO->listCategories(prePopulateFeeds: true, details: false);
|
||||
|
||||
Reference in New Issue
Block a user