Bitcointalk · JSON-RPC password

中本聪,2010 年 7 月 23 日

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

阅读语言
中文译文

我不认为在没有 conf 文件、或配置文件不含 "rpcpassword" 时就该默认禁用认证,但如果配置文件里写的是 "rpcpassword=" 呢?

两边的道理我都懂。

倘若程序员搞不定用他们的语言(Fortran 之类)做 HTTP 认证,或者他们的 JSON-RPC 库压根不支持呢?应不应该允许他们显式关掉密码要求?

话又说回来,倘若有个模板 conf 文件,里面是 rpcpassword= # 在这里填入密码

许多系统不允许无密码登录。譬如这个论坛。Gavin 的观点看起来更有力。

顺便说一句,我没测过,但我希望 conf 文件里 rpcpassword=(空值)是合法的。只有用 -server 或 -daemon 或 bitcoind 时才该报错警告。如果不需要密码,就应该没事。是这样吗?

ORIGINAL · 英文原文
I don't think authentication should be disabled by default if there's no conf file or the config file doesn't contain "rpcpassword", but what if it contains "rpcpassword="?

I can see both points.

What if the programmer can't figure out how to do HTTP authentication in their language (Fortran or whatever) or it's not even supported by their JSON-RPC library?  Should they be able to explicitly disable the password requirement?

OTOH, what if there's a template conf file, with
rpcpassword=  # fill in a password here

There are many systems that don't allow you to log in without a password.  This forum, for instance.  Gavin's point seems stronger.

BTW, I haven't tested it, but I hope having rpcpassword=  in the conf file is valid.  It's only if you use -server or -daemon or bitcoind that it should fail with a warning.  If it doesn't need the password, it should be fine.  Is that right?
来源
Bitcointalk 原始链接 ↗ 记录编号 SN-1445