mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
Allow an optional $ in GETINFO ns/id/<identity>
That's not where I'd want to put a $, but apparently the other foo/id/<identity> things allow it, as does an arguably valid interpretation of control-spec.txt. So let's be consistent. Fix for a piece of bug 7059.
This commit is contained in:
parent
39a0a2c3ae
commit
0e8be13b9f
5
changes/bug7059a
Normal file
5
changes/bug7059a
Normal file
@ -0,0 +1,5 @@
|
||||
o Minor features (controller):
|
||||
- Allow an optional $ before the node identity digest in the
|
||||
controller command GETINFO ns/id/<identity>, for consistency with
|
||||
md/id/<identity> and desc/id/<identity>.
|
||||
|
@ -2374,8 +2374,11 @@ getinfo_helper_networkstatus(control_connection_t *conn,
|
||||
return 0;
|
||||
} else if (!strcmpstart(question, "ns/id/")) {
|
||||
char d[DIGEST_LEN];
|
||||
const char *q = question + 6;
|
||||
if (*q == '$')
|
||||
++q;
|
||||
|
||||
if (base16_decode(d, DIGEST_LEN, question+6, strlen(question+6))) {
|
||||
if (base16_decode(d, DIGEST_LEN, q, strlen(q))) {
|
||||
*errmsg = "Data not decodeable as hex";
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user