From ec6fd486b6845e8fee4f276188bd8545eb7a7732 Mon Sep 17 00:00:00 2001 From: Greg Weber Date: Thu, 11 Sep 2014 13:17:24 -0700 Subject: [PATCH 01/11] remove the id_token parameter We saw this error: Internal Server Error key "id_token" not present --- yesod-auth/Yesod/Auth/GoogleEmail2.hs | 5 ++--- yesod-auth/yesod-auth.cabal | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/yesod-auth/Yesod/Auth/GoogleEmail2.hs b/yesod-auth/Yesod/Auth/GoogleEmail2.hs index 04afd433..e7e6829b 100644 --- a/yesod-auth/Yesod/Auth/GoogleEmail2.hs +++ b/yesod-auth/Yesod/Auth/GoogleEmail2.hs @@ -156,7 +156,7 @@ authGoogleEmail clientID clientSecret = manager <- liftM authHttpManager $ lift getYesod res <- http req manager value <- responseBody res $$+- sinkParser json' - Tokens accessToken _idToken tokenType <- + Tokens accessToken tokenType <- case parseEither parseJSON value of Left e -> error e Right t -> return t @@ -184,11 +184,10 @@ authGoogleEmail clientID clientSecret = dispatch _ _ = notFound -data Tokens = Tokens Text Text Text +data Tokens = Tokens Text Text instance FromJSON Tokens where parseJSON = withObject "Tokens" $ \o -> Tokens <$> o .: "access_token" - <*> o .: "id_token" <*> o .: "token_type" data Person = Person [Email] diff --git a/yesod-auth/yesod-auth.cabal b/yesod-auth/yesod-auth.cabal index 2f32c9d9..6affcb56 100644 --- a/yesod-auth/yesod-auth.cabal +++ b/yesod-auth/yesod-auth.cabal @@ -1,5 +1,5 @@ name: yesod-auth -version: 1.3.4.3 +version: 1.3.4.4 license: MIT license-file: LICENSE author: Michael Snoyman, Patrick Brisbin From d3e4831b3808d0c38ad1c0126023ef7fea45d7e9 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 14 Sep 2014 07:23:19 +0300 Subject: [PATCH 02/11] Scaffolding update --- yesod-bin/hsfiles/mongo.hsfiles | 16 +++++++--------- yesod-bin/hsfiles/mysql.hsfiles | 16 ++++++++-------- yesod-bin/hsfiles/postgres-fay.hsfiles | 16 ++++++++-------- yesod-bin/hsfiles/postgres.hsfiles | 16 ++++++++-------- yesod-bin/hsfiles/simple.hsfiles | 4 ++-- yesod-bin/hsfiles/sqlite.hsfiles | 16 ++++++++-------- yesod-bin/yesod-bin.cabal | 2 +- 7 files changed, 42 insertions(+), 44 deletions(-) diff --git a/yesod-bin/hsfiles/mongo.hsfiles b/yesod-bin/hsfiles/mongo.hsfiles index 6fce7882..1ec3ae44 100644 --- a/yesod-bin/hsfiles/mongo.hsfiles +++ b/yesod-bin/hsfiles/mongo.hsfiles @@ -188,7 +188,7 @@ instance Yesod App where , css_bootstrap_css ]) $(widgetFile "default-layout") - giveUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") + withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") -- This is done to provide an optimization for serving static files from -- a separate domain. Please see the staticRoot setting in Settings.hs @@ -230,7 +230,7 @@ instance Yesod App where -- How to run database actions. instance YesodPersist App where - type YesodPersistBackend App = Action + type YesodPersistBackend App = MongoContext runDB = defaultRunDB persistConfig connPool instance YesodAuth App where @@ -359,9 +359,7 @@ import Prelude -- You can find more information on persistent and how to declare entities -- at: -- http://www.yesodweb.com/book/persistent/ -let mongoSettings = (mkPersistSettings (ConT ''MongoBackend)) - { mpsGeneric = False - } +let mongoSettings = (mkPersistSettings (ConT ''MongoContext)) in share [mkPersist mongoSettings] $(persistFileWith upperCaseSettings "config/models") @@ -411,15 +409,15 @@ library build-depends: base >= 4 && < 5 , yesod >= 1.2.5 && < 1.3 - , yesod-core >= 1.2.12 && < 1.3 + , yesod-core >= 1.2.20 && < 1.3 , yesod-auth >= 1.3 && < 1.4 , yesod-static >= 1.2 && < 1.3 , yesod-form >= 1.3 && < 1.4 , bytestring >= 0.9 && < 0.11 , text >= 0.11 && < 2.0 - , persistent >= 1.3 && < 1.4 - , persistent-mongoDB >= 1.3 && < 1.5 - , persistent-template >= 1.3 && < 1.4 + , persistent >= 2.0 && < 2.1 + , persistent-mongoDB >= 2.0 && < 2.1 + , persistent-template >= 2.0 && < 2.1 , template-haskell , shakespeare >= 2.0 && < 2.1 , hjsmin >= 0.1 && < 0.2 diff --git a/yesod-bin/hsfiles/mysql.hsfiles b/yesod-bin/hsfiles/mysql.hsfiles index d02bfadb..f3f0e37f 100644 --- a/yesod-bin/hsfiles/mysql.hsfiles +++ b/yesod-bin/hsfiles/mysql.hsfiles @@ -130,7 +130,7 @@ import Network.HTTP.Client.Conduit (Manager, HasHttpManager (getHttpManager)) import qualified Settings import Settings.Development (development) import qualified Database.Persist -import Database.Persist.Sql (SqlPersistT) +import Database.Persist.Sql (SqlBackend) import Settings.StaticFiles import Settings (widgetFile, Extra (..)) import Model @@ -195,7 +195,7 @@ instance Yesod App where , css_bootstrap_css ]) $(widgetFile "default-layout") - giveUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") + withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") -- This is done to provide an optimization for serving static files from -- a separate domain. Please see the staticRoot setting in Settings.hs @@ -237,7 +237,7 @@ instance Yesod App where -- How to run database actions. instance YesodPersist App where - type YesodPersistBackend App = SqlPersistT + type YesodPersistBackend App = SqlBackend runDB = defaultRunDB persistConfig connPool instance YesodPersistRunner App where getDBRunner = defaultGetDBRunner connPool @@ -366,7 +366,7 @@ import Prelude -- You can find more information on persistent and how to declare entities -- at: -- http://www.yesodweb.com/book/persistent/ -share [mkPersist sqlOnlySettings, mkMigrate "migrateAll"] +share [mkPersist sqlSettings, mkMigrate "migrateAll"] $(persistFileWith lowerCaseSettings "config/models") {-# START_FILE PROJECTNAME.cabal #-} @@ -415,15 +415,15 @@ library build-depends: base >= 4 && < 5 , yesod >= 1.2.5 && < 1.3 - , yesod-core >= 1.2.12 && < 1.3 + , yesod-core >= 1.2.20 && < 1.3 , yesod-auth >= 1.3 && < 1.4 , yesod-static >= 1.2 && < 1.3 , yesod-form >= 1.3 && < 1.4 , bytestring >= 0.9 && < 0.11 , text >= 0.11 && < 2.0 - , persistent >= 1.3 && < 1.4 - , persistent-mysql >= 1.3 && < 1.4 - , persistent-template >= 1.3 && < 1.4 + , persistent >= 2.0 && < 2.1 + , persistent-mysql >= 2.0 && < 2.1 + , persistent-template >= 2.0 && < 2.1 , template-haskell , shakespeare >= 2.0 && < 2.1 , hjsmin >= 0.1 && < 0.2 diff --git a/yesod-bin/hsfiles/postgres-fay.hsfiles b/yesod-bin/hsfiles/postgres-fay.hsfiles index a8920c3b..c0f3a608 100644 --- a/yesod-bin/hsfiles/postgres-fay.hsfiles +++ b/yesod-bin/hsfiles/postgres-fay.hsfiles @@ -133,7 +133,7 @@ import Network.HTTP.Client.Conduit (Manager, HasHttpManager (getHttpManager)) import qualified Settings import Settings.Development (development) import qualified Database.Persist -import Database.Persist.Sql (SqlPersistT) +import Database.Persist.Sql (SqlBackend) import Settings.StaticFiles import Settings (widgetFile, Extra (..)) import Model @@ -199,7 +199,7 @@ instance Yesod App where , css_bootstrap_css ]) $(widgetFile "default-layout") - giveUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") + withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") -- This is done to provide an optimization for serving static files from -- a separate domain. Please see the staticRoot setting in Settings.hs @@ -250,7 +250,7 @@ instance YesodFay App where -- How to run database actions. instance YesodPersist App where - type YesodPersistBackend App = SqlPersistT + type YesodPersistBackend App = SqlBackend runDB = defaultRunDB persistConfig connPool instance YesodPersistRunner App where getDBRunner = defaultGetDBRunner connPool @@ -398,7 +398,7 @@ import Prelude -- You can find more information on persistent and how to declare entities -- at: -- http://www.yesodweb.com/book/persistent/ -share [mkPersist sqlOnlySettings, mkMigrate "migrateAll"] +share [mkPersist sqlSettings, mkMigrate "migrateAll"] $(persistFileWith lowerCaseSettings "config/models") {-# START_FILE PROJECTNAME.cabal #-} @@ -451,7 +451,7 @@ library build-depends: base >= 4 && < 5 , yesod >= 1.2.5 && < 1.3 - , yesod-core >= 1.2.12 && < 1.3 + , yesod-core >= 1.2.20 && < 1.3 , yesod-auth >= 1.3 && < 1.4 , yesod-static >= 1.2 && < 1.3 , yesod-form >= 1.3 && < 1.4 @@ -459,9 +459,9 @@ library , fay >= 0.16 , bytestring >= 0.9 && < 0.11 , text >= 0.11 && < 2.0 - , persistent >= 1.3 && < 1.4 - , persistent-postgresql >= 1.3 && < 1.4 - , persistent-template >= 1.3 && < 1.4 + , persistent >= 2.0 && < 2.1 + , persistent-postgresql >= 2.0 && < 2.1 + , persistent-template >= 2.0 && < 2.1 , template-haskell , shakespeare >= 2.0 && < 2.1 , monad-control >= 0.3 && < 0.4 diff --git a/yesod-bin/hsfiles/postgres.hsfiles b/yesod-bin/hsfiles/postgres.hsfiles index bb8e1346..0634535a 100644 --- a/yesod-bin/hsfiles/postgres.hsfiles +++ b/yesod-bin/hsfiles/postgres.hsfiles @@ -130,7 +130,7 @@ import Network.HTTP.Client.Conduit (Manager, HasHttpManager (getHttpManager)) import qualified Settings import Settings.Development (development) import qualified Database.Persist -import Database.Persist.Sql (SqlPersistT) +import Database.Persist.Sql (SqlBackend) import Settings.StaticFiles import Settings (widgetFile, Extra (..)) import Model @@ -195,7 +195,7 @@ instance Yesod App where , css_bootstrap_css ]) $(widgetFile "default-layout") - giveUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") + withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") -- This is done to provide an optimization for serving static files from -- a separate domain. Please see the staticRoot setting in Settings.hs @@ -237,7 +237,7 @@ instance Yesod App where -- How to run database actions. instance YesodPersist App where - type YesodPersistBackend App = SqlPersistT + type YesodPersistBackend App = SqlBackend runDB = defaultRunDB persistConfig connPool instance YesodPersistRunner App where getDBRunner = defaultGetDBRunner connPool @@ -366,7 +366,7 @@ import Prelude -- You can find more information on persistent and how to declare entities -- at: -- http://www.yesodweb.com/book/persistent/ -share [mkPersist sqlOnlySettings, mkMigrate "migrateAll"] +share [mkPersist sqlSettings, mkMigrate "migrateAll"] $(persistFileWith lowerCaseSettings "config/models") {-# START_FILE PROJECTNAME.cabal #-} @@ -415,15 +415,15 @@ library build-depends: base >= 4 && < 5 , yesod >= 1.2.5 && < 1.3 - , yesod-core >= 1.2.12 && < 1.3 + , yesod-core >= 1.2.20 && < 1.3 , yesod-auth >= 1.3 && < 1.4 , yesod-static >= 1.2 && < 1.3 , yesod-form >= 1.3 && < 1.4 , bytestring >= 0.9 && < 0.11 , text >= 0.11 && < 2.0 - , persistent >= 1.3 && < 1.4 - , persistent-postgresql >= 1.3 && < 1.4 - , persistent-template >= 1.3 && < 1.4 + , persistent >= 2.0 && < 2.1 + , persistent-postgresql >= 2.0 && < 2.1 + , persistent-template >= 2.0 && < 2.1 , template-haskell , shakespeare >= 2.0 && < 2.1 , hjsmin >= 0.1 && < 0.2 diff --git a/yesod-bin/hsfiles/simple.hsfiles b/yesod-bin/hsfiles/simple.hsfiles index 449a2e4f..ec1ccb2a 100644 --- a/yesod-bin/hsfiles/simple.hsfiles +++ b/yesod-bin/hsfiles/simple.hsfiles @@ -174,7 +174,7 @@ instance Yesod App where , css_bootstrap_css ]) $(widgetFile "default-layout") - giveUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") + withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") -- This is done to provide an optimization for serving static files from -- a separate domain. Please see the staticRoot setting in Settings.hs @@ -342,7 +342,7 @@ library build-depends: base >= 4 && < 5 , yesod >= 1.2.5 && < 1.3 - , yesod-core >= 1.2.12 && < 1.3 + , yesod-core >= 1.2.20 && < 1.3 , yesod-auth >= 1.3 && < 1.4 , yesod-static >= 1.2 && < 1.3 , yesod-form >= 1.3 && < 1.4 diff --git a/yesod-bin/hsfiles/sqlite.hsfiles b/yesod-bin/hsfiles/sqlite.hsfiles index bd288dd8..0d3772b6 100644 --- a/yesod-bin/hsfiles/sqlite.hsfiles +++ b/yesod-bin/hsfiles/sqlite.hsfiles @@ -130,7 +130,7 @@ import Network.HTTP.Client.Conduit (Manager, HasHttpManager (getHttpManager)) import qualified Settings import Settings.Development (development) import qualified Database.Persist -import Database.Persist.Sql (SqlPersistT) +import Database.Persist.Sql (SqlBackend) import Settings.StaticFiles import Settings (widgetFile, Extra (..)) import Model @@ -195,7 +195,7 @@ instance Yesod App where , css_bootstrap_css ]) $(widgetFile "default-layout") - giveUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") + withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") -- This is done to provide an optimization for serving static files from -- a separate domain. Please see the staticRoot setting in Settings.hs @@ -237,7 +237,7 @@ instance Yesod App where -- How to run database actions. instance YesodPersist App where - type YesodPersistBackend App = SqlPersistT + type YesodPersistBackend App = SqlBackend runDB = defaultRunDB persistConfig connPool instance YesodPersistRunner App where getDBRunner = defaultGetDBRunner connPool @@ -366,7 +366,7 @@ import Prelude -- You can find more information on persistent and how to declare entities -- at: -- http://www.yesodweb.com/book/persistent/ -share [mkPersist sqlOnlySettings, mkMigrate "migrateAll"] +share [mkPersist sqlSettings, mkMigrate "migrateAll"] $(persistFileWith lowerCaseSettings "config/models") {-# START_FILE PROJECTNAME.cabal #-} @@ -415,15 +415,15 @@ library build-depends: base >= 4 && < 5 , yesod >= 1.2.5 && < 1.3 - , yesod-core >= 1.2.12 && < 1.3 + , yesod-core >= 1.2.20 && < 1.3 , yesod-auth >= 1.3 && < 1.4 , yesod-static >= 1.2 && < 1.3 , yesod-form >= 1.3 && < 1.4 , bytestring >= 0.9 && < 0.11 , text >= 0.11 && < 2.0 - , persistent >= 1.3 && < 1.4 - , persistent-sqlite >= 1.3 && < 1.4 - , persistent-template >= 1.3 && < 1.4 + , persistent >= 2.0 && < 2.1 + , persistent-sqlite >= 2.0 && < 2.1 + , persistent-template >= 2.0 && < 2.1 , template-haskell , shakespeare >= 2.0 && < 2.1 , hjsmin >= 0.1 && < 0.2 diff --git a/yesod-bin/yesod-bin.cabal b/yesod-bin/yesod-bin.cabal index 5952d4f3..e7d3ab65 100644 --- a/yesod-bin/yesod-bin.cabal +++ b/yesod-bin/yesod-bin.cabal @@ -1,5 +1,5 @@ name: yesod-bin -version: 1.2.12.8 +version: 1.2.13 license: MIT license-file: LICENSE author: Michael Snoyman From 50f57a35867948166d581d35aef86369714b0983 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 14 Sep 2014 11:04:16 +0300 Subject: [PATCH 03/11] Fix browserid.hs (closes #547) --- yesod-auth/browserid.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/yesod-auth/browserid.hs b/yesod-auth/browserid.hs index 8a768298..5b94e4a1 100644 --- a/yesod-auth/browserid.hs +++ b/yesod-auth/browserid.hs @@ -26,7 +26,7 @@ mkYesod "BID" [parseRoutes| getRootR :: Handler () getRootR = redirect $ AuthR LoginR -getAfterLoginR :: Handler RepHtml +getAfterLoginR :: Handler Html getAfterLoginR = do mauth <- maybeAuthId defaultLayout $ toWidget [hamlet| @@ -41,13 +41,14 @@ instance YesodAuth BID where loginDest _ = AfterLoginR logoutDest _ = AuthR LoginR getAuthId = return . Just . credsIdent - authPlugins _ = [authBrowserId] + authPlugins _ = [authBrowserId def] authHttpManager = httpManager + maybeAuthId = lookupSession credsKey instance RenderMessage BID FormMessage where renderMessage _ _ = defaultFormMessage main :: IO () main = do - m <- newManager def + m <- newManager conduitManagerSettings toWaiApp (BID m) >>= run 3000 . logStdoutDev From 581a688cf5be79b42a911d13d19d8d0ebc3f3bda Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Sat, 13 Sep 2014 18:52:17 +1000 Subject: [PATCH 04/11] yesod-test: Improve CSS selector parser. * Tighten up what the parser will accept (especially wrt identifiers). * Write the parser in a more idiomatic (for *parsec) style. --- yesod-test/Yesod/Test/CssQuery.hs | 92 +++++++++++++++---------------- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/yesod-test/Yesod/Test/CssQuery.hs b/yesod-test/Yesod/Test/CssQuery.hs index 1cf496be..af9146c8 100644 --- a/yesod-test/Yesod/Test/CssQuery.hs +++ b/yesod-test/Yesod/Test/CssQuery.hs @@ -9,7 +9,10 @@ module Yesod.Test.CssQuery import Prelude hiding (takeWhile) import Data.Text (Text) import Data.Attoparsec.Text -import Control.Applicative (many, (<|>), optional) +import Control.Applicative +import Data.Char + +import qualified Data.Text as T data SelectorGroup = DirectChildren [Selector] @@ -27,6 +30,13 @@ data Selector | ByAttrEnds Text Text deriving (Show, Eq) + +-- The official syntax specification for CSS2 can be found here: +-- http://www.w3.org/TR/CSS2/syndata.html +-- but that spec is tricky to fully support. Instead we do the minimal and we +-- can extend it as needed. + + -- | Parses a query into an intermediate format which is easy to feed to HXT -- -- * The top-level lists represent the top level comma separated queries. @@ -41,66 +51,54 @@ parseQuery = parseOnly cssQuery -- Below this line is the Parsec parser for css queries. cssQuery :: Parser [[SelectorGroup]] -cssQuery = sepBy rules (char ',' >> (optional (char ' '))) +cssQuery = sepBy rules (char ',' >> optional (char ' ')) rules :: Parser [SelectorGroup] rules = many $ directChildren <|> deepChildren directChildren :: Parser SelectorGroup -directChildren = do - _ <- char '>' - _ <- char ' ' - sels <- selectors - _ <- optional $ char ' ' - return $ DirectChildren sels +directChildren = string "> " >> DirectChildren <$> parseSelectors deepChildren :: Parser SelectorGroup -deepChildren = do - sels <- selectors - _ <- optional $ char ' ' - return $ DeepChildren sels - -selectors :: Parser [Selector] -selectors = many1 $ parseId - <|> parseClass - <|> parseTag - <|> parseAttr +deepChildren = DeepChildren <$> parseSelectors + +parseSelectors :: Parser [Selector] +parseSelectors = pOptionalTrailingSpace . many1 $ + parseId <|> parseClass <|> parseTag <|> parseAttr parseId :: Parser Selector -parseId = do - _ <- char '#' - x <- takeWhile $ flip notElem ",#.[ >" - return $ ById x +parseId = char '#' >> ById <$> pIdent parseClass :: Parser Selector -parseClass = do - _ <- char '.' - x <- takeWhile $ flip notElem ",#.[ >" - return $ ByClass x +parseClass = char '.' >> ByClass <$> pIdent parseTag :: Parser Selector -parseTag = do - x <- takeWhile1 $ flip notElem ",#.[ >" - return $ ByTagName x +parseTag = ByTagName <$> pIdent parseAttr :: Parser Selector -parseAttr = do - _ <- char '[' - name <- takeWhile $ flip notElem ",#.=$^*]" - (parseAttrExists name) - <|> (parseAttrWith "=" ByAttrEquals name) - <|> (parseAttrWith "*=" ByAttrContains name) - <|> (parseAttrWith "^=" ByAttrStarts name) - <|> (parseAttrWith "$=" ByAttrEnds name) +parseAttr = pSquare $ choice + [ ByAttrEquals <$> pIdent <*> (string "=" *> pAttrValue) + , ByAttrContains <$> pIdent <*> (string "*=" *> pAttrValue) + , ByAttrStarts <$> pIdent <*> (string "^=" *> pAttrValue) + , ByAttrEnds <$> pIdent <*> (string "$=" *> pAttrValue) + , ByAttrExists <$> pIdent + ] -parseAttrExists :: Text -> Parser Selector -parseAttrExists attrname = do - _ <- char ']' - return $ ByAttrExists attrname +-- | pIdent : Parse an identifier (not yet supporting escapes and unicode as +-- part of the identifier). Basically the regex: [-]?[_a-zA-Z][_a-zA-Z0-9]* +pIdent :: Parser Text +pIdent = pOptionalTrailingSpace $ do + leadingMinus <- string "-" <|> pure "" + nmstart <- T.singleton <$> satisfy (\c -> isAlpha c || c == '_') + nmchar <- takeWhile (\c -> isAlphaNum c || c == '_') + return $ T.concat [ leadingMinus, nmstart, nmchar ] -parseAttrWith :: Text -> (Text -> Text -> Selector) -> Text -> Parser Selector -parseAttrWith sign constructor name = do - _ <- string sign - value <- takeWhile $ flip notElem ",#.]" - _ <- char ']' - return $ constructor name value + +pAttrValue :: Parser Text +pAttrValue = takeWhile (/= ']') + +pSquare :: Parser a -> Parser a +pSquare p = char '[' *> p <* char ']' + +pOptionalTrailingSpace :: Parser a -> Parser a +pOptionalTrailingSpace p = p <* optional (char ' ') From 448b33d1cc5b6d8c056ba1548746a17b33ca882a Mon Sep 17 00:00:00 2001 From: Greg Weber Date: Tue, 16 Sep 2014 18:10:40 -0700 Subject: [PATCH 05/11] fix confirmation email status I screwed this up in a big re-factoring in 153654ad --- yesod-auth/Yesod/Auth/Email.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yesod-auth/Yesod/Auth/Email.hs b/yesod-auth/Yesod/Auth/Email.hs index 95def734..243a1ff8 100644 --- a/yesod-auth/Yesod/Auth/Email.hs +++ b/yesod-auth/Yesod/Auth/Email.hs @@ -182,7 +182,9 @@ class ( YesodAuth site confirmationEmailSentResponse :: Text -> HandlerT site IO TypedContent confirmationEmailSentResponse identifier = do mr <- getMessageRender - messageJson401 (mr msg) $ authLayout $ do + selectRep $ do + provideJsonMessage (mr msg) + provideRep $ authLayout $ do setTitleI Msg.ConfirmationEmailSentTitle [whamlet|

_{msg}|] where From 51927638c17ce81e6445cf0d6d5c5ac3d23b9d7d Mon Sep 17 00:00:00 2001 From: Greg Weber Date: Tue, 16 Sep 2014 18:50:06 -0700 Subject: [PATCH 06/11] version bump --- yesod-auth/yesod-auth.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yesod-auth/yesod-auth.cabal b/yesod-auth/yesod-auth.cabal index 6affcb56..a4c4ed69 100644 --- a/yesod-auth/yesod-auth.cabal +++ b/yesod-auth/yesod-auth.cabal @@ -1,5 +1,5 @@ name: yesod-auth -version: 1.3.4.4 +version: 1.3.4.5 license: MIT license-file: LICENSE author: Michael Snoyman, Patrick Brisbin From 8c2542eb8c1d356e2c44e977a0fa8c05b5109dd5 Mon Sep 17 00:00:00 2001 From: Greg Weber Date: Wed, 17 Sep 2014 09:24:54 -0700 Subject: [PATCH 07/11] add required attribute --- yesod-auth/Yesod/Auth/Email.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yesod-auth/Yesod/Auth/Email.hs b/yesod-auth/Yesod/Auth/Email.hs index 243a1ff8..6a8e8471 100644 --- a/yesod-auth/Yesod/Auth/Email.hs +++ b/yesod-auth/Yesod/Auth/Email.hs @@ -245,11 +245,11 @@ $newline never _{Msg.Email} - + _{Msg.Password} - +