Skip to main content

is_browser_safe

Function is_browser_safe 

Source
pub fn is_browser_safe(url: &str) -> bool
Expand description

Whether url is safe to hand to the desktop’s URL handler.

open::that launches whatever handler is registered for the scheme, so a broken or hostile realm response could otherwise get file:///... — or any registered application scheme — launched on the user’s desktop. Only the two schemes a verification URI is ever legitimately expressed in are allowed.