In The double diamond, a more secure <>, I showed how the diamond operator treated some characters as special when it tried to open the filenames in @ARGV
. I used a file name that ended with a |
to read the output for an external command.
Thinking about it more, I realized the problem is even worse. Opening an external command to read the output might even be useful. What if I start the filename with >
to open a file for writing, but not only writing, to truncate it to? Continue reading “More fun with the diamond operator”