Commit f5529f6f authored by Karen Konou's avatar Karen Konou

[Forgot passwrd] Encode server in mail

parent 89a11753
......@@ -487,6 +487,7 @@ library
, transformers-base
, tuple
, unordered-containers
, uri-encode
, utf8-string
, uuid
, validity
......
......@@ -274,6 +274,7 @@ library:
- unordered-containers
- utf8-string
- uuid
- uri-encode
- validity
- vector
- wai
......
......@@ -12,6 +12,7 @@ Portability : POSIX
module Gargantext.Core.Mail where
import Control.Lens (view)
import Network.URI.Encode (encodeText)
import Data.Text (Text, unlines, splitOn)
import Gargantext.Core.Types.Individu
import Gargantext.Database.Schema.User (UserLight(..))
......@@ -90,8 +91,7 @@ bodyWith server (ForgotPassword { user = UserLight { userLight_forgot_password_u
, forgot_password_link server uuid ]
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=" <> server
forgot_password_link server uuid = server <> "/#/forgot-password?uuid=" <> uuid <> "&server=" <> encodeText server
------------------------------------------------------------------------
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