diff --git a/CHANGELOG.md b/CHANGELOG.md index 46457ce..4bf6cc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - New - Changed - Fixed the way the "size" is calculated, it should match content-length now + - Fixed an issue with header canonicalization when a keyword was just a part of the header name - Fixed output writing so it doesn't silently fail if it needs to create directories recursively - v1.3.0 diff --git a/pkg/ffuf/optionsparser.go b/pkg/ffuf/optionsparser.go index 7f73af8..562c1e8 100644 --- a/pkg/ffuf/optionsparser.go +++ b/pkg/ffuf/optionsparser.go @@ -255,14 +255,14 @@ func ConfigFromOptions(parseOpts *ConfigOptions, ctx context.Context, cancel con // except if used in custom defined header var CanonicalNeeded = true for _, a := range conf.CommandKeywords { - if a == hs[0] { + if strings.Contains(hs[0], a) { CanonicalNeeded = false } } // check if part of InputProviders if CanonicalNeeded { for _, b := range conf.InputProviders { - if b.Keyword == hs[0] { + if strings.Contains(hs[0], b.Keyword) { CanonicalNeeded = false } }