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) ...@@ -57,6 +57,9 @@ _url_imap_init (url_t url)
57 if (status) 57 if (status)
58 return status; 58 return status;
59 59
60 if(!url->host || url->query)
61 return EINVAL;
62
60 /* is it pop? */ 63 /* is it pop? */
61 if (strcmp ("imap", url->scheme) != 0) 64 if (strcmp ("imap", url->scheme) != 0)
62 return EINVAL; 65 return EINVAL;
......
...@@ -62,7 +62,7 @@ _url_pop_init (url_t url) ...@@ -62,7 +62,7 @@ _url_pop_init (url_t url)
62 return EINVAL; 62 return EINVAL;
63 63
64 /* not valid in a pop url */ 64 /* not valid in a pop url */
65 if (url->path || url->query) 65 if (url->path || url->query || !url->host)
66 return EINVAL; 66 return EINVAL;
67 67
68 if (url->port == 0) 68 if (url->port == 0)
......