From 7db694f53478e7b619fdbd2a4318f4681afbf5dd Mon Sep 17 00:00:00 2001 From: provokateurin Date: Mon, 16 Dec 2024 16:20:48 +0100 Subject: fix(Http): Only allow valid HTTP status code values via template Signed-off-by: provokateurin --- lib/public/AppFramework/Http/StandaloneTemplateResponse.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/public/AppFramework/Http/StandaloneTemplateResponse.php') diff --git a/lib/public/AppFramework/Http/StandaloneTemplateResponse.php b/lib/public/AppFramework/Http/StandaloneTemplateResponse.php index f729bd772fb..244a6b80f9f 100644 --- a/lib/public/AppFramework/Http/StandaloneTemplateResponse.php +++ b/lib/public/AppFramework/Http/StandaloneTemplateResponse.php @@ -7,6 +7,8 @@ declare(strict_types=1); */ namespace OCP\AppFramework\Http; +use OCP\AppFramework\Http; + /** * A template response that does not emit the loadAdditionalScripts events. * @@ -14,9 +16,9 @@ namespace OCP\AppFramework\Http; * full nextcloud UI. Like the 2FA page, or the grant page in the login flow. * * @since 16.0.0 - * @template S of int + * @template S of Http::STATUS_* * @template H of array - * @template-extends TemplateResponse> + * @template-extends TemplateResponse> */ class StandaloneTemplateResponse extends TemplateResponse { } -- cgit v1.2.3