Expand description
Normalization before matching: what an attacker encodes, the WAF decodes. Every loop here is bounded by its input (fuzzed).
Constants§
- MAX_
VALUE - The most of one value that is looked at.
Functions§
- html_
entities - Named entities that matter for markup and scripts, and numeric ones
(
<,<, with or without the;). - js_
escapes \xHHand\uHHHH.- normalize
- Decode a value the way a browser, a server or a database might read it:
percent-encoding (twice, for double encoding;
%uXXXXtoo), HTML entities,\xHH/\uXXXXescapes; then NUL and control characters removed, SQL/* comments */turned into spaces, lower-cased, runs of whitespace collapsed. - percent_
decode %HHand%uHHHH;+is left alone (query values were form-decoded).- strip_
sql_ comments /* … */(and MySQL’s/*! … */) become a space:un/**/ion→un ionstays harmless,union/**/select→union selectis caught.