Hello community, here is the log from the commit of package ghc-yesod-auth for openSUSE:Factory checked in at 2017-06-21 13:56:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-yesod-auth (Old) and /work/SRC/openSUSE:Factory/.ghc-yesod-auth.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yesod-auth" Wed Jun 21 13:56:38 2017 rev:9 rq:504683 version:1.4.17.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-yesod-auth/ghc-yesod-auth.changes 2017-06-04 01:59:33.830448350 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-yesod-auth.new/ghc-yesod-auth.changes 2017-06-21 13:56:41.451608532 +0200 @@ -1,0 +2,5 @@ +Mon Jun 12 09:41:42 UTC 2017 - [email protected] + +- Update to version 1.4.17.2. + +------------------------------------------------------------------- Old: ---- yesod-auth-1.4.17.1.tar.gz New: ---- yesod-auth-1.4.17.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-yesod-auth.spec ++++++ --- /var/tmp/diff_new_pack.v53EzA/_old 2017-06-21 13:56:42.583448876 +0200 +++ /var/tmp/diff_new_pack.v53EzA/_new 2017-06-21 13:56:42.583448876 +0200 @@ -18,7 +18,7 @@ %global pkg_name yesod-auth Name: ghc-%{pkg_name} -Version: 1.4.17.1 +Version: 1.4.17.2 Release: 0 Summary: Authentication for Yesod License: MIT @@ -39,7 +39,7 @@ BuildRequires: ghc-conduit-devel BuildRequires: ghc-conduit-extra-devel BuildRequires: ghc-containers-devel -BuildRequires: ghc-cryptohash-devel +BuildRequires: ghc-cryptonite-devel BuildRequires: ghc-data-default-devel BuildRequires: ghc-email-validate-devel BuildRequires: ghc-file-embed-devel @@ -47,6 +47,7 @@ BuildRequires: ghc-http-conduit-devel BuildRequires: ghc-http-types-devel BuildRequires: ghc-lifted-base-devel +BuildRequires: ghc-memory-devel BuildRequires: ghc-mime-mail-devel BuildRequires: ghc-network-uri-devel BuildRequires: ghc-nonce-devel ++++++ yesod-auth-1.4.17.1.tar.gz -> yesod-auth-1.4.17.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-auth-1.4.17.1/ChangeLog.md new/yesod-auth-1.4.17.2/ChangeLog.md --- old/yesod-auth-1.4.17.1/ChangeLog.md 2017-05-13 23:23:11.000000000 +0200 +++ new/yesod-auth-1.4.17.2/ChangeLog.md 2017-06-05 10:33:22.000000000 +0200 @@ -1,3 +1,7 @@ +## 1.4.17.2 + +* Move to cryptonite from cryptohash + ## 1.4.17.1 * Some translation fixes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-auth-1.4.17.1/Yesod/Auth/Email.hs new/yesod-auth-1.4.17.2/Yesod/Auth/Email.hs --- old/yesod-auth-1.4.17.1/Yesod/Auth/Email.hs 2017-02-27 08:46:27.000000000 +0100 +++ new/yesod-auth-1.4.17.2/Yesod/Auth/Email.hs 2017-06-05 10:33:22.000000000 +0200 @@ -117,9 +117,8 @@ import Yesod.Core import Yesod.Form import qualified Yesod.PasswordStore as PS - import Control.Applicative ((<$>), (<*>)) -import qualified Crypto.Hash.MD5 as H +import qualified Crypto.Hash as H import qualified Crypto.Nonce as Nonce import Data.ByteString.Base16 as B16 import Data.Text (Text) @@ -134,6 +133,7 @@ import qualified Text.Email.Validate import Data.Aeson.Types (Parser, Result(..), parseMaybe, withObject, (.:?)) import Data.Maybe (isJust, isNothing, fromJust) +import Data.ByteArray (convert) loginR, registerR, forgotPasswordR, setpassR :: AuthRoute loginR = PluginR "email" ["login"] @@ -811,7 +811,7 @@ saltPass' :: String -> String -> String saltPass' salt pass = - salt ++ T.unpack (TE.decodeUtf8 $ B16.encode $ H.hash $ TE.encodeUtf8 $ T.pack $ salt ++ pass) + salt ++ T.unpack (TE.decodeUtf8 $ B16.encode $ convert (H.hash (TE.encodeUtf8 $ T.pack $ salt ++ pass) :: H.Digest H.MD5)) isValidPass :: Text -- ^ cleartext password -> SaltedPass -- ^ salted password diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-auth-1.4.17.1/Yesod/PasswordStore.hs new/yesod-auth-1.4.17.2/Yesod/PasswordStore.hs --- old/yesod-auth-1.4.17.1/Yesod/PasswordStore.hs 2017-02-05 13:38:01.000000000 +0100 +++ new/yesod-auth-1.4.17.2/Yesod/PasswordStore.hs 2017-06-05 10:33:22.000000000 +0200 @@ -102,16 +102,14 @@ importSalt -- :: ByteString -> Salt ) where - +import qualified Crypto.MAC.HMAC as CH import qualified Crypto.Hash as CH -import qualified Crypto.Hash.SHA256 as H import qualified Data.ByteString.Char8 as B import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BL import qualified Data.Binary as Binary import Control.Monad import Control.Monad.ST -import Data.Byteable (toBytes) import Data.STRef import Data.Bits import Data.ByteString.Char8 (ByteString) @@ -120,6 +118,7 @@ import System.Random import Data.Maybe import qualified Control.Exception +import Data.ByteArray (convert) --------------------- -- Cryptographic base @@ -134,14 +133,18 @@ -- matches. pbkdf1 :: ByteString -> Salt -> Int -> ByteString pbkdf1 password (SaltBS salt) iter = hashRounds first_hash (iter + 1) - where first_hash = H.finalize $ H.init `H.update` password `H.update` salt + where + first_hash = + convert $ + ((CH.hashFinalize $ CH.hashInit `CH.hashUpdate` password `CH.hashUpdate` salt) :: CH.Digest CH.SHA256) + -- | Hash a 'ByteString' for a given number of rounds. The number of rounds is 0 -- or more. If the number of rounds specified is 0, the ByteString will be -- returned unmodified. hashRounds :: ByteString -> Int -> ByteString hashRounds (!bs) 0 = bs -hashRounds bs rounds = hashRounds (H.hash bs) (rounds - 1) +hashRounds bs rounds = hashRounds (convert (CH.hash bs :: CH.Digest CH.SHA256)) (rounds - 1) -- | Computes the hmacSHA256 of the given message, with the given 'Salt'. hmacSHA256 :: ByteString @@ -151,7 +154,7 @@ -> ByteString -- ^ The encoded message hmacSHA256 secret msg = - toBytes (CH.hmacGetDigest (CH.hmac secret msg) :: CH.Digest CH.SHA256) + convert (CH.hmacGetDigest (CH.hmac secret msg) :: CH.Digest CH.SHA256) -- | PBKDF2 key-derivation function. -- For details see @http://tools.ietf.org/html/rfc2898@. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-auth-1.4.17.1/yesod-auth.cabal new/yesod-auth-1.4.17.2/yesod-auth.cabal --- old/yesod-auth-1.4.17.1/yesod-auth.cabal 2017-05-13 23:23:04.000000000 +0200 +++ new/yesod-auth-1.4.17.2/yesod-auth.cabal 2017-06-05 10:33:22.000000000 +0200 @@ -1,5 +1,5 @@ name: yesod-auth -version: 1.4.17.1 +version: 1.4.17.2 license: MIT license-file: LICENSE author: Michael Snoyman, Patrick Brisbin @@ -27,7 +27,8 @@ , wai >= 1.4 , template-haskell , base16-bytestring - , cryptohash + , cryptonite + , memory , random >= 1.0.0.2 , text >= 0.7 , mime-mail >= 0.3
