From c5dc71662a68a3df195c32ec814348c38ad82bd5 Mon Sep 17 00:00:00 2001 From: SamSutt <57134928+SamSutt@users.noreply.github.com> Date: Tue, 29 Oct 2019 14:21:54 +0100 Subject: [PATCH] Bugfix Issue 1570 (#1640) Relating to the Issue (https://github.com/gophish/gophish/issues/1570), this could be an easy fix. --- models/template_context.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/models/template_context.go b/models/template_context.go index 96e03f3e..a524d304 100644 --- a/models/template_context.go +++ b/models/template_context.go @@ -45,7 +45,10 @@ func NewPhishingTemplateContext(ctx TemplateContext, r BaseRecipient, rid string // For the base URL, we'll reset the the path and the query // This will create a URL in the form of http://example.com - baseURL, _ := url.Parse(templateURL) + baseURL, err:= url.Parse(templateURL) + if err != nil { + return PhishingTemplateContext{}, err + } baseURL.Path = "" baseURL.RawQuery = ""