Skip to content

Commit

Permalink
FIX StringTagField now works with SS-2018-021/CVE-2019-5715 by serial…
Browse files Browse the repository at this point in the history
…ising arrays before write
  • Loading branch information
robbieaverill committed Feb 19, 2019
1 parent 058bc8c commit 3ff72be
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/StringTagField.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,20 @@ public function saveInto(DataObjectInterface $record)

$name = $this->getName();

$record->$name = join(',', $this->Value());
$record->$name = $this->dataValue();
$record->write();
}

/**
* Ensure that arrays are imploded before being saved
*
* @return mixed|string
*/
public function dataValue()
{
return implode(',', $this->value);
}

/**
* Returns a JSON string of tags, for lazy loading.
*
Expand Down

0 comments on commit 3ff72be

Please # to comment.