diff --git a/controllers/phish.go b/controllers/phish.go index 27fb2c40..4e8eed4f 100644 --- a/controllers/phish.go +++ b/controllers/phish.go @@ -114,6 +114,8 @@ func PhishHandler(w http.ResponseWriter, r *http.Request) { p, err := models.GetPage(c.PageId, c.UserId) if err != nil { Logger.Println(err) + http.NotFound(w, r) + return } switch { case r.Method == "GET": @@ -143,6 +145,7 @@ func PhishHandler(w http.ResponseWriter, r *http.Request) { if err != nil { Logger.Println(err) http.NotFound(w, r) + return } f, err := mail.ParseAddress(c.SMTP.FromAddress) if err != nil { @@ -171,6 +174,7 @@ func PhishHandler(w http.ResponseWriter, r *http.Request) { if err != nil { Logger.Println(err) http.NotFound(w, r) + return } w.Write(htmlBuff.Bytes()) }