Skip to content

Commit

Permalink
Attack: sending xml request body
Browse files Browse the repository at this point in the history
nullupload-app.ERROR: Call to undefined function Slim\Http\simplexml_load_string() on /var/www/nullupload/vendor/slim/slim/Slim/Http/Request.php at 230
slimphp/Slim-Http#106
  • Loading branch information
cypherbits committed Sep 26, 2020
1 parent d55c4fc commit 8eebbcc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 0 additions & 4 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
TODO LIST:

Attack: sending xml request body
nullupload-app.ERROR: Call to undefined function Slim\Http\simplexml_load_string() on /var/www/nullupload/vendor/slim/slim/Slim/Http/Request.php at 230
https://github.com/slimphp/Slim-Http/issues/106

- Fix only variables should be passed by reference on do-upload

-admin or cron: see if there are physical files not in database.
Expand Down
8 changes: 5 additions & 3 deletions src/middleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
$c->view->getEnvironment()->addGlobal("urlPrivacy", $this->router->pathFor("privacy"));
$c->view->getEnvironment()->addGlobal("urlAdminHome", $this->router->pathFor("admin"));
$c->view->getEnvironment()->addGlobal("urlAdminNews", $this->router->pathFor("adminNews"));
// $c->view->getEnvironment()->addGlobal("urlAdminUsers", "#");
$c->view->getEnvironment()->addGlobal("urlAdminLogout", $this->router->pathFor("adminLogout"));
$c->view->getEnvironment()->addGlobal("urlAdminDownload", $this->router->pathFor("adminDownload" , ["id" => '']));
$c->view->getEnvironment()->addGlobal("urlAdminDelete", $this->router->pathFor("adminDelete", ["id" => '']));
Expand All @@ -87,8 +86,11 @@
$c->view->getEnvironment()->addGlobal("urlAdminDeleteNew", $this->router->pathFor("adminDeleteNew", ["id" => '']));
$c->view->getEnvironment()->addGlobal("urlAdminPhpinfo", $this->router->pathFor("adminPhpinfo"));
$c->view->getEnvironment()->addGlobal("urlAdminConfig", $this->router->pathFor("adminConfig"));
//$c->view->getEnvironment()->addGlobal("urlUserLogin", $this->router->pathFor("userLogin"));
//$c->view->getEnvironment()->addGlobal("urlUserJoin", $this->router->pathFor("userJoin"));


//Fix autoparsing from XML body when we do not use it... so we can disable php-xml extension
$request->registerMediaTypeParser('application/xml', function () { return []; });
$request->registerMediaTypeParser('text/xml', function () { return []; });

$response = $next($request, $response);
//$response->getBody()->write('AFTER');
Expand Down

0 comments on commit 8eebbcc

Please sign in to comment.