decode before encoding URLs, closes #2440
This commit is contained in:
parent
99c9682f67
commit
4ff5de7e1b
1 changed files with 2 additions and 2 deletions
|
@ -70,7 +70,7 @@ class FileController extends ClientApiController
|
||||||
{
|
{
|
||||||
$contents = $this->fileRepository
|
$contents = $this->fileRepository
|
||||||
->setServer($server)
|
->setServer($server)
|
||||||
->getDirectory(urlencode($request->get('directory') ?? '/'));
|
->getDirectory(urlencode(urldecode($request->get('directory') ?? '/')));
|
||||||
|
|
||||||
return $this->fractal->collection($contents)
|
return $this->fractal->collection($contents)
|
||||||
->transformWith($this->getTransformer(FileObjectTransformer::class))
|
->transformWith($this->getTransformer(FileObjectTransformer::class))
|
||||||
|
@ -91,7 +91,7 @@ class FileController extends ClientApiController
|
||||||
{
|
{
|
||||||
return new Response(
|
return new Response(
|
||||||
$this->fileRepository->setServer($server)->getContent(
|
$this->fileRepository->setServer($server)->getContent(
|
||||||
urlencode($request->get('file')), config('pterodactyl.files.max_edit_size')
|
urlencode(urldecode($request->get('file'))), config('pterodactyl.files.max_edit_size')
|
||||||
),
|
),
|
||||||
Response::HTTP_OK,
|
Response::HTTP_OK,
|
||||||
['Content-Type' => 'text/plain']
|
['Content-Type' => 'text/plain']
|
||||||
|
|
Loading…
Reference in a new issue