Fix for issue with timestamp not being parsed when sending to WebWolf
timestamp was already fixed at LocalDateTime.now() however WebGoat still send the timestamp along, removed it
This commit is contained in:
parent
e61c943f97
commit
18eee4df58
@ -10,7 +10,6 @@ import java.time.LocalDateTime;
|
|||||||
@Data
|
@Data
|
||||||
public class Email implements Serializable {
|
public class Email implements Serializable {
|
||||||
|
|
||||||
private LocalDateTime time;
|
|
||||||
private String contents;
|
private String contents;
|
||||||
private String sender;
|
private String sender;
|
||||||
private String title;
|
private String title;
|
||||||
|
@ -32,11 +32,10 @@ public class MailAssignment extends AssignmentEndpoint {
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AttackResult sendEmail(@RequestParam String email) {
|
public AttackResult sendEmail(@RequestParam String email) {
|
||||||
String username = email.substring(0, email.indexOf("@"));
|
String username = email.substring(0, email.indexOf("@"));
|
||||||
if (username.equals(getWebSession().getUserName())) {
|
if (username.equalsIgnoreCase(getWebSession().getUserName())) {
|
||||||
Email mailEvent = Email.builder()
|
Email mailEvent = Email.builder()
|
||||||
.recipient(username)
|
.recipient(username)
|
||||||
.title("Test messages from WebWolf")
|
.title("Test messages from WebWolf")
|
||||||
.time(LocalDateTime.now())
|
|
||||||
.contents("This is a test message from WebWolf, your unique code is: " + StringUtils.reverse(username))
|
.contents("This is a test message from WebWolf, your unique code is: " + StringUtils.reverse(username))
|
||||||
.sender("webgoat@owasp.org")
|
.sender("webgoat@owasp.org")
|
||||||
.build();
|
.build();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user