Problem/Motivation
In some cases, the texfields do not allow all content you want to enter. The example (and possibly only relevant case) I ran into is the feature security header, that can become a very long list of features.
In addition, it can be very hard to check multiple fields at once for similar entries.
Proposed resolution
One proposal was to change the fields to text areas. Especially for the feature security, it might be good to have separate input fields for all possible features, although that would be quite a UX challenge. Would we also need to cater for entering your own features? Or make that a configuration in itself, the offered features in the form..?
Remaining tasks
* Reach concencus.
* Write patch
* Review
User interface changes
The input fields would be changed somehow, to make them more easily inspectable and in case of feature security, allow any input desired.
API changes
None.
Data model changes
Especially the proposed change for feature security would require a different way of storing the configuration.
Original report by dunx
It's very hard to check multiple fields at once for similar entries. Can the majority of fields be changed to use ?
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3340072-8.patch | 14.31 KB | mcdruid |
| #6 | 3340072-6.patch | 14.32 KB | mcdruid |
| #6 | interdiff-3340072-3-6.txt | 2.95 KB | mcdruid |
| #3 | seckit-3340072-field-text-lengths-3.patch | 11.3 KB | penyaskito |
Comments
Comment #2
penyaskitoComment #3
penyaskitoAttached patch with tests, similar to what was done in 7.x-1.x
Comment #5
mcdruid commentedAdding credit from #3083534: Extend length of feature policy field which I've closed as a duplicate.
Comment #6
mcdruid commentedA couple of textfields had been missed, plus added a CSS library to match what we did in the D7 branch.
In the process of adding the CSS library, I think I've found that this library is defined incorrectly:
... I don't think it should have the module name prepended to the library name. That's one for a follow-up issue though.
Comment #7
mcdruid commented#3377694: seckit/listener library incorrectly defined for the JS listener library fix.
Comment #8
mcdruid commentedFix for the JS library meant this patch needed the tiniest of re-rolls.
Comment #10
mcdruid commentedThank you everyone that contributed.
Comment #13
mcdruid commentedAdding credit from #3306932: Allow entering more content in CSP fields which I've closed as a dupe (hope it's not too late to add the credit).
Comment #15
mcdruid commentedAdding credit from another duplicate #3302563: Add textarea type to script-src field.
Comment #17
floris vedder commentedI found that this patch can result in a 502 error due to a to large response header.
So use it with care.
To big header issue
When the response header is to large the server will return a 502 and will log something like: upstream sent too big header while reading response header from upstream, client
Possible solution:
Validation before saving as done on another platform.
https://really-simple-ssl.com/instructions/content-security-policy-maxim....
As stated they first check the impact of the content security policy configuration against the server configuration before saving.
Combination with downloads:
When the configuration is just below the maximum it will work on normal pages but in our case resulted still in the `to big header` issue on downloads. Probably due to additional header info in a download like mime-type. Is the Content-Security-Policy really needed on a download? Otherwise the solution might be to not include it in the header in downloads.