Slideee opened a new issue, #7085:
URL: https://github.com/apache/rocketmq/issues/7085

   ### Before Creating the Bug Report
   
   - [X] I found a bug, not just asking a question, which should be created in 
[GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   
   - [X] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq/discussions)  of this 
repository and believe that this is not a duplicate.
   
   - [X] I have confirmed that this bug belongs to the current repository, not 
other repositories of RocketMQ.
   
   
   ### Runtime platform environment
   
   ubuntu
   
   ### RocketMQ version
   
   4.9.7
   
   ### JDK Version
   
   1.8
   
   ### Describe the Bug
   
   When the broker enables the acl and invokes certain methods, such as 
queryMessage, using the client in 4.9.3+, acl validation fails
   
   ### Steps to Reproduce
   
   PlainAccessValidator#parse need to be repaired
   original code:
   ```
           for (Map.Entry<String, String> entry : 
request.getExtFields().entrySet()) {
               if (!SessionCredentials.SIGNATURE.equals(entry.getKey())
                   && !MixAll.UNIQUE_MSG_QUERY_FLAG.equals(entry.getKey())) {
                   map.put(entry.getKey(), entry.getValue());
               }
           }
   ```
   the repaired code:
   ```
   for (Map.Entry<String, String> entry : request.getExtFields().entrySet()) {
       if (request.getVersion() <= MQVersion.Version.V4_9_3.ordinal() &&
           MixAll.UNIQUE_MSG_QUERY_FLAG.equals(entry.getKey())) {
           continue;
       }
       if (!SessionCredentials.SIGNATURE.equals(entry.getKey())) {
           map.put(entry.getKey(), entry.getValue());
       }
   }
   ```
   
   ### What Did You Expect to See?
   
   Using the 4.9.3+ client, the request succeeds when the queryMessage method 
is invoked
   
   ### What Did You See Instead?
   
   use 4.9.3+ client, queryMessage request failed
   
   ### Additional Context
   
   this bug fixed in version 5.x. 
   4.x Whether it is necessary to repair 


-- 
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]

Reply via email to