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 摘要。