Remove redundant empty string check in SCRAM normalization

The existing check for an empty normalized string is unnecessary because the OpaqueString profile in precis already throws an error if an empty string is returned: https://cs.opensource.google/go/x/text/+/master:secure/precis/profiles.go;l=66
This commit is contained in:
Winni Neessen 2024-11-08 22:44:10 +01:00
parent d6f256c29e
commit a1efa1a1ca
Signed by: wneessen
GPG key ID: 385AC9889632126E

View file

@ -310,8 +310,5 @@ func (a *scramAuth) normalizeString(s string) (string, error) {
if err != nil {
return "", fmt.Errorf("failed to normalize string: %w", err)
}
if s == "" {
return "", errors.New("normalized string is empty")
}
return s, nil
}