[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [oonib/master] Make the CC regexp also more accurate



commit 9958da22a3f6001e6e517c0a1e0c905cdd6c6ef8
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