You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2019/08/02 09:56:48 UTC

[james-project] 04/05: JAMES-2842 addAddressMapping should check same source and destination

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 150168c4b9a159236f3e65efd6a57692e41362ec
Author: Khanh Le <bk...@linagora.com>
AuthorDate: Mon Jul 29 17:06:59 2019 +0700

    JAMES-2842 addAddressMapping should check same source and destination
---
 .../java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java     | 1 +
 1 file changed, 1 insertion(+)

diff --git a/server/data/data-library/src/main/java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java b/server/data/data-library/src/main/java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java
index 598db33..7af23d4 100644
--- a/server/data/data-library/src/main/java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java
+++ b/server/data/data-library/src/main/java/org/apache/james/rrt/lib/AbstractRecipientRewriteTable.java
@@ -206,6 +206,7 @@ public abstract class AbstractRecipientRewriteTable implements RecipientRewriteT
         checkHasValidAddress(mapping);
         checkDuplicateMapping(source, mapping);
         checkDomainMappingSourceIsManaged(source);
+        checkNotSameSourceAndDestination(source, address);
 
         LOGGER.info("Add address mapping => {} for source: {}", mapping.asString(), source.asString());
         addMapping(source, mapping);


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org