chibenwa commented on code in PR #1824:
URL: https://github.com/apache/james-project/pull/1824#discussion_r1434270312


##########
server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/ImapChannelUpstreamHandler.java:
##########
@@ -173,6 +184,7 @@ public void channelActive(ChannelHandlerContext ctx) throws 
Exception {
         ImapSession imapsession = new NettyImapSession(ctx.channel(), secure, 
compress, authenticationConfiguration.isSSLRequired(),
             authenticationConfiguration.isPlainAuthEnabled(), sessionId,
             authenticationConfiguration.getOidcSASLConfiguration());
+        connectionChecks.forEach(connectionCheck -> 
Mono.from(connectionCheck.validate(imapsession.getRemoteAddress())).block());

Review Comment:
   This is call is useless at best, extermely dangerous at worst if HA proxy is 
enabled...
   channelActive is called of course also when establishing a connection when 
proxy protocol is on, then called again after receiving the proxy protocol 
payload.
   Please do not call this here if the proxy protocol is on.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to