Skip to content

Commit

Permalink
SQL Injection in $_GET['dni_profe'] - "config/cargos.php"
Browse files Browse the repository at this point in the history
Filters for SQL Injection in $_GET['dni_profe']
  • Loading branch information
lockedbyte committed Dec 18, 2019
1 parent 5e62749 commit 678190b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/cargos.php
Expand Up @@ -13,7 +13,8 @@

<?php
if ($_GET['borrar']=='1') {
mysqli_query($db_con, "delete from departamentos where dni = '".$_GET['dni_profe']."'");
$dni_profe = preg_replace('([^A-Za-z0-9])', '', $_GET['dni_profe']);
mysqli_query($db_con, "delete from departamentos where dni = '".$dni_profe."'");
echo '<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
El profesor ha sido borrado de la base de datos..
Expand Down

0 comments on commit 678190b

Please sign in to comment.