Question: This problem is similar to Problem W 4 . 1 . , except that the hash value is not calculated inside the SQLstatement; it is

This problem is similar to Problem W4.1., except that the hash value is not calculated
inside the SQLstatement; it is calculated in the PHP code using PHPs hash()function.
Does this modified program have a SQL injection problem?
$hashed_eid = hash(sha256, $eid);
$hashed_passwd = hash(sha256, $passwd);
$sql = "SELECT * FROM employee
WHERE eid=$hashed_eid and password=$hashed_passwd";

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!