commit beb5b25c62fb36c600f25178e1121661efd962c0 Author: aagbsn aagbsn@extc.org Date: Fri Feb 22 18:58:00 2013 +0100
Make sure the collector address is at least the minimum length required --- ooni/reporter.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ooni/reporter.py b/ooni/reporter.py index f89d5bd..69d4892 100644 --- a/ooni/reporter.py +++ b/ooni/reporter.py @@ -254,7 +254,8 @@ class OONIBReporter(OReporter): if the oonib reporter is not valid. """ regexp = '^(http|httpo)://[a-zA-Z0-9-.]+(:\d+)?$' - if not re.match(regexp, self.collectorAddress): + if not re.match(regexp, self.collectorAddress) or \ + len(self.collectorAddress) < 30: raise InvalidOONIBCollectorAddress
@defer.inlineCallbacks
tor-commits@lists.torproject.org