[tor-commits] [oonib/master] Make the CC regexp also more accurate
art at torproject.org
art at torproject.org
Wed Apr 23 14:31:51 UTC 2014
commit 9958da22a3f6001e6e517c0a1e0c905cdd6c6ef8
Author: Arturo Filastò <art at fuffa.org>
Date: Thu Mar 27 22:10:07 2014 +0100
Make the CC regexp also more accurate
---
bin/archive_oonib_reports | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/archive_oonib_reports b/bin/archive_oonib_reports
index 7d5ecfd..ba4d473 100755
--- a/bin/archive_oonib_reports
+++ b/bin/archive_oonib_reports
@@ -50,7 +50,7 @@ def validate_fields(fields):
# or not we should support > 2 character CC
if fields['probe_cc'] is None:
fields['probe_cc'] = default_probe_cc
- if not re.match('[A-Z\?]{2,4}$', fields['probe_cc'].upper()):
+ if not re.match('^[A-Z\?]{2,4}$', fields['probe_cc'].upper()):
raise InvalidReportField('probe_cc')
# check report ASN
More information about the tor-commits
mailing list