Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
in urldecode if strtol isn't able to decode the hex consider this was not urlencoded
Baptiste Daroussin committed 14 years ago
commit b16d8cc2710a265dc624d38db62561be78693f60
parent 262f2b1144b5eac1f3e1e53e8930520bbb40e2ef
1 file changed +7 -3
modified libpkg/pkg_manifest.c
@@ -126,10 +126,14 @@ urldecode(const char *src, struct sbuf **dest)
			errno = 0;
			c = strtol(hex, NULL, 16);
			if (errno != 0) {
-
				pkg_emit_errno("strtol()", hex);
-
				return (EPKG_FATAL);
+
				/* 
+
				 * if it fails consider this is not a urlencoded
+
				 * information
+
				 */
+
				sbuf_printf(*dest, "%%%s", hex);
+
			} else {
+
				sbuf_putc(*dest, c);
			}
-
			sbuf_putc(*dest, c);
		}
	}
	sbuf_finish(*dest);