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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Facebook will POST data to apps

26 点作者 ptarjan超过 14 年前

3 条评论

aloneinkyoto超过 14 年前
This solution is utterly stupid. Why do they pay their engineers millions of dollars if they don't even know the basic semantics of the HTTP protocol?<p>Per RFC 2616, the POST method should be used for any context in which a request is non-idempotent: that is, it causes a change in server state each time it is performed, such as submitting a comment to a blog post or voting in an online poll.<p>The solution to the security problem is to not pass the authentication data in the query string which is intended for specifying parameters that vary the result of the performed query. Instead the authentication data should be passed as custom HTTP headers. E.g. "X-Fb-Sig-User: 218471".<p>I am very amazed that this is not common knowledge. This is a 20 years old protocol that might possibly be the most widely used and implemented high level communication protocol in human history. Get your shit together people. Seriously!<p>edit: I guess I was a bit quick to judge. Didn't realize that the request originates from an iframe in a browser where you can't easily set custom HTTP headers. Maybe it is possible to do with some XMLHttpRequest magic, but I can't think of a solution that would work of the top of my head.
评论 #1937135 未加载
评论 #1937168 未加载
ericflo超过 14 年前
I'm not excited about having to go through all my apps to update them for this. It's going to be hours of work, followed by weeks of users reporting subtle bugs that cropped up as a result.<p>This kind of frequent, sweeping change is the reason why people despise the Facebook platform.
评论 #1937036 未加载
评论 #1937037 未加载
samstokes超过 14 年前
Looks like this is a response to the privacy breach reported last month by the Wall Street Journal: <a href="http://online.wsj.com/article/SB10001424052702304772804575558484075236968.html" rel="nofollow">http://online.wsj.com/article/SB1000142405270230477280457555...</a> (HN thread <a href="http://news.ycombinator.com/item?id=1801898" rel="nofollow">http://news.ycombinator.com/item?id=1801898</a>)<p>From that article:<p><i>It's not clear if developers of many of the apps transmitting Facebook ID numbers even knew that their apps were doing so. The apps were using a common Web standard, known as a "referer," which passes on the address of the last page viewed when a user clicks on a link. On Facebook and other social-networking sites, referers can expose a user's identity.</i><p>From this article:<p><i>Sadly, all those parameters [identifying the Facebook user etc] go in the URL [by which your Facebook app is invoked] and if you app includes any other external resources (iframes, imgs, scripts, etc.) that sensitive data gets passed along to them in the HTTP Referer header.</i>