providers/radius: revert fix inverted message authenticator validation (#17855) (#17915)

Revert "providers/radius: fix inverted message authenticator validation (#17855)"

This reverts commit 09e3301c8f.
This commit is contained in:
Jens L.
2025-11-03 16:10:41 +01:00
committed by GitHub
parent 6b08a932d1
commit 1aff2c2b3a
+2 -1
View File
@@ -1,6 +1,7 @@
package radius
import (
"bytes"
"crypto/hmac"
"crypto/md5"
"errors"
@@ -45,7 +46,7 @@ func (r *RadiusRequest) validateMessageAuthenticator() error {
return err
}
hash.Write(encode)
if !hmac.Equal(mauth, hash.Sum(nil)) {
if bytes.Equal(mauth, hash.Sum(nil)) {
return ErrInvalidMessageAuthenticator
}
return nil