From cb8c1cfe913c625052fe4e11c4fcc2c47057f29a Mon Sep 17 00:00:00 2001 From: Salad Dais Date: Fri, 11 Jun 2021 17:52:03 +0000 Subject: [PATCH] Only generate lowercase hostnames in register_wrapper_cap() Hostnames are case insensitive and passing a URL through urlparse() will always give you a lowercase domain name. --- hippolyzer/lib/proxy/region.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hippolyzer/lib/proxy/region.py b/hippolyzer/lib/proxy/region.py index ff37cb6..b373989 100644 --- a/hippolyzer/lib/proxy/region.py +++ b/hippolyzer/lib/proxy/region.py @@ -121,7 +121,7 @@ class ProxiedRegion(BaseClientRegion): parsed = list(urllib.parse.urlsplit(self._caps[name][1])) seed_id = self._caps["Seed"][1].split("/")[-1].encode("utf8") # Give it a unique domain tied to the current Seed URI - parsed[1] = f"{name}-{hashlib.sha256(seed_id).hexdigest()[:16]}.hippo-proxy.localhost" + parsed[1] = f"{name.lower()}-{hashlib.sha256(seed_id).hexdigest()[:16]}.hippo-proxy.localhost" # Force the URL to HTTP, we're going to handle the request ourselves so it doesn't need # to be secure. This should save on expensive TLS context setup for each req. parsed[0] = "http"