github / github/secure_headers

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

Abierto
#448 1 comentario 1 reacción 2 asignados Reclamado por @fletchto99 Ver en GitHub
Lenguaje dominante
Ruby
Estrellas
3.2k
Forks
253
Merge medio
19 h 11 min
PR fusionados (30 d)
1

Descripción

# 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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.