Request does not pass strict cookie check on ios. Folders looks empty

Hi!
Using ipad’s native or any other file browser generates this in the log:

{"reqId":"PtqbhWXlEI57M0AdpNJa","level":2,"time":"2024-06-02T09:34:24+00:00","remoteAddr":"192.168.1.1","user":"--","app":"no app in context","method":"PROPFIND","url":"/remote.php/webdav/","message":"Request does not pass strict cookie check","userAgent":"Owlfiles/13101 CFNetwork/1496.0.7 Darwin/23.5.0","version":"27.0.2.1","data":[],"id":"665c480aaf44d"}

All folders in ipad’s native filebrowser looks like they are empty, but they are not. If I first use the Nextcloud client app and open any folder, then go back to ipad’s native file browser I can the see all files in that folder.

What could the problem be?
Only suggestion from searching was to clear Nextcloud client app’s cache, but that did not solve it.

Nextcloud version: 27.0.2 (self hosted)
Operating system: Debian 12
Apache: Apache/2.4.57
PHP: 8.2.7

Owfiles is not “iPad’s native file browser” - it’s a third party app of some sort.

It’s HTTP agent may not be compliant or something. Might be something to report to them. You might be able to workaround it with csrf.optout in Nextcloud I guess: Configuration Parameters — Nextcloud latest Administration Manual latest documentation

EDIT: Just re-read you said and saw “or any other file browser” so I guess you were trying several. Either way, looks like the above.

Hi and thank you for your answer!

So I put this in my config.php?:

'csrf.optout' => [
        '/^WebDAVFS/', // OS X Finder
        '/^Microsoft-WebDAV-MiniRedir/', // Windows webdav drive
],

Are there any downside with that?

Added that to my config.php, but it made no difference.

That’s just the example. You need to add a regular expression that matches the user-agent for the particular file browser you’re using that is non-compliant.

Or report to the developer of the particular file browser and see if there is a fix. :slight_smile:

Oh I see. So I should do something like this for Owlfiles?:

'csrf.optout' => [
        '/^WebDAVFS/', // OS X Finder
        '/^Microsoft-WebDAV-MiniRedir/', // Windows webdav drive
        '/^Owlfiles/',
],

Or is there more too it?

1 Like

Setting this solves it for Owlfiles at least. The problem with iPads built in file browser was mistaken by me to be the same problem as for Owlfiles. iPads built in file browser problem with only showing empty folders is yet to be solved. I’m happy with Owlfiles so it does not bother me much.

Thank you jtr for directing me to the solution!

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.