fix: infinite loop when decoding invalid 2231 charset

This commit is contained in:
James Houlahan
2020-06-29 12:51:39 +02:00
parent 813e99f399
commit 0b0991d682
3 changed files with 7 additions and 0 deletions

View File

@ -69,6 +69,7 @@ func changeEncodingAndKeepLastParamDefinition(v string) (out string, err error)
charset, _, err := get2231Charset(value)
if err != nil {
log.Errorln("Filter params:", err)
v = rest
continue
}
if charset != "utf-8" && charset != "us-ascii" {