Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Jul 13, 2024
1 parent a31c52e commit 076add5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions objects/Object.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ public static function getSqlOrderByFromPost($keyPrefix = "")
}
}

// add a security here
if (!empty($_GET['sort'])) {
foreach ($_GET['sort'] as $key => $value) {
$_GET['sort'][xss_esc($key)] = xss_esc($value);
}
}

if (!empty($_POST['sort'])) {
$orderBy = [];
foreach ($_POST['sort'] as $key => $value) {
Expand Down

0 comments on commit 076add5

Please sign in to comment.