Commit f5529f6f authored by Karen Konou's avatar Karen Konou

[Forgot passwrd] Encode server in mail

parent 89a11753
...@@ -487,6 +487,7 @@ library ...@@ -487,6 +487,7 @@ library
, transformers-base , transformers-base
, tuple , tuple
, unordered-containers , unordered-containers
, uri-encode
, utf8-string , utf8-string
, uuid , uuid
, validity , validity
......
...@@ -274,6 +274,7 @@ library: ...@@ -274,6 +274,7 @@ library:
- unordered-containers - unordered-containers
- utf8-string - utf8-string
- uuid - uuid
- uri-encode
- validity - validity
- vector - vector
- wai - wai
......
...@@ -12,6 +12,7 @@ Portability : POSIX ...@@ -12,6 +12,7 @@ Portability : POSIX
module Gargantext.Core.Mail where module Gargantext.Core.Mail where
import Control.Lens (view) import Control.Lens (view)
import Network.URI.Encode (encodeText)
import Data.Text (Text, unlines, splitOn) import Data.Text (Text, unlines, splitOn)
import Gargantext.Core.Types.Individu import Gargantext.Core.Types.Individu
import Gargantext.Database.Schema.User (UserLight(..)) import Gargantext.Database.Schema.User (UserLight(..))
...@@ -90,8 +91,7 @@ bodyWith server (ForgotPassword { user = UserLight { userLight_forgot_password_u ...@@ -90,8 +91,7 @@ bodyWith server (ForgotPassword { user = UserLight { userLight_forgot_password_u
, forgot_password_link server uuid ] , forgot_password_link server uuid ]
forgot_password_link :: ServerAddress -> Text -> Text forgot_password_link :: ServerAddress -> Text -> Text
-- FIXME: need to percent-encode the server in the param forgot_password_link server uuid = server <> "/#/forgot-password?uuid=" <> uuid <> "&server=" <> encodeText server
forgot_password_link server uuid = server <> "/#/forgot-password?uuid=" <> uuid <> "&server=" <> server
------------------------------------------------------------------------ ------------------------------------------------------------------------
email_subject :: MailModel -> Text email_subject :: MailModel -> Text
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment