You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cb7c36c
Browse filesBrowse the repository at this point in the historyBrowse files
fix: reject host-less catalog URLs in base and preset validators (#3209) (#3227)
`CatalogStackBase._validate_catalog_url` (inherited by `IntegrationCatalog`)
and `PresetCatalog._validate_catalog_url` checked `parsed.netloc`, which is
truthy for host-less URLs like `https://:8080` (port only) or `https://user@`
(userinfo only). Such URLs slipped past validation despite the error message
promising "a valid URL with a host", then failed later with a confusing fetch
error.
Switch both validators to `parsed.hostname` (None for those inputs), matching
the workflow, step, and bundler catalog validators that already do this.
Add regression tests covering port-only and userinfo-only URLs for both
validators.
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
# Check hostname, not netloc: netloc is truthy for host-less URLs like
82
82
# "https://:8080" or "https://user@", so the host guarantee this error
83
-
# promises would not actually hold. hostname is None in those cases.
83
+
# promises would not actually hold. hostname is None in those cases (#3209).
84
84
ifnotparsed.hostname:
85
85
raisecls._error("Catalog URL must be a valid URL with a host.")
# Check hostname, not netloc: netloc is truthy for host-less URLs like
1865
1865
# "https://:8080" or "https://user@", so the host guarantee this error
1866
-
# promises would not actually hold. hostname is None in those cases.
1866
+
# promises would not actually hold. hostname is None in those cases (#3209).
0 commit comments