OPS-06: fix — fixture ruft tatsaechlich verwundbaren symbolpfad auf (ParseAcceptLanguage statt Parse, GO-2022-1059 statt falscher advisory-id)
This commit is contained in:
Vendored
+5
-2
@@ -10,10 +10,13 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
tag, err := language.Parse("de-DE")
|
||||
// ParseAcceptLanguage ist der tatsaechlich verwundbare Aufrufpfad
|
||||
// (GO-2022-1059), im Unterschied zu Parse() — govulncheck bewertet
|
||||
// Erreichbarkeit auf Symbol-, nicht nur Paket-Ebene.
|
||||
tags, _, err := language.ParseAcceptLanguage("de-DE,de;q=0.9,en;q=0.8")
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
fmt.Println(tag)
|
||||
fmt.Println(tags)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user