Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Enforcing TLS 1.3 seems like a roundabout way to enforce this. Why not simply block requests that don’t have an Origin/Sec-Fetch-Site header?


I don't understand - the article is literally about origin/Sec-Fetch-Site


The article has a whole section about requiring those headers by forcing the use of TLS 1.3 — the theory being that browsers modern enough to support 1.3 are also modern enough to support the headers. But why not just enforce the headers?


If your case is just supporting browsers and not things like curl this seems fine. But when the headers are not set the CSRF protections are "disabled" exactly to support this case, that you may want to do this request using something like curl.


I guess. But it would only impact you if you’re using cookies with curl (I assume the middleware is only applied to requests with cookies?) — and it seems pretty easy to add a -H ‘sec-fetch-site: none’ in that case.


I see what you mean. You were saying why tls in addition to Sec-Fetch-Site. The sibling comment seems to have addressed it




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: