Merge pull request #189 from tiller1010/hotfix/2.2.2/other-id-type-check

This commit is contained in:
Will Rossiter 2023-07-14 16:32:29 +12:00 committed by GitHub
commit 7370c85dae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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