github / github/secure_headers

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

未关闭
#448 1 条评论 1 个 reaction 已指派 2 人 已被 @fletchto99 认领 在 GitHub 查看
主要语言
Ruby
星标
3.2k
派生
253
平均合并
19 小时 11 分钟
30 天内合并 PR
1

描述

# 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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。