forked from gophish/gophish
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from gophish/master
SRE-3199: Sync upstream repo with branch
- Loading branch information
Showing
8 changed files
with
68 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -284,7 +284,7 @@ func (s *ModelsSuite) TestMailLogGenerateOverrideTransparencyHeaders(ch *check.C | |
smtp := SMTP{ | ||
Name: "Test SMTP", | ||
Host: "1.1.1.1:25", | ||
FromAddress: "Foo Bar <[email protected]>", | ||
FromAddress: "[email protected]", | ||
UserId: 1, | ||
Headers: []Header{ | ||
Header{Key: "X-Gophish-Contact", Value: ""}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ func (s *ModelsSuite) TestPostSMTP(c *check.C) { | |
smtp := SMTP{ | ||
Name: "Test SMTP", | ||
Host: "1.1.1.1:25", | ||
FromAddress: "Foo Bar <[email protected]>", | ||
FromAddress: "[email protected]", | ||
UserId: 1, | ||
} | ||
err := PostSMTP(&smtp) | ||
|
@@ -25,7 +25,7 @@ func (s *ModelsSuite) TestPostSMTP(c *check.C) { | |
func (s *ModelsSuite) TestPostSMTPNoHost(c *check.C) { | ||
smtp := SMTP{ | ||
Name: "Test SMTP", | ||
FromAddress: "Foo Bar <[email protected]>", | ||
FromAddress: "[email protected]", | ||
UserId: 1, | ||
} | ||
err := PostSMTP(&smtp) | ||
|
@@ -42,12 +42,34 @@ func (s *ModelsSuite) TestPostSMTPNoFrom(c *check.C) { | |
c.Assert(err, check.Equals, ErrFromAddressNotSpecified) | ||
} | ||
|
||
func (s *ModelsSuite) TestPostSMTPValidHeader(c *check.C) { | ||
func (s *ModelsSuite) TestPostInvalidFrom(c *check.C) { | ||
smtp := SMTP{ | ||
Name: "Test SMTP", | ||
Host: "1.1.1.1:25", | ||
FromAddress: "Foo Bar <[email protected]>", | ||
UserId: 1, | ||
} | ||
err := PostSMTP(&smtp) | ||
c.Assert(err, check.Equals, ErrInvalidFromAddress) | ||
} | ||
|
||
func (s *ModelsSuite) TestPostInvalidFromEmail(c *check.C) { | ||
smtp := SMTP{ | ||
Name: "Test SMTP", | ||
Host: "1.1.1.1:25", | ||
FromAddress: "example.com", | ||
UserId: 1, | ||
} | ||
err := PostSMTP(&smtp) | ||
c.Assert(err, check.Equals, ErrInvalidFromAddress) | ||
} | ||
|
||
func (s *ModelsSuite) TestPostSMTPValidHeader(c *check.C) { | ||
smtp := SMTP{ | ||
Name: "Test SMTP", | ||
Host: "1.1.1.1:25", | ||
FromAddress: "[email protected]", | ||
UserId: 1, | ||
Headers: []Header{ | ||
Header{Key: "Reply-To", Value: "[email protected]"}, | ||
Header{Key: "X-Mailer", Value: "gophish"}, | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ <h4 class="modal-title" id="profileModalLabel">New Sending Profile</h4> | |
<input type="text" class="form-control" value="SMTP" id="interface_type" disabled /> | ||
<label class="control-label" for="from">SMTP From: <i class="fa fa-question-circle" | ||
data-toggle="tooltip" data-placement="right" title="Set this to an email address from your sending domain to bypass SPF-checks. You can set the Envelope Sender in Email Templates. The Envelope Sender is shown to the user."></i></label> | ||
<input type="text" class="form-control" placeholder="First Last <[email protected]>" id="from" | ||
<input type="text" class="form-control" placeholder="[email protected]" id="from" | ||
required /> | ||
<label class="control-label" for="host">Host:</label> | ||
<input type="text" class="form-control" placeholder="smtp.example.com:25" id="host" required /> | ||
|