fix: added type check for other id

This commit is contained in:
Tyler 2023-07-13 15:38:30 -04:00
parent 6adb11b5bf
commit bf6156c103
1 changed files with 6 additions and 0 deletions

View File

@ -70,6 +70,12 @@ class GoogleSitemapController extends Controller
$class = $this->unsanitiseClassName($this->request->param('ID'));
$page = $this->request->param('OtherID');
if ($page) {
if (!is_numeric($page)) {
return new HTTPResponse('Page not found', 404);
}
}
if (GoogleSitemap::enabled()
&& $class
&& $page