pub struct PostgresDollarQuoteTamper;Expand description
Postgres dollar-quoted string tamper.
Postgres accepts $tag$ ... $tag$ as a string literal where
tag is any identifier (or empty). Quote-character-based WAF
signatures looking for ' or " never fire on dollar-quoted
payloads. Most popular Postgres-fronting WAFs (including the
CRS default ruleset’s 942100-942380 family) don’t have
dedicated dollar-quote pattern matchers.
Wraps any single-quoted string literal in the payload with a matching dollar-quote. Tag is a random four-letter identifier to defeat WAFs that special-case the empty tag.
Trait Implementations§
Source§impl TamperStrategy for PostgresDollarQuoteTamper
impl TamperStrategy for PostgresDollarQuoteTamper
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Returns a description of what this strategy does.
Source§fn tamper(&self, payload: &str, _context: Option<&str>) -> String
fn tamper(&self, payload: &str, _context: Option<&str>) -> String
Transforms the input payload. Read more
Source§fn aggressiveness(&self) -> f64
fn aggressiveness(&self) -> f64
Returns the aggressiveness score (0.0 = mild, 1.0 = extreme).
Auto Trait Implementations§
impl Freeze for PostgresDollarQuoteTamper
impl RefUnwindSafe for PostgresDollarQuoteTamper
impl Send for PostgresDollarQuoteTamper
impl Sync for PostgresDollarQuoteTamper
impl Unpin for PostgresDollarQuoteTamper
impl UnsafeUnpin for PostgresDollarQuoteTamper
impl UnwindSafe for PostgresDollarQuoteTamper
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
Mutably borrows from an owned value. Read more