mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
version: fix ill-formed User-Agent header (#8796)
resolve: https://github.com/open-policy-agent/opa/issues/8792 I added a note in the Changelog that should hopefully be enough? --------- Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>
This commit is contained in:
@@ -5,6 +5,13 @@ project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Breaking: Fix User-Agent according to RFC9110
|
||||
> OPA's outbound HTTP requests (bundle, discovery, decision log, status, `http.send`, AWS KMS/ECR)
|
||||
> previously sent `User-Agent: Open Policy Agent/<version> (<os>, <arch>)`, which is not a valid
|
||||
> RFC 9110 `User-Agent` value because the `product` token cannot contain spaces. The header is now
|
||||
> `Open-Policy-Agent/<version> (<os>, <arch>)`. Server-side log filters or WAF rules that
|
||||
> exact-match the old string will need to be updated.
|
||||
|
||||
## 1.17.1
|
||||
|
||||
This release uses the latest version of Go (1.26.4) to build OPA, fixing stdlib vulnerabilities in
|
||||
|
||||
@@ -33,4 +33,4 @@ func Write(ctx context.Context, store storage.Store, txn storage.Transaction) er
|
||||
}
|
||||
|
||||
// UserAgent defines the current OPA instances User-Agent default header value.
|
||||
var UserAgent = fmt.Sprintf("Open Policy Agent/%s (%s, %s)", version.Version, runtime.GOOS, runtime.GOARCH)
|
||||
var UserAgent = fmt.Sprintf("Open-Policy-Agent/%s (%s, %s)", version.Version, runtime.GOOS, runtime.GOARCH)
|
||||
|
||||
Reference in New Issue
Block a user