diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-05 21:15:30 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-05 21:15:30 +0300 |
commit | 4e8e62653549123e813707cdda4bc2526e9d59d0 (patch) | |
tree | 0ec0fc04afeea606416b5af8debc6a1bbd672870 | |
parent | b9ce4093ed176e3614e2ea2cc2416cd1070dc1df (diff) |
Only accept valid characters in URI schemes
IssueID #269
-rw-r--r-- | src/gmutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gmutil.c b/src/gmutil.c index 57d7e350..2a4f4728 100644 --- a/src/gmutil.c +++ b/src/gmutil.c | |||
@@ -43,7 +43,7 @@ void init_Url(iUrl *d, const iString *text) { | |||
43 | static iRegExp *urlPattern_; | 43 | static iRegExp *urlPattern_; |
44 | static iRegExp *authPattern_; | 44 | static iRegExp *authPattern_; |
45 | if (!urlPattern_) { | 45 | if (!urlPattern_) { |
46 | urlPattern_ = new_RegExp("^(([^:/?#]+):)?(//([^/?#]*))?" | 46 | urlPattern_ = new_RegExp("^(([-.+a-z0-9]+):)?(//([^/?#]*))?" |
47 | "([^?#]*)(\\?([^#]*))?(#(.*))?", | 47 | "([^?#]*)(\\?([^#]*))?(#(.*))?", |
48 | caseInsensitive_RegExpOption); | 48 | caseInsensitive_RegExpOption); |
49 | authPattern_ = new_RegExp("(([^@]+)@)?(([^:\\[\\]]+)" | 49 | authPattern_ = new_RegExp("(([^@]+)@)?(([^:\\[\\]]+)" |