Replace ServerDescriptor#getHiddenServiceDirVersions with ServerDescriptor#isHiddenServiceDir
Tor has never supported versions in the hidden-service-dir descriptor line. See the recently closed #25284 (moved).
We should probably reflect this by replacing ServerDescriptor#getHiddenServiceDirVersions
with ServerDescriptor#isHiddenServiceDir
.
I'm posting a branch in a minute.
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Author
Please review commit 89edb21 in my task-25712 branch.
Trac:
Status: assigned to needs_review
Priority: Medium to Low Hi Karsten,
I think that testHiddenServiceDirVersions2And3() should not throw a parse error. Extra arguments are allowed at the end of directory lines, unless specifically prohibited in the spec: https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt#n261
The spec change in #25284 (moved) documents that tor has always ignored version arguments on this line. It does not make trailing arguments invalid, and some non-tor implementations may use them.
Trac:
Status: needs_review to needs_revision- Author
Huh, good point. I just added commit 55b0a4f to change that behavior and update the test. Thanks! Setting to needs_review again.
Trac:
Status: needs_revision to needs_review - Author
Right, but thanks for reviewing anyway! Not sure if we'd have spotted this team-internally.
Always fine to have more eyes reviewing!
Code seems fine; I'd only suggest using the 'default' method in ServerDescriptor, see this commit.
Trac:
Status: needs_review to merge_ready- Author
Hmm, is that really what 'default' methods are supposed to be used for? Adding a method body to an interface method feels, well, just wrong. Hmmm.
Well, this is not a real method, but the default behavior; cf. for example Oracle's tutorial.
- Author
Given that this is now a deprecated method, let's not start using new Java features there. That method is going away when we bump to version 3.0.0 anyway. Squashed my branch and merged to master. Closing. Thanks!
Trac:
Status: merge_ready to closed
Resolution: N/A to fixed - Trac closed
closed