From bf6156c103642cb782158b7aac7d5069fbe0e90a Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 13 Jul 2023 15:38:30 -0400 Subject: [PATCH] fix: added type check for other id --- src/Control/GoogleSitemapController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Control/GoogleSitemapController.php b/src/Control/GoogleSitemapController.php index 81b9f37..ae9137f 100644 --- a/src/Control/GoogleSitemapController.php +++ b/src/Control/GoogleSitemapController.php @@ -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