[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [oonib/master] Make the CC regexp also more accurate
commit 40930004c23163d0c38423026bd4e14e9942846d
Author: Arturo Filastò <art@xxxxxxxxx>
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
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits