Merge pull request #976 from ss23/SS2014004-3-0

FIX Prevent SQLi when no URL filters are applied
This commit is contained in:
Damian Mooyman 2014-03-27 11:23:20 +13:00
commit 43d308cd1b

View File

@ -1584,9 +1584,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
}
}
$segment = Convert::raw2sql($this->URLSegment);
$existingPage = DataObject::get_one(
'SiteTree',
"\"URLSegment\" = '$this->URLSegment' $IDFilter $parentFilter"
"\"URLSegment\" = '$segment' $IDFilter $parentFilter"
);
if ($existingPage) {
return false;