Question: Which of the following crypto in PHP returns longest hash value?
A
B
C
D
md5()
B
sha1()
C
crc32()
D
All return same length hash
Note: Not available
php.ini
directives should be disabled to improve the outward security of your application?What potential security hole would this code snippet produce?
<?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)
}
/* .... */
?>
Which of the following values of $_GET['url'] would cause session fixation?
<?php
header("Location: {$_GET['url']}");
?>