TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Great SameSite Confusion

2 点作者 aleksandrh大约 2 年前

1 comment

aleksandrh大约 2 年前
Great article all around.<p>TL;DR: A cross-origin request can still be same site. Also, SameSite cookies do not prevent cookies from being included in malicious requests originating from subdomains because &quot;site&quot; is by definition scheme (e.g., https) plus eTLD+1 (e.g., example.com).<p>Example: <a href="https:&#x2F;&#x2F;subdomain.example.com" rel="nofollow">https:&#x2F;&#x2F;subdomain.example.com</a> can submit a malicious POST to <a href="https:&#x2F;&#x2F;example.com&#x2F;delete-account" rel="nofollow">https:&#x2F;&#x2F;example.com&#x2F;delete-account</a> and the user&#x27;s session cookie would still get included in the request headers. This is why CSRF tokens are commonly employed on top of SameSite cookies as an added layer of protection.