[evolution] Change URL and e-mail pattern regular expressions
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Change URL and e-mail pattern regular expressions
- Date: Tue, 6 Sep 2016 16:41:30 +0000 (UTC)
commit 41630182352eece73fb0d9185e01e6c38ae4f713
Author: Milan Crha <mcrha redhat com>
Date: Tue Sep 6 18:37:43 2016 +0200
Change URL and e-mail pattern regular expressions
The evolution could crash when replying to an HTML message inside pcre
library recursion, which could cause stack overflow.
This had been reported downstream at:
https://bugzilla.redhat.com/show_bug.cgi?id=1370514
.../web-extension/e-editor-dom-functions.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/modules/webkit-editor/web-extension/e-editor-dom-functions.h
b/modules/webkit-editor/web-extension/e-editor-dom-functions.h
index 67481f1..8ea0982 100644
--- a/modules/webkit-editor/web-extension/e-editor-dom-functions.h
+++ b/modules/webkit-editor/web-extension/e-editor-dom-functions.h
@@ -27,8 +27,8 @@
/* stephenhay from https://mathiasbynens.be/demo/url-regex */
#define URL_PROTOCOLS "news|telnet|nntp|file|https?|s?ftp|webcal|localhost|ssh"
-#define URL_PATTERN_BASE "(?=((?:(?:(?:" URL_PROTOCOLS
")\\:\\/\\/)|(?:www\\.|ftp\\.))[^\\s\\/\\$\\.\\?#].[^\\s]*)"
-#define URL_PATTERN_NO_NBSP ")((?:(?! ).)*)"
+#define URL_PATTERN_BASE "(?=((?:(?:(?:" URL_PROTOCOLS
")\\:\\/\\/)|(?:www\\.|ftp\\.))[^\\s\\/\\$\\.\\?#].[^\\s]*+)"
+#define URL_PATTERN_NO_NBSP ")((?:(?! ).)*+)"
#define URL_PATTERN URL_PATTERN_BASE URL_PATTERN_NO_NBSP
#define URL_PATTERN_SPACE URL_PATTERN_BASE "\\s$" URL_PATTERN_NO_NBSP
/* Taken from camel-url-scanner.c */
@@ -37,7 +37,7 @@
/* http://www.w3.org/TR/html5/forms.html#valid-e-mail-address */
#define E_MAIL_PATTERN \
"[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}"\
- "[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*"
+ "[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*+"
#define E_MAIL_PATTERN_SPACE E_MAIL_PATTERN "\\s"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]