Post by Jerry StucklePost by NetmanHello again!
is this code secure?
if ($_GET["action"]=="test" || $_GET["action"]=="test2")
{
include($_GET["action"].".php"); }
Is it secure in your opinion?
Regards
K.
Yes, this code is secure (I don't know about anything else you might be
doing).
One thing I am never sure about is when such an expression would be
susceptible to the bug whereby the arguments are coerced to integers, ie.
suppose someone submits "action" set to 0, then we would be evaluating
0 == "test"
doesn't this then cause php to evaluate "test" as an integer too, with
value 0, so the test suceeds with 0 == 0? If that happened then we would
surely end up with a statement include("0.php")
--
_______________________________________________________
Facts are stubborn, but statistics are more pliable.
_______________________________________________________