pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.81k stars 1.74k forks source link

Strange 404 on file edit #1613

Closed rtm516 closed 4 years ago

rtm516 commented 5 years ago

Background (please complete the following information):

Describe the bug I get an error 404 Please provide additional information too, depending on what you have issues with: Panel: php -v (the php version in use). - PHP 7.2.19-0ubuntu0.18.04.1

To Reproduce Steps to reproduce the behavior:

  1. Go to one of the servers
  2. Choose file management
  3. Pick a folder
  4. Pick a sub-folder
  5. Pick a file to edit
  6. See error 404

Expected behavior The file shows up when you click and you don't get an error 404.

Further info The url that the page takes me to is https://pterodactyl.url/server/server.id/files/edit/garrysmod%2Fcfg/server.cfg but if i ajust this to https://pterodactyl.url/server/server.id/files/edit/garrysmod/cfg/server.cfg it works as expected. After enabling APP_REPORT_ALL_EXCEPTIONS=true in the .env file I get

[2019-06-20 22:44:41] production.ERROR: Symfony\Component\HttpKernel\Exception\NotFoundHttpException in /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:179
Stack trace:
#0 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(636): Illuminate\Routing\RouteCollection->match(Object(Illuminate\Http\Request))
#1 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(625): Illuminate\Routing\Router->findRoute(Object(Illuminate\Http\Request))
#2 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(614): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#3 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#4 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#5 /var/www/panel/public_html/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#6 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#7 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#8 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#9 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#10 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#11 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#12 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#13 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#14 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#15 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))
#16 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#17 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#18 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#19 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#20 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#21 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#22 /var/www/panel/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#23 /var/www/panel/public_html/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#24 {main}  
schrej commented 5 years ago

There should be an actual error above the stack trace, could you provide that as well?

rtm516 commented 5 years ago

There should be an actual error above the stack trace, could you provide that as well?

Added, it was there but forgot that GitHub code tag ignores the text on the same line

schrej commented 5 years ago

This has been an issue in the past already: #621

rtm516 commented 5 years ago

This has been an issue in the past already: #621

I did try and look for one, must have missed that one.

Edit: After looking over the change to one of the files referenced in #621 removing the rawurlencode from line 144 in resources/themes/pterodactyl/server/files/list.blade.php the issue is fixed.