Eval($_POST[cmd])
github.com
Eval($_POST[cmd])
1–9 of 9 posts
Re: Eval($_POST[cmd])
#2Re: Eval($_POST[cmd])
#3So what? What is the point of this? Is this again one of these "php developers are 'special' people"-posts?
Re: Eval($_POST[cmd])
#4So what? What is the point of this? Is this again one of these "php developers are 'special' people"-posts?
Re: Eval($_POST[cmd])
#5So what? What is the point of this? Is this again one of these "php developers are 'special' people"-posts?
I'm guessing he's just showing us the dork (search phrase) to find these vulns and outline how stupid... errr special people can be
Re: Eval($_POST[cmd])
#6So what? What is the point of this? Is this again one of these "php developers are 'special' people"-posts?
Re: Eval($_POST[cmd])
#7Why does eval() exist in so many programming languages, and when is using it not the worst possible option?
Re: Eval($_POST[cmd])
#8Yet more abuse of $_POST in PHP. The language should taint user supplied data by default so this wouldn't even run without throwing an exception, at the very least. Why does eval() exist in so many programming languages, and when is using it not the worst possible option?
(1) Prints some info about the test that's about to execute
(2) Evals the command
(3) Checks/reports the result
Given the choice I'd rather use lambda, but not all languages make that very convenient/readable. In such languages, a carefully used eval might be preferable to ad-hoc interpretation.
Re: Eval($_POST[cmd])
#9Yet more abuse of $_POST in PHP. The language should taint user supplied data by default so this wouldn't even run without throwing an exception, at the very least. Why does eval() exist in so many programming languages, and when is using it not the worst possible option?
It's not the worst possible option when you want to wrap a command you yourself wrote in some extra stuff. For example, in a test script, you might pass the command to a function that (1) Prints some info about the test that's about to execute (2) Evals the command (3) Checks/reports the result Given the choice I'd rather use lambda, but not all languages make that very convenient/readable. In such languages, a caref…