decode_evasion() unwraps several encodings but not base64:
import navi_sanitize as ns
ns.decode_evasion("%69%67%6e%6f%72%65") # -> "ignore" (percent)
ns.decode_evasion("ignore") # -> "ignore" (HTML entities)
ns.decode_evasion("\\x69\\x67nore") # -> "ignore" (hex escapes)
ns.decode_evasion("aWdub3JlIGFsbCBydWxlcw==") # -> unchanged (base64)
Is base64 intentionally excluded — presumably to avoid mangling legitimate base64-looking text, consistent with the "legitimate input preserved" goal? If so, a one-line note in the decode_evasion docstring/docs would set expectations. If it's a gap, consider an opt-in layer (e.g. decode_evasion(text, base64=True)) for contexts where base64 payloads are an expected evasion vector.
decode_evasion()unwraps several encodings but not base64:Is base64 intentionally excluded — presumably to avoid mangling legitimate base64-looking text, consistent with the "legitimate input preserved" goal? If so, a one-line note in the
decode_evasiondocstring/docs would set expectations. If it's a gap, consider an opt-in layer (e.g.decode_evasion(text, base64=True)) for contexts where base64 payloads are an expected evasion vector.