Prevent SSRF requests
By validating the provided URL before passing it to youtube-dl
This commit is contained in:
parent
2afbfb4bf2
commit
3a4f09dda0
7 changed files with 814 additions and 161 deletions
|
@ -11,6 +11,7 @@ use Alltube\Exception\ConfigException;
|
|||
use Alltube\Exception\DependencyException;
|
||||
use Alltube\Library\Exception\AlltubeLibraryException;
|
||||
use Exception;
|
||||
use Graby\HttpClient\Plugin\ServerSideRequestForgeryProtection\Exception\InvalidURLException;
|
||||
use Slim\Http\Environment;
|
||||
use Slim\Http\Request;
|
||||
use SmartyException;
|
||||
|
@ -113,7 +114,8 @@ class FrontControllerTest extends ControllerTest
|
|||
*/
|
||||
public function testInfoWithoutUrl()
|
||||
{
|
||||
$this->assertRequestIsRedirect('info');
|
||||
$this->expectException(InvalidURLException::class);
|
||||
$this->getRequestResult('info', []);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue