Permalink
Browse files

MDL-20309 improved sanitization of id property; backported from MOODL…

…E_19_STABLE
  • Loading branch information...
1 parent 7cdae96 commit ea05be79264fe3fa27a9de98c4c792ecc4de0c89 skodak committed Sep 26, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/dmllib.php
View
@@ -1498,9 +1498,11 @@ function update_record($table, $dataobject) {
global $db, $CFG;
- if (! isset($dataobject->id) ) {
+ // integer value in id propery required
+ if (empty($dataobject->id)) {
return false;
}
+ $dataobject->id = (int)$dataobject->id;
/// Check we are handling a proper $dataobject
if (is_array($dataobject)) {

0 comments on commit ea05be7

Please sign in to comment.