Question:Consider the following code:

<?php
session_start();

if(!empty($_REQUEST['id'])
&& !empty($_REQUEST['quantity'])) {
$id = scrub_id($_REQUEST['id']);
$quantity = scrub_quantity($_REQUEST['quantity'])
$_SESSION['cart'][] = array('id' => $id,
'quantity' => $quantity)
}

/* .... */

?>
What potential security hole would this code snippet produce? 

A Cross-Site Scripting Attack 

B There is no security hole in this code 

C Code Injection 

D SQL Injection 

E  Choose 1 answer 

+ Answer
+ Report
Total Preview: 990

Copyright © 2024. Powered by Intellect Software Ltd