News for hackers. Stuff that matters.
Re:Fix the unit test and open a giant hole everywhere by Kinrany on Saturday December 25, 2021 @05:40AM (#29682096)
Does `path = "$(rm -rf /)"` work in this context?
Re:Fix the unit test and open a giant hole everywhere by bstpierre on Saturday December 25, 2021 @07:24AM (#29682717)
No, because this isn’t being run through the shell, it’s directly exec’ing the program. So you’re just going to get a dir named “$(rm -rf /)”.
Re:Fix the unit test and open a giant hole everywhere by im3w1l on Saturday December 25, 2021 @07:33AM (#29682765)
It's funny how easy it is to miss characters with special meaning. In this case it's the slash. You would get a directory named "$(rm -rf " with a subdirectory named ")"