Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FIX Prevent SQLi when no URL filters are applied

  • Loading branch information...
commit 114df8a3a5e4800ef7586c5d9c8d79798fd2a11d 1 parent b6194c3
@ss23 ss23 authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  code/model/SiteTree.php
View
3  code/model/SiteTree.php
@@ -1584,9 +1584,10 @@ public function validURLSegment() {
}
}
+ $segment = Convert::raw2sql($this->URLSegment);
$existingPage = DataObject::get_one(
'SiteTree',
- "\"URLSegment\" = '$this->URLSegment' $IDFilter $parentFilter"
+ "\"URLSegment\" = '$segment' $IDFilter $parentFilter"
);
if ($existingPage) {
return false;
Please sign in to comment.
Something went wrong with that request. Please try again.