SECURITY: REST: Set cache-control value of max-age=60 for redirects

CVE-2025-61634

Indirect redirect loops can cause a series of 307 redirects
that overwhelm the servers. Caching the redirect allows
this to resolve.

Bug: T387478
Change-Id: Ibfde4e5ece3d58a1f573c37b46b568a5847fca01
This commit is contained in:
bpirkle 2025-02-27 22:34:25 -06:00 committed by Reedy
parent b5a171c33c
commit 7c233a1670

View file

@ -99,6 +99,7 @@ class PageHTMLHandler extends SimpleHandler {
);
if ( $redirectResponse !== null ) {
$redirectResponse->setHeader( 'Cache-Control', 'max-age=60' );
return $redirectResponse;
}