I want to do the following securely
system "echo '#{params[:message]}' > /dev/log"
What is the proper way for escaping arguments when calling a native command?
(Ex开发者_运维技巧ample evil input: '; rm -Rf *; echo 'I won.)
If you do
system "echo", params[:message]
Then the second argument, will be sent as an argument, it will not be executed.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论