Access forbidden - CSRF check failed - Nextcloud

My YunoHost server

Hardware: Dedicated server
YunoHost version: x.x.x
**I have access to my server : directly

Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

I am trying to share a link via NextCloud, and getting this error.

VM970:1 POST https://domain/nextcloud/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json 403

Tuesday%2C%20January%2014%202020%20--%2011-18%20pm%2008s

Here is the header-

:authority: domain
:method: POST
:path: /nextcloud/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json
:scheme: https
accept: application/json, text/javascript, */*; q=0.01
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9
content-length: 87
content-type: application/x-www-form-urlencoded; charset=UTF-8
cookie: oc_sessionPassphrase=hnnVlgt74LkZppC8PR%2B6dP%2BAC7tMz%2BaggNkW0aOPGca3286UI%2B%2FEkWIn%2FtMaW9VNMGScZNzVUZxaoSCHuqv3lr4oSAZHxy0jh%2FRu168RAK56dNWqEzJWxYlE7GuhQ8FV; cookie_test=test; oc9qubnk77ip=o2dclbs62kfk5adeeqam33nn47; nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; SSOwAuthUser=me; SSOwAuthHash=7f3d0e043e3d1faf560500e2bfc6061b61065fe963d5c69daca39fec035422399f27562530f5b5fef8901b92691010838c263ebcf40393194c9fdb0113cb243c; SSOwAuthExpire=1579622402.083
dnt: 1
ocs-apirequest: true
origin: https://domain
requesttoken: H8tImRgkDcPhqGAUBoi9M8ZIV5Riom2AwJb/mK6GCT8=:U459235WWfGP71N8bs7fApEBJeItjTTukt+t/ZawPgY=
sec-fetch-mode: cors
sec-fetch-site: same-origin
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36
x-requested-with: XMLHttpRequest

I’ve looked online and not found anything related to this as a server-side issue. Any idea what this
means?

Hi @pl0

This might be related to the fact that your nextcloud might be in “private” mode, where the user is redirected to the yunohost SSO ?

You might have more luck with reporting this issue directly to the application on https://github.com/YunoHost-Apps/nextcloud_ynh/issues

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