move ParseQuery to expr helpers, add ExtractQueryParam (#3491)

* move ParseQuery to expr helpers, add ExtractQueryParam
This commit is contained in:
Thibault "bui" Koechlin 2025-03-04 10:41:11 +01:00 committed by GitHub
parent 61c7de1331
commit f49e1e28d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 455 additions and 286 deletions

View file

@ -11,6 +11,7 @@ import (
"os"
"regexp"
"github.com/crowdsecurity/crowdsec/pkg/exprhelpers"
"github.com/google/uuid"
log "github.com/sirupsen/logrus"
)
@ -396,7 +397,7 @@ func NewParsedRequestFromRequest(r *http.Request, logger *log.Entry) (ParsedRequ
URL: parsedURL,
Proto: r.Proto,
Body: body,
Args: ParseQuery(parsedURL.RawQuery),
Args: exprhelpers.ParseQuery(parsedURL.RawQuery),
TransferEncoding: r.TransferEncoding,
ResponseChannel: make(chan AppsecTempResponse),
RemoteAddrNormalized: remoteAddrNormalized,