Bitcointalk · URI-scheme for bitcoin

中本聪,2010 年 7 月 18 日

SN-0323 已核对来源,附原文与上下文。

阅读语言
中文译文

我想你误解了这个问题。我的浏览器永远可以访问 127.0.0.1(除非奇怪的 IE 设置或病毒作祟)。无论在地址栏输入还是点击链接,都能正常工作。但 Javascript 无法完成跨域(或同域不同端口)的 POST 请求。

我也是这么想的。

对,我是想说跨域的 javascript 调用是被禁止的,所以不能从不位于 127.0.0.1 的 javascript 去调用 127.0.0.1。想想还挺有意思,如果浏览器允许恶意跨域 javascript 改别人的 Facebook 页面之类,那场面一定很欢乐。

现在有消息说,javascript 其实可以跨域对 127.0.0.1 发 POST 请求。不是对别的域,偏偏对这个就行。太好了……

如果确实如此,那就不要在上网用的机器上使用 -server 开关或 bitcoind。

我这就着手加密码字段。

ORIGINAL · 英文原文
I think you're misunderstanding the issue. My browser will always be able to go to 127.0.0.1 (barring some strange IE settings or a virus). If I type the address into the URL bar or click a link, it will work fine. However, it isn't possible to use Javascript to complete POST requests between domains (or ports on the same domain).
That's what I thought too.

Yeah, I meant to say that cross-domain javascript calls are forbidden, so you can't call 127.0.0.1 from a javascript that doesn't reside in 127.0.0.1. Come to think of it, it would be quite funny if browsers allowed malicious cross-domain javascript to change people's Facebook pages etc.
Now I'm hearing a report that it IS possible for javascript to do a cross-domain POST request to 127.0.0.1.  Not other domains, but just specifically to that one.  Great...

If this is the case, then do not use the -server switch or bitcoind on a system where you do web browsing.

I'll get started on adding the password field.
上下文
← 上一条 SN-0323 · 当前 下一条 → 在档案中查看完整主题串 →
来源
Bitcointalk 原始链接 ↗ 记录编号 SN-0323