[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [bridgedb/develop] Revert "Also forbid bogus characters in PT fingerprint and address"
commit 2254b859abf24f437376b94c6c4907f91a04d957
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date: Wed May 6 20:41:31 2015 +0000
Revert "Also forbid bogus characters in PT fingerprint and address"
This reverts commit 44e31908090a0e70dfdd82020a5b89c80e04a6d2.
In the @property setters for b.bridges.BridgeAddressBase.fingerprint and
b.bridges.BridgeAddressBase.address, the functions
b.p.fingerprints.isValidFingerprint() and b.p.addr.isValidIP()
respectively determine whether the attribute will be set. My tests show
that all of {non-ASCII characters, control characters, double quotes,
backslashes} will not make it through either of those validation
functions.
---
lib/bridgedb/bridges.py | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/lib/bridgedb/bridges.py b/lib/bridgedb/bridges.py
index 01bbdd0..4e9ecd1 100644
--- a/lib/bridgedb/bridges.py
+++ b/lib/bridgedb/bridges.py
@@ -351,10 +351,6 @@ class PluggableTransport(BridgeAddressBase):
characters or double quotes or backslashes, in keys or
in values.
- 3. The :data:`fingerprint` and :data:`address` do not
- contain non-ASCII or control characters or double quotes
- or backslashes.
-
:raises MalformedPluggableTransport: if any of the above checks fails.
"""
if not self.fingerprint:
@@ -390,28 +386,6 @@ class PluggableTransport(BridgeAddressBase):
% (k, v))
pass
- if not isascii_noncontrol(self.fingerprint):
- raise MalformedPluggableTransport(
- ("Cannot create PluggableTransport with non-ASCII or "
- "control characters in fingerprint: %r")
- % self.fingerprint)
- if '"' in self.fingerprint or '\\' in self.fingerprint:
- raise MalformedPluggableTransport(
- ("Cannot create PluggableTransport with double quotes or "
- "backslashes in fingerprint: %r")
- % self.fingerprint)
-
- if not isascii_noncontrol(self.address):
- raise MalformedPluggableTransport(
- ("Cannot create PluggableTransport with non-ASCII or "
- "control characters in address: %r")
- % self.address)
- if '"' in self.address or '\\' in self.address:
- raise MalformedPluggableTransport(
- ("Cannot create PluggableTransport with double quotes or "
- "backslashes in address: %r")
- % self.address)
-
if not self._checkArguments():
raise MalformedPluggableTransport(
("Can't use %s transport with missing arguments. Arguments: "
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits