fix: normalize shipped telemetry secrets

This commit is contained in:
lucaronin
2026-04-19 23:27:57 +02:00
parent cee4bef179
commit 03042bb49c
5 changed files with 50 additions and 5 deletions

View File

@@ -145,8 +145,13 @@ jobs:
value = value[1:-1].strip()
return value
def normalize_http_like(value: str) -> str:
if "://" in value:
return value
return f"https://{value}"
def is_http_url(value: str) -> bool:
parsed = urlparse(value)
parsed = urlparse(normalize_http_like(value))
return parsed.scheme in {"http", "https"} and bool(parsed.netloc)
values = {

View File

@@ -188,8 +188,13 @@ jobs:
value = value[1:-1].strip()
return value
def normalize_http_like(value: str) -> str:
if "://" in value:
return value
return f"https://{value}"
def is_http_url(value: str) -> bool:
parsed = urlparse(value)
parsed = urlparse(normalize_http_like(value))
return parsed.scheme in {"http", "https"} and bool(parsed.netloc)
values = {