go fmt
This commit is contained in:
5
lost.go
5
lost.go
@@ -5,8 +5,8 @@ import (
|
||||
"encoding/base64"
|
||||
"encoding/binary"
|
||||
"io"
|
||||
"net/http"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"time"
|
||||
@@ -51,7 +51,6 @@ func (l LDAPConn) genToken(dn string, previous bool) string {
|
||||
return base64.StdEncoding.EncodeToString(hash.Sum(nil)[:])
|
||||
}
|
||||
|
||||
|
||||
func lostPassword(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != "POST" {
|
||||
displayTmpl(w, "lost.html", map[string]interface{}{})
|
||||
@@ -115,7 +114,7 @@ func lostPassword(w http.ResponseWriter, r *http.Request) {
|
||||
m.SetHeader("From", "noreply@nemunai.re")
|
||||
m.SetHeader("To", email)
|
||||
m.SetHeader("Subject", "SSO nemunai.re: password recovery")
|
||||
m.SetBody("text/plain", "Hello " + cn + "!\n\nSomeone, and we hope it's you, requested to reset your account password. \nIn order to continue, go to:\nhttps://ldap.nemunai.re/reset?l=" + r.PostFormValue("login") + "&t=" + token + "\n\nBest regards,\n-- \nnemunai.re SSO")
|
||||
m.SetBody("text/plain", "Hello "+cn+"!\n\nSomeone, and we hope it's you, requested to reset your account password. \nIn order to continue, go to:\nhttps://ldap.nemunai.re/reset?l="+r.PostFormValue("login")+"&t="+token+"\n\nBest regards,\n-- \nnemunai.re SSO")
|
||||
|
||||
// Using local sendmail: delegate to the local admin sys the responsability to transport the mail
|
||||
s := gomail.SendFunc(func(from string, to []string, msg io.WriterTo) error {
|
||||
|
||||
Reference in New Issue
Block a user