From f76e5c2336718dca9da8033ba22cd83c72c7b3b3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:14:28 +0200 Subject: Pattern update 1 --- module/plugins/hooks/DeathByCaptcha.py | 2 +- module/plugins/hooks/ImageTyperz.py | 2 +- module/plugins/hooks/MergeFiles.py | 2 +- module/plugins/hooks/UpdateManager.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hooks') diff --git a/module/plugins/hooks/DeathByCaptcha.py b/module/plugins/hooks/DeathByCaptcha.py index d58da9a88..2548506cb 100644 --- a/module/plugins/hooks/DeathByCaptcha.py +++ b/module/plugins/hooks/DeathByCaptcha.py @@ -124,7 +124,7 @@ class DeathByCaptcha(Hook): def submit(self, captcha, captchaType="file", match=None): #workaround multipart-post bug in HTTPRequest.py - if re.match("^[A-Za-z0-9]*$", self.getConfig("passkey")): + if re.match("^\w*$", self.getConfig("passkey")): multipart = True data = (FORM_FILE, captcha) else: diff --git a/module/plugins/hooks/ImageTyperz.py b/module/plugins/hooks/ImageTyperz.py index aaa3c7bbd..b7ee6b105 100644 --- a/module/plugins/hooks/ImageTyperz.py +++ b/module/plugins/hooks/ImageTyperz.py @@ -73,7 +73,7 @@ class ImageTyperz(Hook): try: #workaround multipart-post bug in HTTPRequest.py - if re.match("^[A-Za-z0-9]*$", self.getConfig("passkey")): + if re.match("^\w*$", self.getConfig("passkey")): multipart = True data = (FORM_FILE, captcha) else: diff --git a/module/plugins/hooks/MergeFiles.py b/module/plugins/hooks/MergeFiles.py index 627a9ec3c..5a23ff862 100644 --- a/module/plugins/hooks/MergeFiles.py +++ b/module/plugins/hooks/MergeFiles.py @@ -32,7 +32,7 @@ class MergeFiles(Hook): files = {} fid_dict = {} for fid, data in pack.getChildren().iteritems(): - if re.search("\.[0-9]{3}$", data['name']): + if re.search("\.\d{3}$", data['name']): if data['name'][:-4] not in files: files[data['name'][:-4]] = [] files[data['name'][:-4]].append(data['name']) diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py index fe5808789..b0fe36c9f 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/hooks/UpdateManager.py @@ -150,7 +150,7 @@ class UpdateManager(Hook): updated = [] - vre = re.compile(r'__version__.*=.*("|\')([0-9.]+)') + vre = re.compile(r'__version__.*=.*("|\')([\d.]+)') url = updates[0] schema = updates[1].split('|') if "BLACKLIST" in updates: -- cgit v1.2.3