Page MenuHomePhabricator

new CSP only allows localhost over TLS
Closed, ResolvedPublicBUG REPORT

Description

Loading JavaScript through a local server is typically used in development of userscripts. The CSP change earlier added https://localhost but not http://localhost. I don't know whether there's any risk of eavesdropping from Wikipedia to localhost. 127.0.0.1 might also need to be added.

Event Timeline

If possible, I'd like to request that localhost:* also be allowed. Without this, web servers would need to run on port 443 only (for https), which usually requires admin privileges and is a bit too inconvenient.

We plan to add support for http://localhost - thanks for flagging this.

We are now supporting http://localhost:* and https://localhost:* within the enforcing CSP, which hopefully unblocks this issue. (relevant config patch)

Catrope assigned this task to sbassett.

Change #1249348 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/1249348

Change #1249348 merged by Scott French:

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

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