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:
Nanne Baars 2019-07-28 20:50:19 +02:00
parent e61c943f97
commit 18eee4df58
2 changed files with 1 additions and 3 deletions

View File

@ -10,7 +10,6 @@ import java.time.LocalDateTime;
@Data
public class Email implements Serializable {
private LocalDateTime time;
private String contents;
private String sender;
private String title;

View File

@ -32,11 +32,10 @@ public class MailAssignment extends AssignmentEndpoint {
@ResponseBody
public AttackResult sendEmail(@RequestParam String email) {
String username = email.substring(0, email.indexOf("@"));
if (username.equals(getWebSession().getUserName())) {
if (username.equalsIgnoreCase(getWebSession().getUserName())) {
Email mailEvent = Email.builder()
.recipient(username)
.title("Test messages from WebWolf")
.time(LocalDateTime.now())
.contents("This is a test message from WebWolf, your unique code is: " + StringUtils.reverse(username))
.sender("webgoat@owasp.org")
.build();