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

[tor-commits] [stem/master] Treat versions with whitespace in them as invalid



commit 50a240d7ff83a435a75d54c90d52088cd723c450
Author: Ravi Chandra Padmala <neenaoffline@xxxxxxxxx>
Date:   Sun Mar 25 23:04:13 2012 +0530

    Treat versions with whitespace in them as invalid
---
 stem/version.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stem/version.py b/stem/version.py
index 8afd52b..eb0f707 100644
--- a/stem/version.py
+++ b/stem/version.py
@@ -92,7 +92,7 @@ class Version:
     """
     
     self.version_str = version_str
-    m = re.match(r'^([0-9]+)\.([0-9]+)\.([0-9]+)(\.[0-9]+)?(-.*)?$', version_str)
+    m = re.match(r'^([0-9]+)\.([0-9]+)\.([0-9]+)(\.[0-9]+)?(-\S*)?$', version_str)
     
     if m:
       major, minor, micro, patch, status = m.groups()



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits