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

In anything that is not PHP. Bash would have been perfect for this use case, for example. The correct way to do this is to obtain the data separately and merely show it on the interface. I haven't audited the code, so I don't know what's being passed to the shell commands, but the fact that an attacker MIGHT be able to influence the commands being executed (see register_globals, etc (yes, I know this has been disabled by default in recent versions of PHP)) is enough for me to completely write it off as an unnecesary risk.

By collecting the data periodically (i.e a cron job) you eliminate most possible vulnerabilities.



First you say anything not PHP then you don't mention one. While I agree that off-request collection may be wiser, I fail to see anything mentioned better than PHP unless you're seriously mentioning Bash to write a webapp like this. Mentioning an old security concern that is no longer an issue seems like an easy way to discount every possible language.


I said that a bash script would be perfect for collecting data periodically and saving it to a file, I wasn't suggesting that you use it to write a web app. I thought that was clear; apologies if it wasn't.

However, you say that this is an easy way to discount every possible language: can you point me to a vulnerability on the same level as register_globals in any other language?




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

Search: