Skip to content
Permalink
Browse files Browse the repository at this point in the history
fix: critical API integrity bug, potentially allowing users to delete…
… attributes of other events

- a crafted edit for an event (without attribute UUIDs but attribute IDs set) could overwrite an existing attribute
  • Loading branch information
iglocska committed Mar 23, 2018
1 parent 2c20b30 commit 37720c3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/Model/Attribute.php
Expand Up @@ -3128,6 +3128,7 @@ public function editAttribute($attribute, $eventId, $user, $objectId, $log = fal
$attribute['data'] = $result['data'];
$attribute['value'] = $attribute['value'] . '|' . $result['md5'];
}
unset($attribute['id']);
if (isset($attribute['uuid'])) {
$existingAttribute = $this->find('first', array(
'conditions' => array('Attribute.uuid' => $attribute['uuid']),
Expand Down

0 comments on commit 37720c3

Please sign in to comment.