mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-03 18:26:20 +00:00
Rule move: removed $email$ to prevent security problems
This commit is contained in:
parent
4bbcd2c261
commit
64c6868d1c
2 changed files with 1 additions and 5 deletions
1
FAQ.md
1
FAQ.md
|
@ -2594,7 +2594,6 @@ A *move* action can optionally create subfolders (since version 1.1966) to move
|
|||
```
|
||||
$month$
|
||||
$year$
|
||||
$email$
|
||||
$domain$
|
||||
```
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue