[Python-checkins] bpo-41712: Avoid runaway regex match in upload scripts (GH-23166)

zooba webhook-mailer at python.org
Mon Nov 9 12:38:18 EST 2020


https://github.com/python/cpython/commit/1f73c320e2921605c4963e202f6bdac1ef18f2ce
commit: 1f73c320e2921605c4963e202f6bdac1ef18f2ce
branch: master
author: Yash Shete <universeyash4 at gmail.com>
committer: zooba <steve.dower at microsoft.com>
date: 2020-11-09T17:38:09Z
summary:

bpo-41712: Avoid runaway regex match in upload scripts (GH-23166)

files:
M Tools/msi/purge.py

diff --git a/Tools/msi/purge.py b/Tools/msi/purge.py
index a8b8f4d8973c4..27b6b054a445a 100644
--- a/Tools/msi/purge.py
+++ b/Tools/msi/purge.py
@@ -12,7 +12,7 @@
 
 from urllib.request import *
 
-VERSION_RE = re.compile(r'(\d+\.\d+\.\d+)(\w+\d+)?$')
+VERSION_RE = re.compile(r'(\d+\.\d+\.\d+)([A-Za-z_]+\d+)?$')
 
 try:
     m = VERSION_RE.match(sys.argv[1])



More information about the Python-checkins mailing list