Volkswagen: better consent detection

This commit is contained in:
andig 2025-02-25 09:34:29 +01:00
parent 56bef0c1f0
commit 653d03ffd5

View file

@ -147,8 +147,8 @@ func (v *Service) Login(uri, user, password string) (url.Values, error) {
err = errors.New(e)
}
if u := resp.Request.URL.Query().Get("updated"); err == nil && u != "" {
err = errors.New("terms of service updated- please open app or website and confirm")
if consent := resp.Request.URL.Query().Get("updated") != "" || strings.Contains(resp.Request.URL.Path, "/consent/"); err == nil && consent {
err = errors.New("terms of service updated- please open app or website and confirm: " + resp.Request.URL.String())
}
}
}