Compare commits

...

2 Commits
2 ... 1.0.1

Author SHA1 Message Date
Guy Marriott
e739275305
Merge pull request #138 from creative-commoners/pulls/1.0/scalars
FIX StringTagField now works with SS-2018-021/CVE-2019-5715 by serialising arrays before write
2019-02-19 17:29:18 +13:00
Robbie Averill
2c40955c2d FIX StringTagField now works with SS-2018-021/CVE-2019-5715 by serialising arrays before write 2019-02-19 11:09:31 +07:00

View File

@ -205,9 +205,19 @@ class StringTagField extends DropdownField {
$name = $this->getName();
$record->$name = join(',', $this->Value());
$record->write();
}
$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.