pub enum PathPrefixStrategy {
DoubleSlash,
TripleSlash,
SlashDot,
SlashDotSlash,
}Variants§
DoubleSlash
/admin → //admin. CVE-2025-29914 (Coraza < 3.3.3).
TripleSlash
/admin → ///admin. WAFs that fold // but not ///.
SlashDot
/admin → /./admin. RFC 3986 §5.2.4 dot-segment that some
raw-prefix WAFs ignore.
SlashDotSlash
/admin → /.//admin. Combines dot-segment with the
protocol-relative trick — bypasses WAFs that strip only the
/. form OR only the // form.
Implementations§
Source§impl PathPrefixStrategy
impl PathPrefixStrategy
Sourcepub const fn label(self) -> &'static str
pub const fn label(self) -> &'static str
Stable technique label — what the gene-bank stores and what
shows up in --techniques output. Pre-fix mutations that
shipped without a label silently merged into the catch-all
url:path bucket and the bandit couldn’t tell them apart.
Sourcepub fn apply(self, path_and_query: &str) -> String
pub fn apply(self, path_and_query: &str) -> String
Apply the mutation to a path-and-query string. Returns the
mutated string (caller does not re-encode); the path-and-query
contract from crate::url_mutate::mutate_url is preserved.
path_and_query must start with /. If it does not (the input
is a relative or empty path), the function returns the input
unchanged — silently doing nothing is the same contract
url_mutate::mutate_url uses for non-conforming inputs.
Trait Implementations§
Source§impl Clone for PathPrefixStrategy
impl Clone for PathPrefixStrategy
Source§fn clone(&self) -> PathPrefixStrategy
fn clone(&self) -> PathPrefixStrategy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PathPrefixStrategy
Source§impl Debug for PathPrefixStrategy
impl Debug for PathPrefixStrategy
impl Eq for PathPrefixStrategy
Source§impl PartialEq for PathPrefixStrategy
impl PartialEq for PathPrefixStrategy
Source§fn eq(&self, other: &PathPrefixStrategy) -> bool
fn eq(&self, other: &PathPrefixStrategy) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PathPrefixStrategy
Auto Trait Implementations§
impl Freeze for PathPrefixStrategy
impl RefUnwindSafe for PathPrefixStrategy
impl Send for PathPrefixStrategy
impl Sync for PathPrefixStrategy
impl Unpin for PathPrefixStrategy
impl UnsafeUnpin for PathPrefixStrategy
impl UnwindSafe for PathPrefixStrategy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.