Commit 9c8700e4 9c8700e47ee427abc004280b96ca8f6bb279a78a by Sam Roberts

Check harder for URLs that are not invalid for the particular scheme.

1 parent 5eec624d
......@@ -57,6 +57,9 @@ _url_imap_init (url_t url)
if (status)
return status;
if(!url->host || url->query)
return EINVAL;
/* is it pop? */
if (strcmp ("imap", url->scheme) != 0)
return EINVAL;
......
......@@ -62,7 +62,7 @@ _url_pop_init (url_t url)
return EINVAL;
/* not valid in a pop url */
if (url->path || url->query)
if (url->path || url->query || !url->host)
return EINVAL;
if (url->port == 0)
......