mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge pull request #977 from ss23/SS2014004-3-1
FIX Prevent SQLi when no URL filters are applied
This commit is contained in:
commit
17b3e3e99f
@ -1643,9 +1643,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
return min($votes);
|
||||
}
|
||||
|
||||
$segment = Convert::raw2sql($this->URLSegment);
|
||||
$existingPage = DataObject::get_one(
|
||||
'SiteTree',
|
||||
"\"SiteTree\".\"URLSegment\" = '$this->URLSegment' $IDFilter $parentFilter"
|
||||
"\"SiteTree\".\"URLSegment\" = '$segment' $IDFilter $parentFilter"
|
||||
);
|
||||
|
||||
return !($existingPage);
|
||||
|
Loading…
Reference in New Issue
Block a user