3 ms·
I don't remember the exact details, but a few years ago there was a Perl module that did something like: my $path = something_that_can_return_undef_on_failu
by jrockway 15y ago
I don't remember the exact details, but a few years ago there was a Perl module that did something like:
my $path = something_that_can_return_undef_on_failure;
`rm -rf /$path`;
during the execution of its test suite. The author didn't catch it in testing because he never ran "make test" as root (who would?). But people on the Internet ran "make test" as root, with disastrous consequences.
- SwellJoe 15y agoI'm not sure if you're being sarcastic with the "who would?" portion of your comment, but doesn't cpan run tests, by default, whenever installing something? And, most people who aren't Perl developers with their own private Perl installation install CPAN modules as root, so they are available to all users. So, to answer the question seriously: Most people.
- jrockway 15y agoUh, the cpan client runs "make install" as root, not "make test".
- floriancargoet 15y ago$ rm -rf / rm: it is dangerous to operate recursively on `/' rm: use --no-preserve-root to override this failsafe
- mootothemax 15y agorm: use --no-preserve-root to override this failsafe Brilliant, at long last at least a bit of protection! :) Sadly, I can still remember doing this to my one of my first Linux installs, albeit via the classic: rm -fr .* On the plus side, that day I learned one hell of a lot about how Linux works ;)
- tripa 15y agohttp://use.perl.org/~Alias/journal/34680 http://use.perl.org/~Alias/journal/34680