From 8af6a82ec821ebd6ed41d570bcffb7a5e9271223 Mon Sep 17 00:00:00 2001 From: Victor Denisov Date: Sat, 7 Nov 2015 10:37:40 -0800 Subject: [PATCH] Clean trailing whitespaces --- Database/MongoDB/Query.hs | 6 +++--- mongoDB.cabal | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Database/MongoDB/Query.hs b/Database/MongoDB/Query.hs index 91d5e46..3257519 100644 --- a/Database/MongoDB/Query.hs +++ b/Database/MongoDB/Query.hs @@ -243,14 +243,14 @@ authSCRAMSHA1 un pw = do let firstBare = B.concat [B.pack $ "n=" ++ (T.unpack un) ++ ",r=", nonce] let client1 = ["saslStart" =: (1 :: Int), "mechanism" =: ("SCRAM-SHA-1" :: String), "payload" =: (B.unpack . B64.encode $ B.concat [B.pack "n,,", firstBare]), "autoAuthorize" =: (1 :: Int)] server1 <- runCommand client1 - + shortcircuit (true1 "ok" server1) $ do let serverPayload1 = B64.decodeLenient . B.pack . at "payload" $ server1 let serverData1 = parseSCRAM serverPayload1 let iterations = read . B.unpack $ Map.findWithDefault "1" "i" serverData1 let salt = B64.decodeLenient $ Map.findWithDefault "" "s" serverData1 let snonce = Map.findWithDefault "" "r" serverData1 - + shortcircuit (B.isInfixOf nonce snonce) $ do let withoutProof = B.concat [B.pack "c=biws,r=", snonce] let digestS = B.pack $ T.unpack un ++ ":mongo:" ++ T.unpack pw @@ -266,7 +266,7 @@ authSCRAMSHA1 un pw = do let serverSig = B64.encode $ hmac serverKey authMsg let client2 = ["saslContinue" =: (1 :: Int), "conversationId" =: (at "conversationId" server1 :: Int), "payload" =: (B.unpack $ B64.encode clientFinal)] server2 <- runCommand client2 - + shortcircuit (true1 "ok" server2) $ do let serverPayload2 = B64.decodeLenient . B.pack $ at "payload" server2 let serverData2 = parseSCRAM serverPayload2 diff --git a/mongoDB.cabal b/mongoDB.cabal index f8eff5e..3cf32c6 100644 --- a/mongoDB.cabal +++ b/mongoDB.cabal @@ -43,7 +43,7 @@ Library , hashtables >= 1.1.2.0 , base16-bytestring >= 0.1.1.6 , base64-bytestring >= 1.0.0.1 - , nonce >= 1.0.2 + , nonce >= 1.0.2 Exposed-modules: Database.MongoDB Database.MongoDB.Admin