Repository navigation
Description
Steps to reproduce
- Upgrade to owncloud 9.1
- Login
- It shows CSRF check failed
- Deactivated files_sharing via occ
- Login workes
Expected behaviour
Login and works
Actual behaviour
shows CSRF check failed
Server configuration
Operating system:
Web server:
all-inkl.com
Database:
5.6.30
PHP version:
5.6.23
ownCloud version: (see ownCloud admin page)
9.1
Updated from an older ownCloud or fresh install:
updated from 9.0.3
Where did you install ownCloud from:
Install from tar.bz2
Signing status (ownCloud 9.0 and above):
Login as admin user into your ownCloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
List of activated apps:
Enabled:
- activity: 2.3.2
- calendar: 1.2.2
- comments: 0.3.0
- contacts: 1.3.1.0
- dav: 0.2.5
- federatedfilesharing: 0.3.0
- federation: 0.1.0
- files: 1.5.1
- files_pdfviewer: 0.8.1
- files_texteditor: 2.1
- files_trashbin: 0.9.0
- files_sharing 0.10.0
- files_versions: 1.3.0
- files_videoplayer: 0.9.8
- gallery: 15.0.0
- notifications: 0.3.0
- provisioning_api: 0.5.0
- systemtags: 0.3.0
- updatenotification: 0.2.1
Disabled: - encryption
- external
- files_antivirus
- files_external
- firstrunwizard
- templateeditor
- user_external
- user_ldap
The content of config/config.php:
$CONFIG = array (
'trusted_domains' =>
array (
0 => 'owncloud..de',
1 => 'owncloud..de',
2 => '.de',
3 => 'www.owncloud..de',
4 => 'www.owncloud..de',
5 => '.de',
),
'datadirectory' => '/www/htdocs///ownclouddata/data',
'tempdirectory' => '/www/htdocs///ownclouddata/tmp',
'overwrite.cli.url' => 'http://.de/cloud/owncloud',
'dbtype' => 'mysql',
'version' => '9.1.0.15',
'dbname' => 'd01cd1d3',
'dbhost' => '127.0.0.1',
'dbtableprefix' => 'oc_',
'filesystem_check_changes' => 0,
'dbuser' => 'd01cd1d3',
'dbpassword' => '',
'installed' => true,
'forcessl' => true,
'theme' => '',
'maintenance' => false,
'loglevel' => 3,
'mail_smtpmode' => 'smtp',
'appstore.experimental.enabled' => true,
'mail_from_address' => 'info',
'mail_domain' => 'owncloud.de',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtphost' => 'w01078ba.kasserver.com',
'mail_smtpport' => '465',
'mail_smtpauth' => 1,
'mail_smtpname' => '',
'mail_smtppassword' => '',
'trashbin_retention_obligation' => 'auto',
'enabledPreviewProviders' =>
array (
0 => 'OC\Preview\Image',
1 => 'OC\Preview\MP3',
2 => 'OC\Preview\TXT',
3 => 'OC\Preview\MarkDown',
4 => 'OC\Preview\Epub',
5 => 'OC\Preview\PDF',
6 => 'OC\Preview\OpenDocument',
7 => 'OC\Preview\StarOffice',
8 => 'OC\Preview\MSOfficeDoc',
9 => 'OC\Preview\MSOffice2003',
10 => 'OC\Preview\MSOffice2007',
),
'updater.secret' => '',
'mail_smtpsecure' => 'ssl',
);
Are you using external storage, if yes which one: local/smb/sftp/...
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
Client configuration
Browser:
Chrome
Operating system:
Mac OSX 10.11.6
Logs
Web server error log
{"reqId":"V5DHUlUNh8EAAC3bt5kAAAAk","remoteAddr":"217.93.9.75","app":"core","message":"starting upgrade from 9.0.1.3 to 9.1.0.15","level":0,"time":"2016-07-21T13:00:03+00:00","method":"GET","url":"/core/ajax/update.php?requesttoken=%3D%%3D","user":"--"}
{"reqId":"V5DHUlUNh8EAAC3bt5kAAAAk","remoteAddr":"217.93.9.75","app":"core","message":"Exception: {"Exception":"Exception","Message":"Die Anwendung konnte nicht installiert werden, weil Sie nicht mit dieser Version von ownCloud kompatibel ist.","Code":0,"Trace":"#grity(Array, '\/www\/htdocs\/w01...', '\/www\/htdocs\/w01...', false)\n#1 \/www\/htdocs\/w01078ba\/simon\/cloud\/owncloud\/lib\/private\/Installer.php(263): OC\Installer::updateApp(Array)\n#2 \/www\/htdocs\/w01078ba\/simon\/cloud\/owncloud\/lib\/private\/Updater.php(454): OC\Installer::updateAppByOCSId('164356')\n#3 \/www\/htdocs\/w01078ba\/simon\/cloud\/owncloud\/lib\/private\/Updater.php(254): OC\Updater->upgradeAppStoreApps(Array)\n#4 \/www\/htdocs\/w01078ba\/simon\/cloud\/owncloud\/lib\/private\/Updater.php(150): OC\Updater->doUpgrade('9.1.0.15', '9.0.1.3')\n#5 \/www\/htdocs\/w01078ba\/simon\/cloud\/owncloud\/core\/ajax\/update.php(193): OC\Updater->upgrade()\n#6 {main}","File":"\/www\/htdocs\/w01078ba\/simon\/cloud\/owncloud\/lib\/private\/Installer.php","Line":377}","level":3,"time":"2016-07-21T13:02:21+00:00","method":"GET","url":"/core/ajax/update.php?requesttoken=I3g2NToLJgUlehQpPikjBWMvOQMBV2wbOgQyOzwgN2U%3D%3AfSRxkQHLRIfSJLAsZFmNMb4BcfhZfNO5pfFUDm96pio%3D","user":"--"}
ownCloud log (data/owncloud.log)
Browser log
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...
Activity
cipher2k commentedon Jul 21, 2016
I have the same issue. deactivating files_sharing via occ solved the issue of not being able to log in, but now the file sharing feature is missing.
wmeneses commentedon Jul 22, 2016
hello, happens to me ... when I activate the ldap module, an answer to this problem?
PVince81 commentedon Jul 22, 2016
Please all tell us how did you update.
From looking at the messages above it looks like the source code hasn't been properly replaced.
Revisor01 commentedon Jul 22, 2016
Hello,
I Downloaded tar.bz2, extracted on the Server, copy over config.php and started update process.
Thanks for help
PVince81 commentedon Jul 22, 2016
@Revisor01 did you delete the old source code before extracting ?
Revisor01 commentedon Jul 22, 2016
Yes.
Revisor01 commentedon Jul 22, 2016
In an Otter Installation i tried to replace files. Same Error.
PVince81 commentedon Jul 22, 2016
@Revisor01 can you confirm that there are no errors on this page: http://example.com/index.php/settings/integrity/failed and on the admin page (setup check) ?
Revisor01 commentedon Jul 22, 2016
I'm not at the pc right now. But there were no errors or integrity massages after disabling files_sharing.
PVince81 commentedon Jul 22, 2016
Could all the reporters answer the same questions ? The more details we have about the different setups, the closer we can get to a soluton. Thank you !
194 remaining items
PVince81 commentedon Aug 31, 2016
@wobemh Please make new tickets for any new issues observed on 9.1.1RC1 or patched instances.
@derekbtw https://owncloud.org/faq/#backup
@derekbtw since you don't have shares, your problem is likely a different one #25927
derekbtw commentedon Sep 1, 2016
@PVince81 I figured it out. The problem was my max file upload size was set to 1KB for some reason. So when I typed in my username and password, it was over 1kb.
kwisatz commentedon Sep 1, 2016
We have tested the latest patch mentioned above (https://patch-diff.githubusercontent.com/raw/owncloud/core/pull/25754.patch) and found it working.
However, @PVince81 you mentioned that
However, we're using the .deb package from your repository and 9.1.1 is not yet available here, is that known?
PVince81 commentedon Sep 1, 2016
You might find 9.1.1RC1 in the testing repositories
stormsh commentedon Sep 19, 2016
Hello there, I had login problems with my apps since I updated to 9.1. I solved this problem by adding App passwords for said apps. BUT I get this error when I try to log in with my mobile Firefox. The normal desktop Firefox (both are same version and nearly same addons) doesn't have a login problem. It's not urgend because I use the mobile forefox login twice per year.
I just thought you might like the info.
lolnerd commentedon Sep 22, 2016
Hi there, I encountered this problem after upgrading to 9.1 by repository (Ubuntu 16.04). After the info in this thread, I waited patiently to 9.1.1 being released via repository, yet still the bug remains. I'm unable to login via Web Interface with the "Zugriff verboten", "CSRF check failed" error.
PVince81 commentedon Sep 22, 2016
@lolnerd maybe #25927 ?
soaringPingu commentedon Sep 22, 2016
Hi, for what it might be worth I have a slightly different path to the same issue, and it might be useful to someone :-)
This doesn't just happen with upgrades.
I started from scratch with 9.1.0 a month or so ago. My old version was 7, and I only have 3 family users, so didn't bother upgrade as I was also making a fair few other changes.
I manually moved the old file structure of the data files into the new install. I have been using it since it was installed and I have shared one folder, with sub folders and files, with the group 'family'.
Yesterday I added one of the family users back in, and there were some file name clashes with the old files, using lower case first letters, like 'documents', vs. 9.1.0 defaults of 'Documents' (it might be the other way around, not sure...). This became an issue on Windows. I used the sync utility in Windows and manually de-selected the upper case and lower case directories until they contained the same data. I then logged in to the web interface with the new user and removed one version, in this case the lower case ones (documents, music and photos).
This morning, the new user could not log in, nor could I log in with my current user (admin rights). No changes had been made to the system at all.
I could still log into the web interface using my original admin account, and notably, that account is not a member of the group "family", all other accounts are.
My sync client on Ubuntu was showing a green connected tick, using the same credentials as I failed to log in with in the web interface. I didn't test it further than that.
It appears that only users in the group 'family' (in my case) are affected.
The folder that was shared with the group 'family' had no links to the removed folders
The sync clients appeared to be unaffected
(I have not done extensive testing as I am fairly novice in this and I don't have a test set-up, (and I don't want to break it ;-))
If some log files are of use to anyone, let me know which ones.
Since I only have a small system and my oc_share table only had one line in it, I solved it using the above suggested workaround of disabling the File Share and removing that entry. I then rebooted, enabled File Sharing, shared the folder again, and I am up and running.
PVince81 commentedon Sep 23, 2016
By the way, 9.1.1 was released which contains this fix.
So I encourage anyone coming here with the same issue to try 9.1.1 first.
lep86 commentedon Sep 27, 2016
OC 9.1.1 new installation on ubuntu 16. Got error CSRF check failed
PVince81 commentedon Sep 27, 2016
I'm locking this thread now as many people mistake it with #25927.
If you came here through the search and see a CSRF check failed issue on 9.1.1, please report your details in #25927.
Thanks.
[-]File Sharing stack overflow, memory issue, crash, CSRF issue on 9.1[/-][+]File Sharing stack overflow, memory issue, crash, CSRF issue on 9.1.0[/+]PVince81 commentedon Jan 10, 2017
Trying to find smaller steps to reproduce this locally. Goal is being able to test this automatically to avoid regressions in the future.
Steps to recreate one level of recursion on v9.1.0:
curl -D - -X GET -u user1:test http://localhost/owncloud/remote.php/webdav/welcome.txt > file.txtand debug into$this->ownerView->getPath()from the shared storage.At some point the
$mountslist will contain aSharedMountwhen trying to resolve the "deleted" share. Since that one is not in the "Home" mount which is the first entry in$mounts, it will step to the second entrySharedMountand callgetStorage()andgetCache()which will internally initialized that matching shared storage, which itself will call$this->ownerView->getPath()again for itself.This is only a single-level recursion. Goal is to use a similar scenario to achieve infinite recursion with group shares.
PVince81 commentedon Jan 10, 2017
Steps for infinite recursion on v9.1.0:
curl -D - -X GET -u user2:test http://localhost/owncloud/remote.php/webdav/welcome.txt > file.txt💥 500 Internal Server ErrorHow the recursion occurs:
$this->ownerView->getPath()with the id of that share which points to a deleted file. The owner is "user1" so this is user1's viewgetPath()grabs a list of mounts points in$mounts, first one is user1'sHomestorage and the second one is user1's received SharedMount "delfromuser2".Homestorage, the loop proceeds to the `SharedMount' "delfromuser2"getStorage()->getCache()will initialize it.$this->ownerView->getPath()with the id of that share. The owner is "user2" so this is user2's view.getPath()grabs a list of mount points in$mounts, first one is user2'sHomestorage and the second one is user2's received SharedMount "delfromuser1"