-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"CSRF check failed" upon pressing the "Update" button (21.0.2 RC1) #27060
Comments
Thank you for reporting this issue 👍 I will need your browser console log to investigate this issue. Open your console, reload your page and/or do the action leading to this issue and copy/paste the log in this thread. How to access your browser console (Click to expand)Chrome
Safari
IE9
Firefox
Opera
|
Chromium shows two entries in the console:
globals.js:60 $ is deprecated: The global jQuery is deprecated. It will be updated to v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own.
jquery.js:9600 GET https://www.whatever.de/nextcloud/index.php/apps/updatenotification/credentials 412 (Precondition failed) |
And Firefox shows (raw message): HTTP/1.1 412 Precondition failed Mmmh, where does this date value from 1981 might come from?? |
same problem here on 21.0.1 |
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions. |
Same problem here on 21.0.1. For others who have the same problem: As a workaround I was able to update by directly going to the /updater/ URL and then following the instructions shown on that page. |
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions. |
Same issue here, on 21.0.1, but now also on 21.0.3. |
I have the same issue. Could be related to read/write permissions, be sure to add to the PHP fpm config file like
and restart php-fpm. where |
This is how I have been working around this problem for the past year. I'd rather not have to shell in to my server at all. |
at my site, the root problem were wrong
After I removed those rules, the "CSRF check failed" error was gone. Somehow NextCloud created a new CSRF token on server side each time such URL was accessed (these URLs are accessed via ajax when opening the settings page) and didn't update it on client side. Verifying if that is the problem (before removing/fixing the wrong RewriteRules):
|
Fixed for me as well, thanks! |
Hi all,
I am currently on NC version 21.0.2 RC1 (Debian Buster, manual installation). Under "Settings" --> "Overwiew" I see the notifcation that I could upgrade to stable version Nextcloud 21.0.2. But when pressing the "Update" button nothing happens... while in the nextcloud.log logfile I see at the very same time an "CrossSiteRequestForgeryException" (please see below), tried with two different browers (Firefox and Chromium) in case this information is relevant.
Any help is welcome,
Kind regards, mistersixt
PS: Sometimes I also get an "CSRF" error when logging out of NC by the way.
{"reqId":"lHbWPWUi419NdUMJFWn6","level":0,"time":"2021-05-21T09:43:46+00:00","remoteAddr":"127.0.0.1","user":"jomo","app":"carnet","method":"GET","url":"/nextcloud/index.php/apps/updatenotification/credentials","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.0"}
{"reqId":"lHbWPWUi419NdUMJFWn6","level":0,"time":"2021-05-21T09:43:46+00:00","remoteAddr":"127.0.0.1","user":"jomo","app":"contacts","method":"GET","url":"/nextcloud/index.php/apps/updatenotification/credentials","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.0"}
{"reqId":"lHbWPWUi419NdUMJFWn6","level":0,"time":"2021-05-21T09:43:46+00:00","remoteAddr":"127.0.0.1","user":"jomo","app":"documentserver_community","method":"GET","url":"/nextcloud/index.php/apps/updatenotification/credentials","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.0"}
{"reqId":"lHbWPWUi419NdUMJFWn6","level":0,"time":"2021-05-21T09:43:46+00:00","remoteAddr":"127.0.0.1","user":"jomo","app":"encryption","method":"GET","url":"/nextcloud/index.php/apps/updatenotification/credentials","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.0"}
{"reqId":"lHbWPWUi419NdUMJFWn6","level":0,"time":"2021-05-21T09:43:46+00:00","remoteAddr":"127.0.0.1","user":"jomo","app":"files_external","method":"GET","url":"/nextcloud/index.php/apps/updatenotification/credentials","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.0"}
{"reqId":"lHbWPWUi419NdUMJFWn6","level":0,"time":"2021-05-21T09:43:46+00:00","remoteAddr":"127.0.0.1","user":"jomo","app":"files_sharing","method":"GET","url":"/nextcloud/index.php/apps/updatenotification/credentials","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.0"}
{"reqId":"lHbWPWUi419NdUMJFWn6","level":0,"time":"2021-05-21T09:43:46+00:00","remoteAddr":"127.0.0.1","user":"jomo","app":"maps","method":"GET","url":"/nextcloud/index.php/apps/updatenotification/credentials","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.0"}
{"reqId":"lHbWPWUi419NdUMJFWn6","level":0,"time":"2021-05-21T09:43:46+00:00","remoteAddr":"127.0.0.1","user":"jomo","app":"core","method":"GET","url":"/nextcloud/index.php/apps/updatenotification/credentials","message":{"Exception":"OC\AppFramework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException","Message":"CSRF check failed","Code":412,"Trace":[{"file":"/var/www/whatever.de/nextcloud/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php","line":98,"function":"beforeController","class":"OC\AppFramework\Middleware\Security\Securi
tyMiddleware","type":"->","args":[{"class":"OCA\UpdateNotification\Controller\AdminController"},"createCredentials"]},{"file":"/var/www/whatever.de/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":119,"function":"beforeController","class":"OC\AppFramework\Middleware\MiddlewareDispatcher","type":"->","args":[{"class":"OCA\UpdateNotification\Controller\AdminController"},"createCredentials"]},{"file":"/var/www/whatever.de/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\AppFramework\Http\Di
spatcher","type":"->","args":[{"class":"OCA\UpdateNotification\Controller\AdminController"},"createCredentials"]},{"file":"/var/www/whatever.de/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\AppFramework\App","type":"::","args":["OCA\UpdateNotification\Controller\AdminController","createCredentials",{"class":"OC\AppFramework\DependencyInjection\DIContainer"},{"_route":"updatenotification.Admin.createCredentials"}]},{"file":"/var/www/whatever.de/nextcloud/lib/base.php","line":993,"function":"match","class":"O
C\Route\Router","type":"->","args":["/apps/updatenotification/credentials"]},{"file":"/var/www/whatever.de/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/whatever.de/nextcloud/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php","Line":181,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0","version":"21.0.2.0"}
_
The text was updated successfully, but these errors were encountered: