You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2013/12/16 23:16:07 UTC
[07/37] git commit: [#6922] Regexp cleanup to prevent freeze on any
other unmatched chars
[#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 <cj...@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 <ad...@users.sf.net>
Authored: Fri Dec 13 17:22:47 2013 +0000
Committer: Cory Johns <cj...@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
# \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: