]> the.earth.li Git - onak.git/commitdiff
Include - in the permitted characters for the HKP base URL
authorJonathan McDowell <noodles@earth.li>
Mon, 8 Aug 2016 22:05:18 +0000 (23:05 +0100)
committerJonathan McDowell <noodles@earth.li>
Mon, 8 Aug 2016 22:05:18 +0000 (23:05 +0100)
- had been missed out as a valid character in the domain name for
the host we forward HKP requests to; add it.

keydb_hkp.c

index 65b6bdcf4e22e1609f620aaa8356b16a0f0e3777..d55551e5724273ccf17fa44c232cb88e71c0dabc 100644 (file)
@@ -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) {