{"action":"opened","issue":{"url":"https://api.github.com/repos/whatwg/fetch/issues/313","repository_url":"https://api.github.com/repos/whatwg/fetch","labels_url":"https://api.github.com/repos/whatwg/fetch/issues/313/labels{/name}","comments_url":"https://api.github.com/repos/whatwg/fetch/issues/313/comments","events_url":"https://api.github.com/repos/whatwg/fetch/issues/313/events","html_url":"https://github.com/whatwg/fetch/issues/313","id":158225009,"number":313,"title":"Listing headers safe only for certain values is a bad idea","user":{"login":"sicking","id":1831914,"avatar_url":"https://avatars.githubusercontent.com/u/1831914?v=3","gravatar_id":"","url":"https://api.github.com/users/sicking","html_url":"https://github.com/sicking","followers_url":"https://api.github.com/users/sicking/followers","following_url":"https://api.github.com/users/sicking/following{/other_user}","gists_url":"https://api.github.com/users/sicking/gists{/gist_id}","starred_url":"https://api.github.com/users/sicking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sicking/subscriptions","organizations_url":"https://api.github.com/users/sicking/orgs","repos_url":"https://api.github.com/users/sicking/repos","events_url":"https://api.github.com/users/sicking/events{/privacy}","received_events_url":"https://api.github.com/users/sicking/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-02T19:51:59Z","updated_at":"2016-06-02T19:51:59Z","closed_at":null,"body":"I just noticed that the headers `DPR`, `Downlink`, `Save-Data`, `Viewport-Width` and `Width` have been listed as \"safe\" headers only for certain values.\r\n\r\nI think this is a bad idea. Having only certain values be considered safe introduces complexity in a security API. This increases the risk that something will go wrong and that security bugs will ensue.\r\n\r\nConsider for example https://bugs.chromium.org/p/chromium/issues/detail?id=490015 which is a recent example of a case where such complexity has lead to a security bug which has remained in Chrome for over a year and which is unclear if it will ever get fixed.\r\n\r\nAnother reason to not consider these headers safe only for certain values is that the set of values is bound to change over time. As the specification for those headers evolve over time, so will the the set of values that will parse successfully.\r\n\r\nAre we expecting website developers to constantly monitor these specifications and adjust their server side code as it can get exposed to new request headers?"}}
{"actor":{"display_login":"sicking"}}