Skip to content

Commit

Permalink
Update trackEdit.php to remove redundant sanitization
Browse files Browse the repository at this point in the history
* Remove redundant `sanitizeInput` function calls for `$_GET` and `$_POST` parameters
* Ensure `$_GET` and `$_POST` parameters are directly assigned to `$post` array
  • Loading branch information
s-martin committed Oct 17, 2024
1 parent 3a9dbbe commit 52cbd31
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion htdocs/ajax.loadInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ function sanitizeInput($input) {
} else {
print "<strong>".basename($file)."</strong>";
}
?>
?>
2 changes: 1 addition & 1 deletion htdocs/ajax.refresh_id.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ function sanitizeInput($input) {
print "
<input id=\"cardID\" name=\"cardID\" placeholder=\"\" class=\"form-control input-md\" type=\"text\" value=\"".sanitizeInput($onlyID)."\">
";
?>
?>
8 changes: 4 additions & 4 deletions htdocs/trackEdit.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,17 @@
* URLPARAMETERS
*******************************************/
if(isset($_GET['folder']) && $_GET['folder'] != "") {
$post['folder'] = sanitizeInput($_GET['folder']);
$post['folder'] = $_GET['folder'];
} else {
if(isset($_POST['folder']) && $_POST['folder'] != "") {
$post['folder'] = sanitizeInput($_POST['folder']);
$post['folder'] = $_POST['folder'];
}
}
if(isset($_GET['filename']) && $_GET['filename'] != "") {
$post['filename'] = sanitizeInput($_GET['filename']);
$post['filename'] = $_GET['filename'];
} else {
if(isset($_POST['filename']) && $_POST['filename'] != "") {
$post['filename'] = sanitizeInput($_POST['filename']);
$post['filename'] = $_POST['filename'];
}
}
/*
Expand Down

0 comments on commit 52cbd31

Please sign in to comment.