From: Jonathan McDowell Date: Mon, 8 Aug 2016 22:05:18 +0000 (+0100) Subject: Include - in the permitted characters for the HKP base URL X-Git-Tag: onak-0.5.0~7 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=de396fa4c9a6049fb6d8a31993f5e8ca762ace74;p=onak.git Include - in the permitted characters for the HKP base URL - had been missed out as a valid character in the domain name for the host we forward HKP requests to; add it. --- diff --git a/keydb_hkp.c b/keydb_hkp.c index 65b6bdc..d55551e 100644 --- a/keydb_hkp.c +++ b/keydb_hkp.c @@ -49,11 +49,11 @@ static int hkp_parse_url(struct onak_hkp_dbctx *privctx, const char *url) proto[0] = host[0] = 0; port = 0; - matched = sscanf(url, "%5[a-z]://%256[a-zA-Z0-9.]:%u", proto, host, + matched = sscanf(url, "%5[a-z]://%256[a-zA-Z0-9.-]:%u", proto, host, &port); if (matched < 2) { proto[0] = 0; - sscanf(url, "%256[a-zA-Z0-9.]:%u", host, &port); + sscanf(url, "%256[a-zA-Z0-9.-]:%u", host, &port); } if (host[0] == 0) {