Skip to content

Commit

Permalink
[Rework] Rework telephone urls parsing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Mar 1, 2019
1 parent 50c6b04 commit 938ac78
Show file tree
Hide file tree
Showing 4 changed files with 234 additions and 107 deletions.
3 changes: 2 additions & 1 deletion src/libserver/html.c
Expand Up @@ -1349,7 +1349,8 @@ rspamd_html_process_url (rspamd_mempool_t *pool, const gchar *start, guint len,
if (rspamd_substring_search (start, len, "://", 3) == -1) {
if (len >= sizeof ("mailto:") &&
(memcmp (start, "mailto:", sizeof ("mailto:") - 1) == 0 ||
memcmp (start, "tel:", sizeof ("tel:") - 1) == 0)) {
memcmp (start, "tel:", sizeof ("tel:") - 1) == 0 ||
memcmp (start, "callto:", sizeof ("callto:") - 1) == 0)) {
/* Exclusion, has valid but 'strange' prefix */
}
else {
Expand Down

0 comments on commit 938ac78

Please sign in to comment.