What’s the security issue having
<?php
$var = $_GET['var'];
if ($variable)
{
// sensitive data
}
is it possible that the attacker can get to sensitive data somehow?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The code sample provides a security risk in case
register_globalsis on. In that case someone can pass?variable=1and yourif()will be evaluated to true. It’s best practice always to initialize your variables.