Store CSP sources as a list of values on multiple lines to increase manageability and prevent merge conflicts

Created on 17 October 2023, about 1 year ago
Updated 20 August 2024, 3 months ago

Problem/Motivation

1) On a site that uses many scripts, the lists of source values becomes long, which makes it hard to mange the items.
2) Storing all values of one type of source (e.g. script-src) on a single line, makes it very sensitive for merge conflicts in the configuration file seckit.settings.yml when developing/testing multiple features that need to allow another source of scripts. Fixing such merge conflicts is hard and mistakes are easily made.

Proposed resolution

Use text areas with multiple rows to make it more manageable
Place every item on a separated line in the text area
Store the source items as an array (sequence) of strings (multiple lines in the seckit.settings.yml config file), so different changes to the same csp source can be merged automatically by source control.

User interface changes

Textareas instead of texfields for the sources.

Data model changes

sequences instead of strings for the source configuration items.

Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

🇧🇪Belgium Dozz

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

Comments & Activities

Production build 0.71.5 2024