Skip to content

Commit 4355290

Browse files
committed
fix(controller): get data from query
1 parent 1319b4b commit 4355290

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Controller/MediaProxyController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ public function __construct(
4646
)]
4747
public function execute(Request $request): Response
4848
{
49-
/** @var string|null $url */
50-
$url = $request->query['url'];
51-
if (is_null($url) || !str_starts_with($url, 'https://raw.githubusercontent.com/')) {
49+
$url = $request->query->getString('url');
50+
if ('' === $url || !str_starts_with($url, 'https://raw.githubusercontent.com/')) {
5251
return $this->malformedRequestError();
5352
}
5453

0 commit comments

Comments
 (0)