JAMES-3773 Fix a blocking call in a reactive pipeline in XUserAuthenticationStrategy master
authorRene Cordier <rcordier@linagora.com>
Tue, 28 Jun 2022 08:23:36 +0000 (15:23 +0700)
committerRene Cordier <rene.cordier@gmail.com>
Wed, 29 Jun 2022 07:07:47 +0000 (14:07 +0700)
server/protocols/jmap/src/main/java/org/apache/james/jmap/http/XUserAuthenticationStrategy.java

index 0847a0f58c3a9d173d297b6fc364c1920d14ec82..6de554251145076dd82820740847ab4d3c283111 100644 (file)
@@ -29,6 +29,7 @@ import org.apache.james.mailbox.MailboxManager;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.user.api.UsersRepository;
 import org.apache.james.user.api.UsersRepositoryException;
+import org.apache.james.util.ReactorUtils;
 
 import com.google.common.collect.ImmutableMap;
 
@@ -68,7 +69,7 @@ public class XUserAuthenticationStrategy implements AuthenticationStrategy {
                 throw new UnauthorizedException("Invalid username", e);
             }
             return mailboxManager.createSystemSession(username);
-        });
+        }).subscribeOn(ReactorUtils.BLOCKING_CALL_WRAPPER);
     }
 
     @Override