Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #25 from joomlatools/feature/24-security
Browse files Browse the repository at this point in the history
Port security fixes from Joomla v3.4.6 - v3.4.8
  • Loading branch information
stevenrombauts committed Mar 7, 2016
2 parents e55e2e2 + ba6810c commit 8ff8fad
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions administrator/components/com_content/models/article.php
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,12 @@ public function save($data)
// Adding self to the association
$associations = $data['associations'];

// Unset any invalid associations
$associations = Joomla\Utilities\ArrayHelper::toInteger($associations);

foreach ($associations as $tag => $id)
{
if (empty($id))
if (!$id)
{
unset($associations[$tag]);
}
Expand Down Expand Up @@ -525,7 +528,7 @@ public function save($data)

foreach ($associations as $id)
{
$query->values($id . ',' . $db->quote('com_content.item') . ',' . $db->quote($key));
$query->values((int) $id . ',' . $db->quote('com_content.item') . ',' . $db->quote($key));
}

$db->setQuery($query);
Expand Down

0 comments on commit 8ff8fad

Please sign in to comment.