You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2022/03/22 02:03:51 UTC

[james-project] 22/25: JAMES-3722 SELECT do not supports CONDSTORE to be immediately followed by a ')'

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 cea3297660a8f3282783febab504b95c43a1225d
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Thu Mar 10 09:08:14 2022 +0700

    JAMES-3722 SELECT do not supports CONDSTORE to be immediately followed by a ')'
    
    This behaviour did not comply with the example of RFC-4551 section 3.7
---
 .../apache/james/imap/decode/parser/AbstractSelectionCommandParser.java | 2 +-
 .../src/test/java/org/apache/james/imapserver/netty/IMAPServerTest.java | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AbstractSelectionCommandParser.java b/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AbstractSelectionCommandParser.java
index d06f2f1..f73afb9 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AbstractSelectionCommandParser.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/decode/parser/AbstractSelectionCommandParser.java
@@ -67,7 +67,7 @@ public abstract class AbstractSelectionCommandParser extends AbstractImapCommand
             switch (n) {
             case 'C':
                 // It starts with C so it should be CONDSTORE
-                request.consumeWord(StringMatcherCharacterValidator.ignoreCase(CONDSTORE));
+                request.consumeWord(StringMatcherCharacterValidator.ignoreCase(CONDSTORE), true);
                 condstore = true;
                 break;
             case 'Q':
diff --git a/server/protocols/protocols-imap4/src/test/java/org/apache/james/imapserver/netty/IMAPServerTest.java b/server/protocols/protocols-imap4/src/test/java/org/apache/james/imapserver/netty/IMAPServerTest.java
index 32f889c..89d40d3 100644
--- a/server/protocols/protocols-imap4/src/test/java/org/apache/james/imapserver/netty/IMAPServerTest.java
+++ b/server/protocols/protocols-imap4/src/test/java/org/apache/james/imapserver/netty/IMAPServerTest.java
@@ -1569,7 +1569,6 @@ class IMAPServerTest {
                 .hasSize(1);
         }
 
-        @Disabled("JAMES-3722 SELECT do not supports CONDSTORE to be immediately followed by a ')'")
         @Test
         void selectShouldAcceptCondstore() throws Exception {
             clientConnection.write(ByteBuffer.wrap(String.format("a0 LOGIN %s %s\r\n", USER.asString(), USER_PASS).getBytes(StandardCharsets.UTF_8)));
@@ -1581,7 +1580,6 @@ class IMAPServerTest {
                 .isNotNull();
         }
 
-        @Disabled("JAMES-3722 SELECT do not supports CONDSTORE to be immediately followed by a ')'")
         @Test
         void selectShouldEnableCondstore() throws Exception {
             clientConnection.write(ByteBuffer.wrap(String.format("a0 LOGIN %s %s\r\n", USER.asString(), USER_PASS).getBytes(StandardCharsets.UTF_8)));

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