A free, self-hostable news aggregator…
Fix user self registration (#2442)
Alexandre Alapetitecaeeeb52cafe
diff --git a/app/FreshRSS.php b/app/FreshRSS.phpindex ecf13e4cf..8f614c538 100644--- a/app/FreshRSS.php+++ b/app/FreshRSS.php@@ -68,9 +68,12 @@ class FreshRSS extends Minz_FrontController {' [HTTP_REFERER=' . htmlspecialchars($http_referer, ENT_NOQUOTES, 'UTF-8') . ']')));}- if ((!FreshRSS_Auth::isCsrfOk()) &&- (Minz_Request::controllerName() !== 'auth' || Minz_Request::actionName() !== 'login')) {- // Token-based protection against XSRF attacks, except for the login form itself+ if (!(FreshRSS_Auth::isCsrfOk() ||+ (Minz_Request::controllerName() === 'auth' && Minz_Request::actionName() === 'login') ||+ (Minz_Request::controllerName() === 'user' && Minz_Request::actionName() === 'create' &&+ !FreshRSS_Auth::hasAccess('admin'))+ )) {+ // Token-based protection against XSRF attacks, except for the login or self-create user formsMinz_Translate::init('en'); //TODO: Better choice of fallback languageMinz_Error::error(403, array('error' => array(_t('feedback.access.denied'),