]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect/xform: Support transform identity data
authorJeff Lucovsky <jlucovsky@oisf.net>
Sat, 5 Apr 2025 20:08:39 +0000 (16:08 -0400)
committerVictor Julien <victor@inliniac.net>
Wed, 14 May 2025 19:36:26 +0000 (21:36 +0200)
commit07205ab057704c8b8cfaf1fa1739c8491db2961c
tree0ca2f017b44ddc53cb60be3c494e52a3b8ffb5d6
parent0b53a19c81e5f24572f3ff899b796a36ab2797d8
detect/xform: Support transform identity data

Transforms that support optional strings, like from_base64 and
pcrexform, should also support identity-strings to treat transforms with
like transform options as the same.

This commit adds transform identity data handling:
- When computing a hash, include identity data from the transform
- When comparing, include the identity data from the transforms
- Omitting the "options" ptr from the transform hash/compare
- Modify xor, pcrexform and from_base64 to supply identification data for
  disambiguation in the compare/hash logic.
17 files changed:
rust/src/detect/transform_base64.rs
rust/src/detect/transforms/casechange.rs
rust/src/detect/transforms/compress_whitespace.rs
rust/src/detect/transforms/domain.rs
rust/src/detect/transforms/dotprefix.rs
rust/src/detect/transforms/hash.rs
rust/src/detect/transforms/http_headers.rs
rust/src/detect/transforms/strip_whitespace.rs
rust/src/detect/transforms/urldecode.rs
rust/src/detect/transforms/xor.rs
rust/sys/src/sys.rs
src/detect-engine-helper.c
src/detect-engine-helper.h
src/detect-engine.c
src/detect-transform-base64.c
src/detect-transform-pcrexform.c
src/detect.h