You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2018/12/26 08:17:53 UTC

[GitHub] dongeforever commented on a change in pull request #632: [ISSUE#403] fix some bugs and Optimization code for rocketmq's acl feature.

dongeforever commented on a change in pull request #632: [ISSUE#403] fix some bugs and Optimization code for rocketmq's acl feature.
URL: https://github.com/apache/rocketmq/pull/632#discussion_r243958936
 
 

 ##########
 File path: acl/src/main/java/org/apache/rocketmq/acl/plain/PlainAccessValidator.java
 ##########
 @@ -47,7 +47,7 @@ public PlainAccessValidator() {
     @Override
     public AccessResource parse(RemotingCommand request, String remoteAddr) {
         PlainAccessResource accessResource = new PlainAccessResource();
-        accessResource.setWhiteRemoteAddress(remoteAddr);
+        accessResource.setWhiteRemoteAddress(remoteAddr.split(":")[0]);
 
 Review comment:
   It is better to check before split.
   If remoteAddr does not contains ':' , just set the original value, otherwise split it.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services