aboutsummaryrefslogtreecommitdiffstats
path: root/src/url.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-08-31 14:09:38 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-08-31 14:09:38 +0400
commitd77c3021ccbdf4994c8a5681ec99b99d978cb044 (patch)
tree1d16a81c3240012bee9644fcea914a4fcc081763 /src/url.c
parentd45257c4d9657a98cf80d1248501c29de8a17831 (diff)
downloadrspamd-d77c3021ccbdf4994c8a5681ec99b99d978cb044.tar.gz
rspamd-d77c3021ccbdf4994c8a5681ec99b99d978cb044.zip
* Handle base10 encoded ip addresses correctly
Diffstat (limited to 'src/url.c')
-rw-r--r--src/url.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/url.c b/src/url.c
index c089f4275..e5040ca95 100644
--- a/src/url.c
+++ b/src/url.c
@@ -57,7 +57,8 @@ static const char *text_url = "((https?|ftp)://)?"
"|[a-z]{2}"
"(?(1)|(?=/)))"
"(?!\\w)"
-"|(?:\\d{1,3}\\.){3}\\d{1,3}(?(1)|(?=[/:]))"
+"|(?:\\d{1,3}\\.){3}\\d{1,3}(?(1)|(?=[/:]))" /* ip in dotted view */
+"|\\d{5,20}(?(1)|(?=[/:]))" /* ip in numeric view */
")"
"(?::\\d{1,5})?" /* port */
"(?!\\.\\w)" /* host part ended, no more of this further on */