2603.1 - bug hunting

This commit is contained in:
2026-03-16 02:40:12 -04:00
parent baed29d0fa
commit 1aafcd4212

View File

@@ -101,22 +101,19 @@
}
$reason = urldecode($_GET["reason"]);
$SQL ="INSERT INTO blacklist (ip, type, adddate, enddate, reason) VALUES ('".$ip."', ".$type.", ".$dPart.", ".$enddate.", '".$reason."')";
$SQL = "INSERT INTO blacklist (ip, type, adddate, enddate, reason) VALUES ('".$ip."', ".$type.", ".$dPart.", ".$enddate.", '".$reason."') ON DUPLICATE KEY UPDATE enddate=".$enddate.", type=".$type.", reason='".$reason."'";
if ($con->query($SQL) === TRUE) {
$SQL = "UPDATE info SET last=".$dPart." WHERE list=0;";
$con->query($SQL);
if ($con->affected_rows == 1) {
echo "SUCCESS";
} else {
$SQL = "UPDATE blacklist SET enddate=".$enddate.", type=".$type.", reason='".$reason."' WHERE ip='".$ip."';";
if ($con->query($SQL) === TRUE) {
$SQL = "UPDATE info SET last=".$dPart." WHERE list=0;";
$con->query($SQL);
echo "SUCCESS UPDATE";
}
} else {
echo "Error: " . $SQL . "<br>" . $con->error;
}
}
$con->close();