diff --git a/internal/bodyprocessors/urlencoded.go b/internal/bodyprocessors/urlencoded.go index a88e6ba19..1c4d164e1 100644 --- a/internal/bodyprocessors/urlencoded.go +++ b/internal/bodyprocessors/urlencoded.go @@ -16,7 +16,7 @@ import ( type urlencodedBodyProcessor struct { } -const URLUnescape = true +const urlUnescape = true func (*urlencodedBodyProcessor) ProcessRequest(reader io.Reader, v plugintypes.TransactionVariables, options plugintypes.BodyProcessorOptions) error { buf := new(strings.Builder) @@ -25,7 +25,7 @@ func (*urlencodedBodyProcessor) ProcessRequest(reader io.Reader, v plugintypes.T } b := buf.String() - values := urlutil.ParseQuery(b, '&', URLUnescape) + values := urlutil.ParseQuery(b, '&', urlUnescape) argsCol := v.ArgsPost() for k, vs := range values { argsCol.Set(k, vs) diff --git a/internal/corazawaf/transaction.go b/internal/corazawaf/transaction.go index 86b39b832..b0aa832d1 100644 --- a/internal/corazawaf/transaction.go +++ b/internal/corazawaf/transaction.go @@ -118,8 +118,8 @@ type Transaction struct { } const ( - URLUnescape = true - noURLUnescape = false + urlUnescape = true + noUrlUnescape = false ) func (tx *Transaction) ID() string { @@ -326,8 +326,8 @@ func (tx *Transaction) AddRequestHeader(key string, value string) { } case "cookie": // Cookies use the same syntax as GET params but with semicolon (;) separator - // noURLUnescape is used to avoid implicitly performing an URL decode on the cookies - values := urlutil.ParseQuery(value, ';', noURLUnescape) + // noUrlUnescape is used to avoid implicitly performing an URL decode on the cookies + values := urlutil.ParseQuery(value, ';', noUrlUnescape) for k, vr := range values { for _, v := range vr { tx.variables.requestCookies.Add(k, v) @@ -639,7 +639,7 @@ func (tx *Transaction) ProcessConnection(client string, cPort int, server string // ExtractGetArguments transforms an url encoded string to a map and creates ARGS_GET func (tx *Transaction) ExtractGetArguments(uri string) { - data := urlutil.ParseQuery(uri, '&', URLUnescape) + data := urlutil.ParseQuery(uri, '&', urlUnescape) for k, vs := range data { for _, v := range vs { tx.AddGetRequestArgument(k, v)