mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-17 19:09:11 +03:00
Revert "providers/radius: fix inverted message authenticator validation (#17855)"
This reverts commit 09e3301c8f.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user