diff --git a/Yesod/Helpers/Auth/Email.hs b/Yesod/Helpers/Auth/Email.hs index 581d8c9c..f9c50673 100644 --- a/Yesod/Helpers/Auth/Email.hs +++ b/Yesod/Helpers/Auth/Email.hs @@ -13,7 +13,8 @@ import System.Random import Control.Monad (when) import Control.Applicative ((<$>), (<*>)) import Data.Digest.Pure.MD5 -import qualified Data.ByteString.Lazy.UTF8 as LU +import qualified Data.Text.Lazy as T +import Data.Text.Lazy.Encoding (encodeUtf8) login, register, setpass :: AuthRoute login = PluginR "email" ["login"] @@ -239,7 +240,10 @@ saltPass pass = do return $ saltPass' salt pass saltPass' :: String -> String -> String -saltPass' salt pass = salt ++ show (md5 $ LU.fromString $ salt ++ pass) +saltPass' salt pass = + salt ++ show (md5 $ fromString $ salt ++ pass) + where + fromString = encodeUtf8 . T.pack isValidPass :: String -- ^ cleartext password -> SaltedPass -- ^ salted password diff --git a/yesod-auth.cabal b/yesod-auth.cabal index f47b04b3..a11f8ab1 100644 --- a/yesod-auth.cabal +++ b/yesod-auth.cabal @@ -22,7 +22,7 @@ library , random >= 1.0 && < 1.1 , data-object >= 0.3.1.3 && < 0.4 , control-monad-attempt >= 0.3.0 && < 0.4 - , utf8-string >= 0.3.4 && < 0.4 + , text >= 0.7 && < 0.11 , blaze-builder >= 0.1 && < 0.2 , mime-mail >= 0.0 && < 0.1 exposed-modules: Yesod.Helpers.Auth