coffeehb commented on issue #1637: A directory traversal vulnerability exists 
in RocketMQ's automatic topic creation
URL: https://github.com/apache/rocketmq/issues/1637#issuecomment-562477576
 
 
   > > > @coffeehb it would be better to add some filtering logic on the topic 
name when creating a topic.
   > > > @duhenglucky
   > > > Yes, without filtering logic, an attacker can fill up any arbitrary 
directory on the system. Please note that this issue may exist other versions 
of the rocketmq, not only 4.6.0 or Windows systems.
   > 
   > thanks for your reminder, and could you submit a PR to fix it?
   
   @duhenglucky 
   
   Hello, I'm sorry I can't submit a PR, but you can modify this file to fix 
it. 
```/broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java```
   Modify the function named 
**createTopicInSendMessageBackMethod,createTopicInSendMessageMethod**, and add 
logic to check special topics.
   allowing only **^ [% | a-zA-Z0-9 _-] + $** 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to