quantranhong1999 commented on code in PR #1824:
URL: https://github.com/apache/james-project/pull/1824#discussion_r1436231350
##########
third-party/crowdsec/src/main/java/org/apache/james/CrowdsecImapConnectionCheck.java:
##########
@@ -41,7 +41,7 @@ public
CrowdsecImapConnectionCheck(CrowdsecClientConfiguration crowdsecClientCon
@Override
public Publisher<Void> validate(InetSocketAddress remoteAddress) {
- String ip = remoteAddress.getAddress().getHostAddress();
+ String ip = remoteAddress.getHostName();
Review Comment:
I disagree with keeping this change. `succinct` has no point if it is a
regression.
see:
-
https://stackoverflow.com/questions/55521964/different-behavior-of-inetsocketaddressgethostname-in-windows-and-linux-for-12
-
https://docs.oracle.com/javase/8/docs/api/java/net/InetAddress.html#getHostName--
hostname is different from IP address. Be careful with what you are doing.
--
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]