optimization

This commit is contained in:
Zubair Hassan 2021-08-13 12:12:18 +05:00
parent b463b1c2a1
commit a6c87e7183
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ func (a authPairs) searchCredential(authValue string) (string, bool) {
return "", false return "", false
} }
for _, pair := range a { for _, pair := range a {
if subtle.ConstantTimeCompare([]byte(pair.value), []byte(authValue)) == 1 { if subtle.ConstantTimeCompare(bytesconv.StringToBytes(pair.value), bytesconv.StringToBytes(authValue)) == 1 {
return pair.user, true return pair.user, true
} }
} }