If you do a GETINFO query on onions/detached or onions/current and there aren't any, a 551 error is returned. Most other things just return an empty list/value in this case and I think these should too.
One consequence of this is that if you ask for onions/current with some other keys and there are no current onions, the whole query will fail.
So GETINFO onions/current should return onions/current= instead of an error.
For example you can try carml cmd getinfo orconn-status onions/current to see this behavior.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related.
Learn more.
Looking quickly at Stem's code, I think this is an integration test bug.
That is, I think list_ephemeral_hidden_services should check if it got an empty answer from Tor (similar to other GETINFO empty replies).
That said, I also don't see how that test ever passed since it appears it would re-raise the 552/protocol-error exception that 'getinfo onions/current' does without the patch in this ticket.
Thanks, I'll dig a little more on my end to figure out exactly what about tor's wire response changed and which side the bug lays on. Might not be able to get to this until after the weekend (visiting family, and can no longer build new tor versions on my netbook since it's pretty out of date).
Before:>>> GETINFO onions/current551 No onion services of the specified type.
After:>>> GETINFO onions/current250-onions/current=250 OK
Both responses are valid according to the spec and it doesn't specify what's done when no hidden services exist. Stem specifically looks for the old 551 response, hence the discrepancy.
I wouldn't mind changing stem to recognize the new behavior but this tor change may break folks who presently call list_ephemeral_hidden_services(). So it's a tradeoff - is this behavior change worth that breakage.
(That is, why is there a semantic difference between an empty list, and a list containing an empty string? Neither is a valid ephemeral onion service.)
Hi teor. I'm more than happy to change Stem to recognize the new behavior. The point I was raising is that existing Stem releases will have an issue.
Honestly this is a pretty minor bug. It's an edge case for ephemeral hidden services so I don't see this biting many people. I'd be happy to go either way (change tor and risk a minor breakage for stem users, or keep tor as-is).
atagar: this breaks multi-key GETINFO queries, though; all other "empty things" in the control protocol return an empty-list like that.
So, if you do GETINFO info/names onions/current then you'll get a 551 and the whole thing fails (instead of, for all other cases, getting two answers)...
Gotcha. Personally I find that a compelling reason to go with this change. As mentioned before it's very much an edge case for Stem users and fixing this sounds worth it to me.
Reassigning this to myself to tweak Stem to handle the new responses. Thanks meejah!