Skip to main content

json_unicode_full

Function json_unicode_full 

Source
pub fn json_unicode_full(payload: &str) -> String
Expand description

Full JSON \uXXXX escape — escapes EVERY character of the input (including punctuation, whitespace, and control chars). Stronger than json_unicode_alnum which only touches alnum chars. Use when the WAF tokenises on punctuation boundaries that json_unicode_alnum leaves intact, OR when the WAF rule is a regex over the raw bytes of the keyword + adjacent punctuation.

Idempotent on already-escaped \uXXXX sequences (same detection as json_unicode_alnum).