Skip to main content

validate_url_scheme_ephemeral

Function validate_url_scheme_ephemeral 

Source
pub fn validate_url_scheme_ephemeral(url: &str) -> Result<(), PluginError>
Expand description

Validate that url uses the https scheme for ephemeral plugin loading.

Only https:// is accepted. http:// and any other scheme are rejected to prevent MITM attacks against session-scoped plugin archives (security invariant INV-EPH-1).

ยงErrors

Returns PluginError::InsecureUrl when the URL is http:// or any other non-HTTPS scheme. Returns PluginError::InvalidSource when the URL is unparseable.