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
The following commit(s) were added to refs/heads/master by this push:
new d4875be54c JAMES-4037 Fix NPE in IMAP LIST with APPENDLIMIT (#2257)
d4875be54c is described below
commit d4875be54cd4705236a8a0038d260bcef8e10c4a
Author: Benoit TELLIER <[email protected]>
AuthorDate: Thu May 30 14:31:33 2024 +0200
JAMES-4037 Fix NPE in IMAP LIST with APPENDLIMIT (#2257)
---
.../src/test/java/org/apache/james/IMAPIntegrationTest.java | 10 ++++++++++
.../org/apache/james/modules/protocols/IMAPServerModule.java | 2 ++
2 files changed, 12 insertions(+)
diff --git
a/server/apps/memory-app/src/test/java/org/apache/james/IMAPIntegrationTest.java
b/server/apps/memory-app/src/test/java/org/apache/james/IMAPIntegrationTest.java
index 70241c5a84..bd85641198 100644
---
a/server/apps/memory-app/src/test/java/org/apache/james/IMAPIntegrationTest.java
+++
b/server/apps/memory-app/src/test/java/org/apache/james/IMAPIntegrationTest.java
@@ -77,4 +77,14 @@ class IMAPIntegrationTest {
.contains("OK GETACL completed.");
}
+ @Test
+ void listStatusAppendLimitShouldSucceed(GuiceJamesServer guiceJamesServer)
throws Exception {
+ TestIMAPClient testIMAPClient = new TestIMAPClient();
+ testIMAPClient.connect(LOCALHOST_IP,
guiceJamesServer.getProbe(ImapGuiceProbe.class).getImapPort())
+ .login(BOB.asString(), BOB_PASSWORD);
+
+ assertThat(testIMAPClient.sendCommand("LIST \"\" % RETURN (STATUS
(APPENDLIMIT))"))
+ .contains("OK LIST completed.");
+ }
+
}
diff --git
a/server/container/guice/protocols/imap/src/main/java/org/apache/james/modules/protocols/IMAPServerModule.java
b/server/container/guice/protocols/imap/src/main/java/org/apache/james/modules/protocols/IMAPServerModule.java
index 52e17e7c0e..6a56ba6e60 100644
---
a/server/container/guice/protocols/imap/src/main/java/org/apache/james/modules/protocols/IMAPServerModule.java
+++
b/server/container/guice/protocols/imap/src/main/java/org/apache/james/modules/protocols/IMAPServerModule.java
@@ -56,6 +56,7 @@ import org.apache.james.imap.processor.DefaultProcessor;
import org.apache.james.imap.processor.EnableProcessor;
import org.apache.james.imap.processor.PermitEnableCapabilityProcessor;
import org.apache.james.imap.processor.SelectProcessor;
+import org.apache.james.imap.processor.StatusProcessor;
import org.apache.james.imap.processor.base.AbstractProcessor;
import org.apache.james.imap.processor.base.UnknownRequestProcessor;
import org.apache.james.imapserver.netty.IMAPServerFactory;
@@ -98,6 +99,7 @@ public class IMAPServerModule extends AbstractModule {
bind(CapabilityProcessor.class).in(Scopes.SINGLETON);
bind(AuthenticateProcessor.class).in(Scopes.SINGLETON);
bind(SelectProcessor.class).in(Scopes.SINGLETON);
+ bind(StatusProcessor.class).in(Scopes.SINGLETON);
bind(EnableProcessor.class).in(Scopes.SINGLETON);
bind(MailboxTyper.class).to(DefaultMailboxTyper.class).in(Scopes.SINGLETON);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]