diff --git a/login.go b/login.go index 8329600..a93df7c 100644 --- a/login.go +++ b/login.go @@ -2,9 +2,11 @@ package main import ( "fmt" + "html" "html/template" "log" "net/http" + "net/url" "strings" "github.com/go-ldap/ldap/v3" @@ -55,16 +57,23 @@ func tryLogin(w http.ResponseWriter, r *http.Request) { cnt := "

To use our Addy.io compatible API, use the following token: " + apiToken + "

")}) + displayTmpl(w, "message.html", map[string]interface{}{"details": template.HTML(`Login ok

Here are the information we have about you:` + cnt + "

To use our Addy.io compatible API, use the following token: " + html.EscapeString(apiToken) + "

")}) } }