What is Malory trying to prevent here?

Malory is creating a webpage in PHP where users will have to logon to gain access to certain
areas of the site. Malory is concerned that malicious users might try to exploit her site, so she
decides to use the following code to prevent some attacks. What is Malory trying to prevent here?
$username = addslashes($_POST[“username”]);
$password = addslashes($_POST[“password”]);

Malory is creating a webpage in PHP where users will have to logon to gain access to certain
areas of the site. Malory is concerned that malicious users might try to exploit her site, so she
decides to use the following code to prevent some attacks. What is Malory trying to prevent here?
$username = addslashes($_POST[“username”]);
$password = addslashes($_POST[“password”]);

A.
SQL injection

B.
CSS attack

C.
Reflected mode XSS attack

D.
CSRF attack

Explanation:



Leave a Reply 0

Your email address will not be published. Required fields are marked *