Mercurial > dovecot > original-hg > dovecot-2.2
changeset 16767:9bf25c18ad33
uri-util: Improved authority 'host' parse error.
author | Stephan Bosch <stephan@rename-it.nl> |
---|---|
date | Wed, 18 Sep 2013 23:24:22 +0300 |
parents | 8442a0dc44b7 |
children | b92118278b06 |
files | src/lib/uri-util.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/uri-util.c Wed Sep 18 23:24:11 2013 +0300 +++ b/src/lib/uri-util.c Wed Sep 18 23:24:22 2013 +0300 @@ -543,7 +543,10 @@ /* host */ if ((ret = uri_parse_host(parser, auth)) <= 0) { if (ret == 0) { - parser->error = "Missing 'host' component"; + if (p == parser->end || *p == ':' || *p == '/') + parser->error = "Missing 'host' component"; + else + parser->error = "Invalid 'host' component"; return -1; } return ret;