mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Checking that URL controller in HTTPRequest->match() is a subclass of Controller, not RequestHandler (which would include nested controllers like Form or FormField subclasses that shouldn't be accessible on their own toplevel URL namespace)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97881 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d82ed75b37
commit
bf35a7bc48
@ -342,7 +342,7 @@ class SS_HTTPRequest implements ArrayAccess {
|
|||||||
if($varRequired && !isset($this->dirParts[$i])) return false;
|
if($varRequired && !isset($this->dirParts[$i])) return false;
|
||||||
|
|
||||||
$arguments[$varName] = isset($this->dirParts[$i]) ? $this->dirParts[$i] : null;
|
$arguments[$varName] = isset($this->dirParts[$i]) ? $this->dirParts[$i] : null;
|
||||||
if($part == '$Controller' && (!ClassInfo::exists($arguments['Controller']) || !ClassInfo::is_subclass_of($arguments['Controller'], 'RequestHandler'))) {
|
if($part == '$Controller' && (!ClassInfo::exists($arguments['Controller']) || !ClassInfo::is_subclass_of($arguments['Controller'], 'Controller'))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user