Fix VAG login (#5264)
Some checks failed
Release / call-build-workflow (push) Has been cancelled
Release / Publish Docker :release (push) Has been cancelled
Release / Github & APT (push) Has been cancelled
Release / Hassio Addon (push) Has been cancelled

New fields are in the returned HTML that have to be quoted
This commit is contained in:
Michael Panzer 2022-11-24 22:40:18 +01:00 • committed by GitHub
parent c87df312c5
commit 31965b0059
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,7 +83,7 @@ func ParseCredentialsPage(r io.ReadCloser) (CredentialParams, error) {
match := re.FindAllStringSubmatch(buf.String(), -1)
tmpl := strings.ReplaceAll(match[0][1], `'`, `"`)
for _, v := range []string{"templateModel", "currentLocale", "csrf_parameterName", "csrf_token"} {
for _, v := range []string{"templateModel", "currentLocale", "csrf_parameterName", "csrf_token", "userSession", "userId", "countryOfResidence"} {
tmpl = strings.Replace(tmpl, v, fmt.Sprintf(`"%s"`, v), 1)
}