-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve null safety of amazon subject obfuscation
- Loading branch information
1 parent
b1c0776
commit 97d0e78
Showing
2 changed files
with
2 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,7 +93,7 @@ public Message(javax.mail.Message message, | |
this.fromAddress = sender.getAddress(); | ||
this.fromPersonal = sender.getPersonal(); | ||
} | ||
if (obfuscateAmazonOrderSubject && (this.fromAddress.equalsIgnoreCase("[email protected]") || this.subject.toLowerCase().contains("your amazon.com order of \""))) { | ||
if (obfuscateAmazonOrderSubject && ("[email protected]".equalsIgnoreCase(this.fromAddress) || (this.subject != null && this.subject.toLowerCase().contains("your amazon.com order of \"")))) { | ||
this.subject = subject.replaceAll("\"(.*?)\"", "*****"); | ||
} | ||
javax.mail.Address[] recipients = message.getRecipients(javax.mail.Message.RecipientType.TO); | ||
|