Skip to content

Commit 4fb3033

Browse files
committed
MDL-88109 router: Use unencoded URL for location redirect
1 parent 65b51ef commit 4fb3033

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

public/lib/classes/router/util.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,10 @@ public static function redirect(
160160
ResponseInterface $response,
161161
string|url $url,
162162
): ResponseInterface {
163+
$location = ($url instanceof url) ? $url->out(false) : $url;
163164
return $response
164165
->withStatus(302)
165-
->withHeader('Location', (string) $url);
166+
->withHeader('Location', $location);
166167
}
167168

168169
/**

0 commit comments

Comments
 (0)