commit f7fb726cc3dea8bfd294833b151117858490802d Author: Damian Johnson atagar@torproject.org Date: Wed May 23 10:00:04 2012 -0700
Removing expectation that bridge nicknames are scrubbed
Karsten plans to stop scrubbing bridge descriptor nicknames, so removing that expectation from the 'is_scrubbed()' method. --- stem/descriptor/server_descriptor.py | 8 ++++---- test/unit/descriptor/server_descriptor.py | 1 - 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/stem/descriptor/server_descriptor.py b/stem/descriptor/server_descriptor.py index 0014ff5..f7d3437 100644 --- a/stem/descriptor/server_descriptor.py +++ b/stem/descriptor/server_descriptor.py @@ -720,11 +720,11 @@ class BridgeDescriptor(ServerDescriptor):
if self._scrubbing_issues == None: issues = [] - if self.nickname != "Unnamed": - issues.append("Router line's nickname should be scrubbed to be 'Unnamed': %s" % self.nickname) - elif not self.address.startswith("10."): + + if not self.address.startswith("10."): issues.append("Router line's address should be scrubbed to be '10.x.x.x': %s" % self.address) - elif self.contact and self.contact != "somebody": + + if self.contact and self.contact != "somebody": issues.append("Contact line should be scrubbed to be 'somebody', but instead had '%s'" % self.contact)
for address, _, is_ipv6 in self.address_alt: diff --git a/test/unit/descriptor/server_descriptor.py b/test/unit/descriptor/server_descriptor.py index 0eb4891..53b4675 100644 --- a/test/unit/descriptor/server_descriptor.py +++ b/test/unit/descriptor/server_descriptor.py @@ -333,7 +333,6 @@ class TestServerDescriptor(unittest.TestCase): """
unsanitized_attr = [ - {"router": "caerSidi 10.45.227.253 9001 0 0"}, {"router": "Unnamed 75.45.227.253 9001 0 0"}, {"contact": "Damian"}, {"or-address": "71.35.133.197:9001"},
tor-commits@lists.torproject.org