Closed Bug 1906077 Opened 7 months ago Closed 4 months ago

ics calendar can't be added when redirection is involved

Categories

(Calendar :: Provider: ICS/WebDAV, defect)

Thunderbird 115
defect

Tracking

(thunderbird_esr115 unaffected, thunderbird_esr128+ fixed, thunderbird130+ affected, thunderbird131 fixed)

RESOLVED FIXED
132 Branch
Tracking Status
thunderbird_esr115 --- unaffected
thunderbird_esr128 + fixed
thunderbird130 + affected
thunderbird131 --- fixed

People

(Reporter: olly, Assigned: mkmelin)

References

(Blocks 2 open bugs)

Details

(Keywords: regression)

Attachments

(5 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0

Steps to reproduce:

(using 115.12.2)

Use New Calendar > On The Network to subscribe to the public webcal calendar at this link: webcal://github.com/othyn/go-calendar/releases/latest/download/gocal__community_day.ics

Actual results:

In the properties of the newly created calendar, the location shows up as:
https://objects.githubusercontent.com/github-production-release-asset-2e65be/580172601/f87b4565-6de2-4c8d-9fb1-12a1d2307626?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240703%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240703T110438Z&X-Amz-Expires=300&X-Amz-Signature=d02b2a2b4919492709d2f2966f93f8de8ca81307842ef4159d1e4b5f4dcea339&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=580172601&response-content-disposition=attachment%3B%20filename%3Dgocal__community_day.ics&response-content-type=application%2Foctet-stream

The resulting calendar then works for one day but then disables itself and cannot be re-enabled (if I try to enable the calendar, it immediately disables itself again).

Expected results:

I believe the location should have stayed as webcal://github.com/othyn/go-calendar/releases/latest/download/gocal__community_day.ics. I think this issue is happening because the calendar at the webcal link updates to a new file every day, so the specific link that Thunderbird resolves to becomes invalid on a daily basis. Other calendar applications that I use (like the iOS calendar app and the web interface for mailbox.org) do not resolve the link (they just leave it as webcal://github.com/othyn/go-calendar/releases/latest/download/gocal__community_day.ics) and they work fine, which is why I think the link resolution is causing the issue.

Attached image The resulting calendar
Component: Untriaged → Provider: ICS/WebDAV
OS: Unspecified → Windows 10
Product: Thunderbird → Calendar
Hardware: Unspecified → Desktop
Component: Provider: ICS/WebDAV → Provider: CalDAV
Component: Provider: CalDAV → Provider: ICS/WebDAV

While this calendar will add using redirection in V115.12.2

I can not add it at all in the daily build the wizard simply states there is no calendar found.

Name Thunderbird
Version 129.0a1
Build ID 20240705045653

Same result in Beta
Name Thunderbird
Version 128.0b6
Build ID 20240701153450

Has someone inadvertently removed remote support for ICS files? via HTTPS or WEBCAL

This may impact the V128 release if web based ICS files are not functioning.

Any suggestions here Wayne?

Flags: needinfo?(vseerror)

Anyone else using webcal can reproduce?

Flags: needinfo?(vseerror)

In TB 128.0b6 (64-bit) I don't seems to be able to add a freely accessible webcal calendar such as...
webcal://www.webcal.guru/fr-FR/t%C3%A9l%C3%A9charger_le_calendrier?calendar_instance_id=269
as found here https://www.webcal.guru/fr-FR/calendriers

I get error message attached.

Could not find calendars at this location. Please check your settings.

I tried with and without authentication, with or without offline support. Same issue.

So might be an issue with Thunderbird. Here is the error message from Console:

Calendar: Error during calendar detection: resource:///modules/calendar/utils/calProviderDetectionUtils.sys.mjs:17: NoneFoundError
DetectionError@resource:///modules/calendar/utils/calProviderDetectionUtils.sys.mjs:17:1
@resource:///modules/calendar/utils/calProviderDetectionUtils.sys.mjs:28:7
detect@resource:///modules/calendar/utils/calProviderDetectionUtils.sys.mjs:162:26
async*findCalendars@chrome://calendar/content/calendar-creation.js:668:6
accept@chrome://calendar/content/calendar-creation.js:41:9
_fireButtonEvent@chrome://global/content/elements/dialog.js:515:19
_doButtonCommand@chrome://global/content/elements/dialog.js:494:29
_handleButtonCommand@chrome://global/content/elements/dialog.js:488:19
EventListener.handleEvent*_configureButtons@chrome://global/content/elements/dialog.js:391:16
connectedCallback@chrome://global/content/elements/dialog.js:103:12
@chrome://global/content/customElements.js:211:21
EventListener.handleEvent*@chrome://global/content/customElements.js:203:10
@chrome://global/content/customElements.js:889:3
observe@resource://gre/modules/CustomElementsListener.sys.mjs:22:31
calendar-creation.js:744:7
    onDetectionError chrome://calendar/content/calendar-creation.js:744
    (Async: promise callback)
    findCalendars chrome://calendar/content/calendar-creation.js:676
    accept chrome://calendar/content/calendar-creation.js:41
    _fireButtonEvent chrome://global/content/elements/dialog.js:515
    _doButtonCommand chrome://global/content/elements/dialog.js:494
    _handleButtonCommand chrome://global/content/elements/dialog.js:488
    (Async: EventListener.handleEvent)
    _configureButtons chrome://global/content/elements/dialog.js:391
    connectedCallback chrome://global/content/elements/dialog.js:103
    <anonymous> chrome://global/content/customElements.js:211
    (Async: EventListener.handleEvent)
    <anonymous> chrome://global/content/customElements.js:203
    <anonymous> chrome://global/content/customElements.js:889
    observe resource://gre/modules/CustomElementsListener.sys.mjs:22

With Firefox I can download the .ics, but I can't subscribe in Daily. For https://github.com/othyn/go-calendar/releases/latest/download/gocal__community_day.ics (which after a double redirect resolves as application/octet-stream, content-disposition: attachment; filename=gocal__community_day.ics)

I suspsect it's the double redirect that's not anticipated.
https://searchfox.org/comm-central/rev/357f10f63c8f798093aadc02ea9217d791251dbe/calendar/providers/ics/CalICSProvider.sys.mjs#279

Assignee: nobody → mkmelin+mozilla
Blocks: tb128found
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: regression
OS: Windows 10 → All
Hardware: Desktop → All
Summary: Webcal Links Resolving Incorrectly → ics calendar can't be added when redirection is involved

To test, subscribe to https://github.com/othyn/go-calendar/releases/latest/download/gocal__community_day.ics

Also

  • don't fail for cases there content-type is null
  • accept for content-type=application/octet-stream where the Content-Disposition says it's an .ics
Attachment #9422225 - Attachment description: Bug 1906077 - ICS calendar subscriptions should use the original URI for temporal redirects. r=#thunderbird-reviewers → Bug 1906077 - ICS calendar subscriptions should use the original URI for temporary redirects. r=#thunderbird-reviewers

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/5ca039a0cad6
ICS calendar subscriptions should use the original URI for temporary redirects. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
Depends on: 1917425

Ready for beta?

Comment on attachment 9422225 [details]
Bug 1906077 - ICS calendar subscriptions should use the original URI for temporary redirects. r=#thunderbird-reviewers

[Approval Request Comment]
Regression caused by (bug #): unknown
User impact if declined: can't subscribe to .ics calendars in some situations
Testing completed (on c-c, etc.): c-c
Risk to taking this patch (and alternatives if risky): pretty safe, but also needs bug 1917425

Attachment #9422225 - Flags: approval-comm-esr128?
Attachment #9422225 - Flags: approval-comm-beta?

Comment on attachment 9422225 [details]
Bug 1906077 - ICS calendar subscriptions should use the original URI for temporary redirects. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

Attachment #9422225 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9422225 [details]
Bug 1906077 - ICS calendar subscriptions should use the original URI for temporary redirects. r=#thunderbird-reviewers

[Triage Comment]
Approved for esr128

Attachment #9422225 - Flags: approval-comm-esr128? → approval-comm-esr128+
Attached image tb131.0b5.png

(In reply to Daniel Darnell [:dandarnell] from comment #12)

Thunderbird 131.0b5:
https://hg.mozilla.org/releases/comm-beta/rev/52c38ca3b86d

The patch does not seems to work in TB 131.0b5 with webcal://www.webcal.guru/fr-FR/t%C3%A9l%C3%A9charger_le_calendrier?calendar_instance_id=269 (Comment 5).

See result attached. Still get Could not find calendar's at this location. Check your settings.

While I can subscribe to this calendar in TB 115.13.0 (32-bit) without issue.

I can confirm comment 14 doesn't work. But it's another issue.
In the console I get `The resource at “https://www.webcal.guru/fr-FR/t%C3%A9l%C3%A9charger_le_calendrier?calendar_instance_id=269” was blocked by OpaqueResponseBlocking. Reason: “after sniff: nosniff is true”.´ This request does work using fetch() though so I'm not sure what's wrong.

Richard, can you open another bug for this?

Flags: needinfo?(richard.leger)
Blocks: 1920710

(In reply to Corey Bryant from comment #16)

Richard, can you open another bug for this?

Done. Bug 1920710.

Flags: needinfo?(richard.leger)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: