Skip to content

Commit

Permalink
Fix SQL-injection vulnerability in page identifier parameter
Browse files Browse the repository at this point in the history
Well that's embarrassing...
  • Loading branch information
ollpu committed Jan 21, 2017
1 parent 422be98 commit 6891bb2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion httpdocs/index.php
Expand Up @@ -12,7 +12,10 @@


//Go to first page in order (front page) if ?s argument is not set
if(!isset($_GET["s"])) {$_GET['s'] = $fprow['uid'];}
if(!isset($_GET["s"])) {$_GET['s'] = $fprow['uid'];}
else {
$_GET['s'] = mysqli_real_escape_string($yht, $_GET['s']);
}


$haku_s = mysqli_query($yht, "SELECT * FROM `sivut` WHERE uid = '".$_GET['s']."' LIMIT 1");
Expand Down

0 comments on commit 6891bb2

Please sign in to comment.