CalDAV does not synchronize with Nextcloud if network.cookie.same-site.enabled is true
Categories
(Calendar :: Provider: CalDAV, defect)
Tracking
(Not tracked)
People
(Reporter: bugzilla.mozilla.org, Assigned: MakeMyDay)
References
Details
(Keywords: regression)
User Story
Workaround =========== * set pref network.cookie.same-site.enabled to false
Attachments
(9 files, 1 obsolete file)
1.78 MB,
application/x-7z-compressed
|
Details | |
78.00 KB,
text/x-log
|
Details | |
153.13 KB,
text/x-log
|
Details | |
122.90 KB,
text/x-log
|
Details | |
151.81 KB,
text/x-log
|
Details | |
153.55 KB,
text/x-log
|
Details | |
151.74 KB,
text/x-log
|
Details | |
122.95 KB,
text/x-log
|
Details | |
2.34 KB,
patch
|
MakeMyDay
:
review+
Fallen
:
approval-calendar-beta+
Fallen
:
approval-calendar-esr+
|
Details | Diff | Splinter Review |
Comment 2•7 years ago
|
||
Comment 8•7 years ago
|
||
Comment 10•7 years ago
|
||
Reporter | ||
Comment 11•7 years ago
|
||
Comment 12•7 years ago
|
||
Comment 13•7 years ago
|
||
Reporter | ||
Comment 14•7 years ago
|
||
Comment 15•7 years ago
|
||
Reporter | ||
Comment 16•7 years ago
|
||
Comment 17•7 years ago
|
||
Reporter | ||
Comment 18•7 years ago
|
||
Reporter | ||
Comment 19•7 years ago
|
||
Reporter | ||
Comment 21•7 years ago
|
||
Reporter | ||
Comment 22•7 years ago
|
||
Comment 23•7 years ago
|
||
Reporter | ||
Comment 24•7 years ago
|
||
Comment 25•7 years ago
|
||
Reporter | ||
Comment 26•7 years ago
|
||
Reporter | ||
Comment 27•7 years ago
|
||
Reporter | ||
Comment 28•7 years ago
|
||
Comment 30•7 years ago
|
||
Comment 31•7 years ago
|
||
Updated•7 years ago
|
Comment 32•7 years ago
|
||
Updated•7 years ago
|
Assignee | ||
Comment 33•7 years ago
|
||
Comment 34•7 years ago
|
||
Comment 35•7 years ago
|
||
Comment 36•7 years ago
|
||
Comment 37•7 years ago
|
||
Reporter | ||
Comment 38•7 years ago
|
||
Reporter | ||
Comment 39•7 years ago
|
||
Reporter | ||
Comment 40•7 years ago
|
||
Reporter | ||
Comment 41•7 years ago
|
||
Assignee | ||
Comment 42•7 years ago
|
||
Comment 43•7 years ago
|
||
Reporter | ||
Comment 44•7 years ago
|
||
Reporter | ||
Comment 45•7 years ago
|
||
Comment 46•7 years ago
|
||
Updated•7 years ago
|
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment 49•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 50•7 years ago
|
||
Comment 51•7 years ago
|
||
Comment 52•7 years ago
|
||
Comment 53•7 years ago
|
||
Assignee | ||
Comment 54•7 years ago
|
||
Assignee | ||
Comment 55•7 years ago
|
||
Comment 56•7 years ago
|
||
Assignee | ||
Comment 58•7 years ago
|
||
Comment 59•7 years ago
|
||
Comment 60•7 years ago
|
||
Assignee | ||
Comment 61•7 years ago
|
||
Comment 62•7 years ago
|
||
Comment 63•7 years ago
|
||
Comment 64•7 years ago
|
||
Comment 65•7 years ago
|
||
Comment 66•7 years ago
|
||
Comment 67•6 years ago
|
||
Updated•6 years ago
|
Comment 69•6 years ago
|
||
Comment 72•6 years ago
|
||
Comment 73•6 years ago
|
||
Comment 74•6 years ago
|
||
I had this issue using Baikal (Sabre's dav implementation).
Setting network.cookie.same-site.enabled = false
worked around the problem.
Owncloud, Nextcloud and Baikal all use the Sabre/dav server, which is the most popular WebDAV framework for PHP. Many apps use it to create WebDAV, CalDAV and CardDAV servers.
Just pointing out that this affects more than just Nextcloud but the issue could be with the Sabre/dav server.
Comment 77•6 years ago
|
||
OK, so the issue in this case is here:
The issue is that because we're using a system principal, there's no parentURI and so when we do the third party checks here:
the call fails which, in turn, means that IsThirdPartyChannel exits with parentIsThird set to true.
The correct thing to do in this case is, from my understanding, to not use a system principal for fetching the resource. Christoph may be able to elaborate on this.
Comment 78•6 years ago
|
||
(In reply to Mark Goodwin [:mgoodwin] from comment #77)
OK, so the issue in this case is here:
Ideally we could pass a context to newChannelFromURI2. If that is not possible for that case, or too hard to accomplish we could fix the problem by actually passing a codebasePrincipal instead of the systemPrincipal. So something like this:
let triggeringPrincipal = Services.scriptSecurityManager.createCodebasePrincipal(aUri, {});
and then us triggeringPrincipal instead of the systemprincipal. Probably worth adding a comment explaining that we are generating a principal from the uri we are about to load to fix that same-site cookie issue.
Assignee | ||
Comment 79•6 years ago
|
||
Marc and Christoph, thank you for the pointer and elaborating on a potential fix. Since this is a sync operation and not a request to display something directly, using the separate principle seems to be the right thing here.
Assignee | ||
Comment 80•6 years ago
|
||
With the attached patch, I was able to sync successfully with a NC demo calendar created at [1] and having network.cookie.same-site.enabled set to true (while the same fails without the patch). Calendars on my Davical test server works with and without it. The same is true for an ics holiday calendar.
Comment 81•6 years ago
|
||
Assignee | ||
Comment 82•6 years ago
|
||
(In reply to Philipp Kewisch [:Fallen] [:๐] from comment #81)
principal or principle? :)
In principle, principal.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 83•6 years ago
|
||
Comment 84•6 years ago
|
||
We will, see: https://mzl.la/2RHUrtC, 8 bugs, 9 with this one.
Comment 85•6 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/94a2a4100e98
Don't use system principal for calendar server connections; r=philipp
Updated•6 years ago
|
Updated•6 years ago
|
Comment 86•6 years ago
|
||
Comment 87•6 years ago
|
||
Comment 88•6 years ago
|
||
TB 65 beta 4, Cal 6.7:
https://hg.mozilla.org/releases/comm-beta/rev/108b096028369815e4b847f4ec88ead5664d69b9 (incl. spelling fixes)
Comment 89•6 years ago
|
||
It looks like the issue reappeared with TB 60.5.0 (32-bit). It's unable to sync CalDAV with Google Calendars.
Setting the config flag to false did not help.
If this issue should be unrelated to the issue dealt with in this thread, I'll open a new bug report.
Assignee | ||
Comment 90•6 years ago
|
||
No, it doesn't - the fix hasn't yet been backported to ESR60 but is available with the latest beta version.
If you want to help out to verify everything is working as expected, download a the current TB beta [1] and test it with a new profile (if you want to test it with your current ESR profile, run the test only on a copy of the same to avoid any harm to your production profile. If you want to go that way, you will need to reset Lightning according to [2] since profile downgrading is not supported).
[1] https://www.thunderbird.net/channel/
[2] https://support.mozilla.org/en-US/kb/calendar-updates-issues-thunderbird#w_lightning-disappears-after-a-thunderbird-update-release-and-beta-versions
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 91•6 years ago
|
||
I've come here to uplift this, so I'm looking at the code again:
+ let principal = aExisting ? null
+ : Services.scriptSecurityManager.createCodebasePrincipal(aUri, {});
This doesn't look correct. aExisting
is described as @param {?nsIChannel} aExisting An existing channel to modify (optional)
. So why is it OK to pass in a channel where a principal is required?
Assignee | ||
Comment 92•6 years ago
|
||
Please read the entire patch (and the code for motre context if needed). In case aExisting is passed, we're not creating a new channel but use the existing one, thus we don't need a principal. The principal creation is just moved to a seperate variable to not exceed the line length.
Comment 93•6 years ago
|
||
Sorry, I got up too early and had "tomatoes on my eyes" (German idiom). Of course, if the existing channel is passed, you use null
for the principal parameter. My apologies! Will uplift and include in the release notes. Sorry again.
Comment 94•6 years ago
|
||
TB 60.5.1 / Cal 6.2.5.1
https://hg.mozilla.org/releases/comm-esr60/rev/2fb08caa568b5905461e7d49c88c7b8e57d85f27
Assignee | ||
Comment 95•6 years ago
|
||
Philipp, we still need 6.2.5.1 target milestone and version.
Updated•6 years ago
|
Comment 96•6 years ago
|
||
Hello bugzilla group,
In our environment we use an network based profile for thunderbird whic is used by windows 7 pro 32 bit and 64 bit clients. No issues with this for a few years. The changes in 62.5.1 cause the following. The lightning addon onyl works on 32 or only on 64 bit clients. If it worked on 32 bit clients the addon must be deactivated and activated on an 64 bit system again to make it work on the 64 bit platform and vice versa. Downgrading to 6.2.5 fixes this issue.
Comment 97•6 years ago
|
||
I'm still unable to sync to Nextcloud with network.cookie.same-site.enabled set to true.
Thunderbird 60.6.0
Fedora 29
Nextcloud 14.0.3
Someone tried to sync after setting network.cookie.same-site.enabled back to true?
Comment 98•6 years ago
|
||
(In reply to Timo Eissler from comment #97)
I'm still unable to sync to Nextcloud with network.cookie.same-site.enabled set to true.
Thunderbird 60.6.0
Fedora 29Nextcloud 14.0.3
Someone tried to sync after setting network.cookie.same-site.enabled back to true?
Tested with TB 60.6.1 on Win10 it seems to work now.
Comment 99•6 years ago
|
||
(In reply to Timo Eissler from comment #97)
I'm still unable to sync to Nextcloud with network.cookie.same-site.enabled set to true.
Someone tried to sync after setting network.cookie.same-site.enabled back to true?
I tried. I am still unable to sync with Nextcloud.
Tested with
- Thunderbird 60.6.1 (64-Bit)
- Lightning 6.2.5
- Ubuntu 16.04.6
- Nextcloud 16.0.0 and 13.0.10
Comment 100•6 years ago
|
||
Note that network.cookie.same-site.enabled was removed in bug 1551821 in the mozilla68 cycle.
Comment 101•6 years ago
|
||
I cannot sync. I have network.cookie.same-site.enabled set true. Same problem if set to false. This is on TB 60.8.0 and Lightning 6.2.8. This is on Debian Buster.
Description
•