Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Don't forget to put in a '--' to end option parsing too: 'cp --force --'

This works around malicious filenames that may start with a '-'. Especially important if you're running an 'rm' command

Edit: another workaround is to ensure that files are always absolute pathnames or even starting with './' for relative ones.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: