Page MenuHomePhabricator

Extensions and some localizations of InPageEdit NEXT are blocked by CSP
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

Load InPageEdit NEXT as recommended on their home page:

// InPageEdit NEXT
document.body.append(
  Object.assign(document.createElement('script'), {
    src: 'https://cdn.jsdelivr.net/npm/@inpageedit/core/dist/index.js',
    type: 'module',
  })
)

What happens?:

Localizations and extensions stopped working. For example, the "quick edit" dialog shows "watchlist.preferences" in place of "follow MediaWiki preferences", and the "plugin store" in "settings" reports that all extensions cannot be loaded.

What should have happened instead?:

They should all load.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

  • MediaWiki: WMF (zhwiki)
  • InPageEdit NEXT: 0.17.0

Other information (browser name/version, screenshots, etc.):

This is clearly a CSP issue, so I am reporting it here instead of upstream.

Event Timeline

[Removing needlessly copied subscribers from the parent task]

Sending your personal information without a warning to third-party cdn.jsdelivr.net looks more like a privacy leak / poor design than a feature to me.

@dragon-fish, the gadget's maintainer, is intentional here.

Hmm, *.jsdelivr.net is currently allow-listed within the enforcing CSP:

https://gerrit.wikimedia.org/r/plugins/gitiles/operations/puppet/+/refs/heads/production/modules/varnish/templates/text-frontend.inc.vcl.erb#840

Is the CSP actually blocking requests to cdn.jsdelivr.net or are they report-only warnings within the browser?

Loading that script in a private browsing window (ie. logged-out), I get the following CSP-related messages in my console:

Connecting to 'https://registry.ipe.wiki/i18n/index.json' violates the following Content Security Policy directive: [...]
Fetch API cannot load https://registry.ipe.wiki/i18n/index.json. Refused to connect because it violates the document's Content Security Policy.
Connecting to 'https://analytics.ipe.wiki/api/v6/submit' violates the following Content Security Policy directive: [...]

So it seems like it's not jsdelivr itself that's blocked, but some sites the loaded script then seems to call.

Change #1251550 had a related patch set uploaded (by SBassett; author: SBassett):

[operations/puppet@production] Allow-list some additional domains to the currently enforcing CSP

https://gerrit.wikimedia.org/r/1251550

1F616EMO changed the task status from Open to In Progress.Mar 14 2026, 7:35 AM
1F616EMO assigned this task to sbassett.
1F616EMO triaged this task as Low priority.
BucheonCityHall raised the priority of this task from Low to Unbreak Now!.

hahah

BucheonCityHall changed the subtype of this task from "Bug Report" to "Deadline".Mar 14 2026, 7:44 AM

ㅋㅋㅋ

1F616EMO reassigned this task from BucheonCityHall to sbassett.
1F616EMO lowered the priority of this task from Unbreak Now! to Low.
1F616EMO edited subscribers, added: sbassett, SomeRandomDeveloper, dragon-fish and 2 others; removed: BucheonCityHall.
1F616EMO changed the subtype of this task from "Deadline" to "Bug Report".Mar 14 2026, 7:51 AM

It would be much better if we simply move the js to https://cdnjs.toolforge.org/ instead?

It would be much better if we simply move the js to https://cdnjs.toolforge.org/ instead?

Ultimately, yes, IMO.

Change #1251550 merged by BCornwall:

[operations/puppet@production] Allow-list some additional domains to the currently enforcing CSP

https://gerrit.wikimedia.org/r/1251550

@1F616EMO Can we call this task resolved for now, given that the ipe.wiki domains are now allow-listed in Wikimedia production? If there are any additional issues that surface, we can re-open this task.

sbassett moved this task from In Progress to Our Part Is Done on the Security-Team board.

I'm going to resolve this task for now. If any additional issues come up, please feel free to re-open.