Korrigiere Prüfung von Mailsuffixen
This commit is contained in:
parent
f1dd952344
commit
231c8d7fd6
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ func (b *BaseHandler) AddOfficeHourHandler(w http.ResponseWriter, req *http.Requ
|
|||
if err != nil {
|
||||
email = &mail.Address{Name: "", Address: req.FormValue("email")}
|
||||
errors = append(errors, "Mailaddresse konnte nicht geparst werden.")
|
||||
} else if !(strings.HasSuffix(email.Address, "@"+b.config.Tutor.MailSuffix) || strings.HasSuffix(email.Address, "."+b.config.Tutor.MailSuffix)) {
|
||||
} else if !(b.config.Tutor.MailSuffix == "" || strings.HasSuffix(email.Address, "@"+b.config.Tutor.MailSuffix) || strings.HasSuffix(email.Address, "."+b.config.Tutor.MailSuffix)) {
|
||||
errors = append(errors, fmt.Sprintf("Mailaddresse muss auf „%s“ enden.", b.config.Tutor.MailSuffix))
|
||||
}
|
||||
info := req.FormValue("info")
|
||||
|
|
Loading…
Reference in a new issue