Fixed regex/without domain

pull/199/head
M66B 4 years ago
parent 717f0acad2
commit 2ac8c6f012

@ -168,7 +168,13 @@ public class EntityIdentity {
if (user.equalsIgnoreCase(cemail[0])) if (user.equalsIgnoreCase(cemail[0]))
return true; return true;
} else { } else {
String input = (sender_extra_regex.contains("@") ? other.toLowerCase(Locale.ROOT) : cother[0]); // Domain
boolean at = sender_extra_regex.contains("@");
if (!at && !cother[1].equalsIgnoreCase(cemail[1]))
return false;
// User
String input = (at ? other.toLowerCase(Locale.ROOT) : cother[0]);
if (Pattern.matches(sender_extra_regex, input)) if (Pattern.matches(sender_extra_regex, input))
return true; return true;
} }

Loading…
Cancel
Save