incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [07/37] git commit: [#6922] Regexp cleanup to prevent freeze on any other unmatched chars
Date Mon, 16 Dec 2013 22:16:07 GMT
[#6922] Regexp cleanup to prevent freeze on any other unmatched chars

The ([...]+)* construct was causing the regexp parser to hang when the
[...] block didn't match.  [42e29a] fixed the proximate cause of the
freezes (filenames including % chars), but that construct was weird
and pointless anyway.

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/fac4ad7a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/fac4ad7a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/fac4ad7a

Branch: refs/heads/db/5424
Commit: fac4ad7a2f9d91a3c4c83d43296aa382162f3185
Parents: 989c053
Author: Cory Johns <admin1@users.sf.net>
Authored: Fri Dec 13 17:22:47 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Fri Dec 13 17:26:38 2013 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/github/tracker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fac4ad7a/ForgeImporters/forgeimporters/github/tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/tracker.py b/ForgeImporters/forgeimporters/github/tracker.py
index d63becf..31ed344 100644
--- a/ForgeImporters/forgeimporters/github/tracker.py
+++ b/ForgeImporters/forgeimporters/github/tracker.py
@@ -245,7 +245,7 @@ class GitHubTrackerImporter(ToolImporter):
         # usual syntax is
         # ![cdbpzjc5ex4](https://f.cloud.github.com/assets/979771/1027411/a393ab5e-0e70-11e3-8a38-b93a3df904cf.jpg)\r\n
         REGEXP = r'!\[[\w0-9]+?\]\(((?:https?:\/\/)?[\da-z\.-]+\.[a-z\.]{2,6}'\
-            '(?:[\/%\w\.-]+)*.(jpg|jpeg|png|gif))\)(\r\n){0,1}'
+            '[\/%\w\.-]*.(jpg|jpeg|png|gif))\)[\r\n]*'
         attachments = []
 
         try:


Mime
View raw message