mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
fix: added type check for other id
This commit is contained in:
parent
6adb11b5bf
commit
bf6156c103
@ -70,6 +70,12 @@ class GoogleSitemapController extends Controller
|
|||||||
$class = $this->unsanitiseClassName($this->request->param('ID'));
|
$class = $this->unsanitiseClassName($this->request->param('ID'));
|
||||||
$page = $this->request->param('OtherID');
|
$page = $this->request->param('OtherID');
|
||||||
|
|
||||||
|
if ($page) {
|
||||||
|
if (!is_numeric($page)) {
|
||||||
|
return new HTTPResponse('Page not found', 404);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (GoogleSitemap::enabled()
|
if (GoogleSitemap::enabled()
|
||||||
&& $class
|
&& $class
|
||||||
&& $page
|
&& $page
|
||||||
|
Loading…
Reference in New Issue
Block a user