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 8b9bb31cf399d71353ea0f27a7d59e2061b1e4b6
Author: Felix Auringer <[email protected]>
AuthorDate: Mon Nov 17 11:05:08 2025 +0100

    refactor(managesieve): accept plain authentication without leading null byte
---
 .../java/org/apache/james/managesieveserver/AuthenticateTest.java    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/server/protocols/protocols-managesieve/src/test/java/org/apache/james/managesieveserver/AuthenticateTest.java
 
b/server/protocols/protocols-managesieve/src/test/java/org/apache/james/managesieveserver/AuthenticateTest.java
index e9aea8302d..dfdce97777 100644
--- 
a/server/protocols/protocols-managesieve/src/test/java/org/apache/james/managesieveserver/AuthenticateTest.java
+++ 
b/server/protocols/protocols-managesieve/src/test/java/org/apache/james/managesieveserver/AuthenticateTest.java
@@ -82,13 +82,12 @@ public class AuthenticateTest {
     // The SASL PLAIN standard (https://datatracker.ietf.org/doc/html/rfc4616) 
defines the following message:
     // message = [authzid] UTF8NUL authcid UTF8NUL passwd
     // The current code is more lenient and accepts the message without the 
first null byte.
-    @Disabled
     @Test
-    void plainLoginWithMalformedMessageShouldNotSucceed() throws IOException {
+    void plainLoginWithoutLeadingNullByteShouldSucceed() throws IOException {
         String initialClientResponse = 
ManageSieveServerTestSystem.USERNAME.asString() + "\0" + 
ManageSieveServerTestSystem.PASSWORD;
         this.client.sendCommand("AUTHENTICATE \"PLAIN\" \"" + 
Base64.getEncoder().encodeToString(initialClientResponse.getBytes(StandardCharsets.UTF_8))
 + "\"");
         ManageSieveClient.ServerResponse authenticationResponse = 
this.client.readResponse();
-        
Assertions.assertThat(authenticationResponse.responseType()).isEqualTo(ManageSieveClient.ResponseType.NO);
+        
Assertions.assertThat(authenticationResponse.responseType()).isEqualTo(ManageSieveClient.ResponseType.OK);
     }
 
     @Test


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to