SET_U (u, UF_USERINFO);
st = parse_at;
}
- else if (!is_atom (t)) {
+ else if (!g_ascii_isgraph (t)) {
goto out;
}
p ++;
/* XXX: password is not stored */
st = parse_at;
}
- else if (!is_atom (t)) {
+ else if (!g_ascii_isgraph (t)) {
goto out;
}
p ++;
* to apply some heuristic here
*/
st = parse_port_password;
+ }
+ else {
+ /*
+ * We can go only for parsing port here
+ */
+ SET_U (u, UF_HOST);
+ st = parse_port;
c = p + 1;
}
p ++;
/* XXX: that breaks urls with passwords starting with number */
st = parse_port;
c = slash;
+ p --;
SET_U (u, UF_HOST);
+ p ++;
c = p;
}
else {
st = parse_suffix_slash;
}
else if (!g_ascii_isdigit (t)) {
- goto out;
+ if (strict || !g_ascii_isspace (t)) {
+ goto out;
+ }
+ else {
+ goto set;
+ }
}
p ++;
break;
uri->string = p;
rspamd_unescape_uri (uri->string, uri->string, len);
rspamd_str_lc (uri->string, uri->protocollen);
- rspamd_str_lc (uri->host, uri->hostlen);
+ rspamd_str_lc_utf8 (uri->host, uri->hostlen);
uri->protocol = PROTOCOL_UNKNOWN;