You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] WebDAV sync/backup conflicts with browser cookies #1297
I'm trying to backup or sync settings to my Nextcloud server but I'm having issues.
The thing is, I'm logged into my personal Nextcloud account in the browser and I want ScriptCat to sync to a different account. But the sync or backup fails with 401 Unauthorized (I see that in DevTools).
If I log out of my personal account on the Nextcloud webpage and run backup again, it succeeds. And when I return to the Nextcloud webpage I'm logged in as the "sync" account now.
The extension and the normal browser share cookies and this is the results of that (I can see all the cookies in the request in DevTools).
Similar, albeit not as obvious, thing happens if I'm logged into my personal account on the web and try to backup/sync into the same personal account using "app password" - backup fails too, until I log out of the web, run backup again and it succeeds. Back on the web and I'm logged in! (bypassing 2FA but I guess that's the point of app password in the first place; but the cookies shouldn't transfer from the extension to the normal browser).
I tried doing similar thing in Violentmonkey (logged into my personal account, backing up to the "sync" account) and it didn't have the problem so I think separating cookies should be possible. (I checked DevTools too and the request in Violentmonkey does have a different cookies, it also sends this using background page unlike ScriptCat which does it in options.html)
Reproduction Steps
Log into your Nextcloud account on the web
Use a different Nextcloud account in the ScriptCat backup or sync.
This should be fixed in #1308. The root cause is that WebDAV requests made from the options page automatically include browser cookies for the target domain, which conflicts with the credentials configured in ScriptCat.
The fix forces credentials: "omit" on all WebDAV fetch requests via the webdav library's patcher API, so only the username/password (Authorization header) is used for authentication.
Activity
🐛 修复 WebDAV 同步请求携带浏览器 cookies 导致认证冲突的问题 (#1297)
CodFrm commentedon Mar 22, 2026
Hi @jenda69,
This should be fixed in #1308. The root cause is that WebDAV requests made from the options page automatically include browser cookies for the target domain, which conflicts with the credentials configured in ScriptCat.
The fix forces
credentials: "omit"on all WebDAV fetch requests via the webdav library's patcher API, so only the username/password (Authorization header) is used for authentication.I don't have a Nextcloud environment to test with — could you help verify the fix? You can grab the build artifact from the CI Action on the PR. https://github.com/scriptscat/scriptcat/actions/runs/23394754087
Thanks for the detailed bug report!
🐛 针对 WebDAV 修复 cookies 认证冲突 及 authType 支持 (#1308)