Skip to main content

is_local_path

Function is_local_path 

Source
pub fn is_local_path(target: &str) -> bool
Expand description

Whether a redirect target is a path on this site rather than another origin.

//evil.example is the one that catches people out: it has no scheme, looks like a path, and a browser reads it as a protocol-relative URL to somebody else’s host.