Skip to content

meta referrer origin#1198

Merged
Alkarex merged 1 commit intoFreshRSS:devfrom
Alkarex:CSP-referrer
Aug 7, 2016
Merged

meta referrer origin#1198
Alkarex merged 1 commit intoFreshRSS:devfrom
Alkarex:CSP-referrer

Conversation

@Alkarex
Copy link
Member

@Alkarex Alkarex commented Aug 7, 2016

#955
Tested in Firefox 48, Chrome 53, Edge 25

FreshRSS#955
Tested in Firefox 48, Chrome 53, Edge 25
@Frenzie
Copy link
Member

Frenzie commented Sep 19, 2016

I think this may have broken the ability to update stuff in extensions, unless something went wrong for me while upgrading to 1.5.

Error 403 - Forbidden

You don’t have permission to access this page [HTTP_REFERER=]
← Go back to your RSS feeds

@Frenzie
Copy link
Member

Frenzie commented Sep 19, 2016

Specifically it's this codepath that gets executed:

private static function initAuth() {
FreshRSS_Auth::init();
if (Minz_Request::isPost() && !(is_referer_from_same_domain() && FreshRSS_Auth::isCsrfOk())) {
// Basic protection against XSRF attacks
FreshRSS_Auth::removeAccess();
$http_referer = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER'];
Minz_Translate::init('en'); //TODO: Better choice of fallback language
Minz_Error::error(
403,
array('error' => array(
_t('feedback.access.denied'),
' [HTTP_REFERER=' . htmlspecialchars($http_referer) . ']'
))
);
}
}

@Alkarex
Copy link
Member Author

Alkarex commented Sep 19, 2016

Yes indeed. Related issue #1253
I believe the CSRF token is missing for the extensions.

@Alkarex Alkarex mentioned this pull request Sep 19, 2016
Alkarex added a commit to Alkarex/FreshRSS that referenced this pull request Apr 1, 2025
Alkarex added a commit that referenced this pull request Apr 1, 2025
#6303 (comment)
Was already implemented conditionally
#1198
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants