Skip to content

Commit 93c47ad

Browse files
committed
Fixed SQL injection vulnerability with json_decode()
1 parent 95e244f commit 93c47ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/schedule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ function renderSvg($svg, $id) {
325325
$json = stripslashes($_POST['data']);
326326

327327
// Make sure the object was successfully decoded
328-
$json = json_decode($json, true);
328+
$json = sanitize(json_decode($json, true));
329329
if($json == null) {
330330
die(json_encode(array("error" => "argument", "msg" => "The schedule could not be decoded", "arg" => "schedule")));
331331
}

0 commit comments

Comments
 (0)