github / github/secure_headers

Validation on plugin-types does not allow for the empty directive

Ouverte
#448 1 commentaire 1 réaction 2 personnes assignées Réclamée par @fletchto99 Voir sur GitHub
Langage dominant
Ruby
Étoiles
3.2k
Forks
253
Merge moyen
19 h 11 min
PR mergées (30 j)
1

Description

# Bugs

> Note: The plugin-types grammar allows for an empty directive value in which case all instantions of embed and object will fail.

https://w3c.github.io/webappsec-csp/#directive-plugin-types

We validate it must match something like `application/pdf` which is not correct.

### Expected outcome

Describe what you expected to happen

`plugin_types` should allow for an empty directive. Sending an empty array omits the directive. Sending `none` is not allowed by validation. An array of empty strings doesn't work either (validation)

### Actual outcome

Configuration errors when trying to do the right thing

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.