Rule move: removed $email$ to prevent security problems

This commit is contained in:
M66B
2022-09-16 17:08:21 +02:00
parent 4bbcd2c261
commit 64c6868d1c
2 changed files with 1 additions and 5 deletions

View File

@@ -627,16 +627,13 @@ public class EntityRule {
create = create.replace("$year$", year);
create = create.replace("$month$", month);
String email = null;
String domain = null;
if (message.from != null &&
message.from.length > 0 &&
message.from[0] instanceof InternetAddress) {
InternetAddress from = (InternetAddress) message.from[0];
email = from.getAddress();
domain = UriHelper.getEmailDomain(email);
domain = UriHelper.getEmailDomain(from.getAddress());
}
create = create.replace("$email$", email == null ? "" : email);
create = create.replace("$domain$", domain == null ? "" : domain);
String name = folder.name + (folder.separator == null ? "" : folder.separator) + create;