mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-08-28 05:04:40 +00:00
servers: restore constant time for absent queue/wrong key (regression in 6.4-beta.9) (#1567)
This commit is contained in:
@@ -1272,8 +1272,8 @@ verifyCmdAuth thAuth k authenticator authorized (CorrId corrId) = case thAuth of
|
||||
Just THAuthServer {serverPrivKey = pk} -> C.cbVerify k pk (C.cbNonce corrId) authenticator authorized
|
||||
Nothing -> False
|
||||
|
||||
dummyVerifyCmd :: Maybe (THandleAuth 'TServer) -> Maybe TAuthorizations -> ByteString -> CorrId -> Maybe Bool
|
||||
dummyVerifyCmd thAuth tAuth authorized corrId = verify <$> tAuth
|
||||
dummyVerifyCmd :: Maybe (THandleAuth 'TServer) -> Maybe TAuthorizations -> ByteString -> CorrId -> Bool
|
||||
dummyVerifyCmd thAuth tAuth authorized corrId = maybe False verify tAuth
|
||||
where
|
||||
verify = \case
|
||||
(TASignature (C.ASignature a s), _) -> C.verify' (dummySignKey a) s authorized
|
||||
|
||||
Reference in New Issue
Block a user