We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f3e0b2 commit bba2554Copy full SHA for bba2554
1 file changed
browserstack/local_binary.py
@@ -16,6 +16,10 @@ class LocalBinary:
16
ALLOWED_DOWNLOAD_HOSTS = ("browserstack.com",)
17
ALLOWED_DOWNLOAD_HOST_SUFFIXES = (".browserstack.com",)
18
19
+ # Each guard below covers a case the final host-match check does not:
20
+ # - urlparse takes (url or "") so a None or empty URL becomes empty; downstream guards then catch it.
21
+ # - HTTPS check: allowlist matches host only; without this, http://browserstack.com would pass.
22
+ # - empty host: hostname is None/empty for missing URL or URLs like https:///foo; surface a clear error.
23
@staticmethod
24
def _validate_source_url(url):
25
parsed = urlparse(url or "")
0 commit comments