fix(protonvpn/updater): ignore casing when comparing received username

This commit is contained in:
Quentin McGaw
2025-11-17 15:23:02 +00:00
parent a17776673b
commit 2cf4d6b469

View File

@@ -371,7 +371,7 @@ func (c *apiClient) authInfo(ctx context.Context, username string, unauthCookie
case info.SRPSession == "": case info.SRPSession == "":
return "", "", "", "", 0, fmt.Errorf("%w: SRP session is empty", ErrDataFieldMissing) return "", "", "", "", 0, fmt.Errorf("%w: SRP session is empty", ErrDataFieldMissing)
case info.Username != username: case !strings.EqualFold(info.Username, username):
return "", "", "", "", 0, fmt.Errorf("%w: expected %s got %s", return "", "", "", "", 0, fmt.Errorf("%w: expected %s got %s",
ErrUsernameMismatch, username, info.Username) ErrUsernameMismatch, username, info.Username)
case info.Version == nil: case info.Version == nil: