Use full file path for external library sources

Created on 9 February 2022, over 2 years ago
Updated 24 December 2023, 6 months ago

The auto sources currently automatically add the hostname of included scripts to the CSP. This means that the following library will add https://www.google.com to the script-src and script-src-elem directive.

recaptcha:
  version: 'VERSION'
  js:
    https://www.google.com/recaptcha/api.js: { type: external }

This allows any script to use this host. We should most likely only automatically add the defined script. Any exceptions can then be manually added via the CSP configuration. I'm wondering if we should add an update script to add the hostname to the directives based on the active auto sources, as removing this hostname might result in breaking changes. Ideas?

✨ Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

🇳🇱Netherlands Arkener

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024