Browse Source

* Handle base10 encoded ip addresses correctly

tags/0.2.7
Vsevolod Stakhov 15 years ago
parent
commit
d77c3021cc
3 changed files with 779 additions and 737 deletions
  1. 776
    736
      src/plugins/surbl.c
  2. 1
    0
      src/plugins/surbl.h
  3. 2
    1
      src/url.c

+ 776
- 736
src/plugins/surbl.c
File diff suppressed because it is too large
View File


+ 1
- 0
src/plugins/surbl.h View File

@@ -37,6 +37,7 @@ struct surbl_ctx {
memory_pool_t *surbl_pool;
GRegex *extract_hoster_regexp;
GRegex *extract_normal_regexp;
GRegex *extract_ip_regexp;
GRegex *extract_numeric_regexp;
};


+ 2
- 1
src/url.c View File

@@ -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 */

Loading…
Cancel
Save