Closed Bug 1963467 Opened 4 months ago Closed 3 months ago

[debug only] Crash when adding news account ("AccountWizard.xhtml does not have a CSP!")

Categories

(Thunderbird :: Account Manager, defect)

defect

Tracking

(thunderbird_esr128 unaffected, thunderbird139 affected)

RESOLVED FIXED
140 Branch
Tracking Status
thunderbird_esr128 --- unaffected
thunderbird139 --- affected

People

(Reporter: francesco, Assigned: mkmelin)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

  1. Run a debug build.
  2. Try to add a news account in the Account settings.
[14608] Hit MOZ_CRASH(Document (chrome://messenger/content/AccountWizard.xhtml) does not have a CSP!) at /builds/worker/checkouts/gecko/dom/security/nsContentSecurityUtils.cpp:1991

The message seems to be wrong as the page has CSP. However, it also has inline styles.

CSP:
https://searchfox.org/comm-central/rev/45f8c5bb09a833038a6d3ff06a3ee552663b45e5/mailnews/base/prefs/content/AccountWizard.xhtml#42-45

Inline styles:
https://searchfox.org/comm-central/rev/45f8c5bb09a833038a6d3ff06a3ee552663b45e5/mailnews/base/prefs/content/AccountWizard.xhtml#115,136

That's a xul <window> doc still, so I guess we'll have to add the XUL version of CSP, like https://searchfox.org/mozilla-central/rev/e703d3fbd6da82cdda1256016a80abb1f245fedd/toolkit/components/prompts/content/commonDialog.xhtml#6, or convert the file to top level html.

Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED

(In reply to Francesco from comment #3)

Will that work given the

It should, as that's what the CSP says should be allowed.
I didn't not actually run this in a debug build, but I verified the onload script ran (it wouldn't on release builds, if it was blocked by csp)

Good find on those others, I can add them here.

(In reply to Magnus Melin [:mkmelin] from comment #4)

It should, as that's what the CSP says should be allowed.

The syntax isn't clear to me and it doesn't appear to be documented anywhere. I patched omni.ja in my debug build and your change works. Thanks.

  • glodaVacetView.xhtml has a correct csp
  • converterDialog.xhtml also has a crorrect csp already

(In reply to Francesco from comment #5)
https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP has some documentation. Since there are mozilla-internal protocols involved it's somewhat more complex, but the documentation still applies

about:policies it seems is currently not easily accessible from within Thunderbird. But you can set it as startpage...

Keywords: leave-open
Target Milestone: --- → 140 Branch
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/3f3a08b4a492 Add XUL version of CSP to mailnews/base/prefs/content/AccountWizard.xhtml. r=arschmitz

Pushed by brendan@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/29ca4ca99314
add CSP to about:policies. r=john.bieling

Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: