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

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

commit 5fbbe68c7d3854c624c5434a604ec64cd20d1753
Author: Benoit TELLIER <btell...@linagora.com>
AuthorDate: Wed Oct 9 12:03:57 2024 +0200

    JAMES-2182 PathConverter: only mailboxes belonging to the user can be 
relative
---
 .../imap/src/main/java/org/apache/james/imap/main/PathConverter.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/protocols/imap/src/main/java/org/apache/james/imap/main/PathConverter.java 
b/protocols/imap/src/main/java/org/apache/james/imap/main/PathConverter.java
index 74bfc7335a..7c62d6166f 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/main/PathConverter.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/main/PathConverter.java
@@ -134,7 +134,7 @@ public interface PathConverter {
         }
 
         public String mailboxName(boolean relative, MailboxPath path, 
MailboxSession session) {
-            if (relative) {
+            if (relative && path.belongsTo(session)) {
                 return path.getName();
             } else {
                 return joinMailboxPath(path, session.getPathDelimiter());


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org

Reply via email to