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
|
||||
public class Email implements Serializable {
|
||||
|
||||
private LocalDateTime time;
|
||||
private String contents;
|
||||
private String sender;
|
||||
private String title;
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user