x/text/language: ParseAcceptLanguage takes a long time to parse complex tags #56152
The BCP 47 tag parser has quadratic time complexity due to inherent aspects of its design. Since the parser is, by design, exposed to untrusted user input, this can be leveraged to force a program to consume significant time parsing Accept-Language headers.
The text was updated successfully, but these errors were encountered:
golang/go#56152 causes our `snyk-deps` pre-submit job to complain: https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_ci-tools/3088/pull-ci-openshift-release-snyk-deps/1580892349003730944 Require a newer version of `golang.org/x/text` by: - adding `golang.org/x/text v0.3.8` to the `require` section of `go.mod` - `go mod tidy && go mod vendor && git add go.* vendor/ && git commit`