Skip to content

Commit

Permalink
editEntry: Use sanitized inputs in SQL UPDATE
Browse files Browse the repository at this point in the history
We sanitized the inputs to make sure there are no bad (empty, invalid string) values, but then use the provided inputs rather than the sanitized inputs in the SQL query. This was introduced in #54 and was exposed in the API as seen in #77. Close #77.
  • Loading branch information
elifoster committed Sep 5, 2020
1 parent 03711dc commit 0ab7aba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion OreDict.body.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,12 @@ static public function editEntry($update, $id, $user) {

$result = $dbw->update(
'ext_oredict_items',
$update,
array(
'tag_name' => $tag,
'item_name' => $item,
'mod_name' => $mod,
'grid_params' => $params
),
array('entry_id' => $id),
__METHOD__
);
Expand Down

0 comments on commit 0ab7aba

Please sign in to comment.