Compare commits
2 Commits
dbf23badf9
...
02e9263542
| Author | SHA1 | Date | |
|---|---|---|---|
| 02e9263542 | |||
| c21b869641 |
@@ -34,10 +34,10 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
|
|||||||
|
|
||||||
###> LISTMONK/API ###
|
###> LISTMONK/API ###
|
||||||
LISTMONK_BASE_URL=https://listmonk.powerpme.com
|
LISTMONK_BASE_URL=https://listmonk.powerpme.com
|
||||||
LISTMONK_API_USER=
|
LISTMONK_API_USER=MaherAPI
|
||||||
LISTMONK_TOKEN=
|
LISTMONK_TOKEN=BVqvuHgU3N1qstEiLeWM9Ocv9b5jSYaS
|
||||||
###> LISTMONK/API ###
|
###> LISTMONK/API ###
|
||||||
|
|
||||||
###> monolog/mattermost ###
|
###> monolog/mattermost ###
|
||||||
MATTERMOST_WEBHOOK_URL=https://mattermost.powerpme.com/hooks/
|
MATTERMOST_WEBHOOK_URL=https://mattermost.powerpme.com/hooks/anc9zweugj8fprj1zifdxy6m7e
|
||||||
###< monolog/mattermost ###
|
###< monolog/mattermost ###
|
||||||
@@ -12,6 +12,8 @@ use Symfony\Component\Routing\Attribute\Route;
|
|||||||
|
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
|
use Symfony\Component\Process\Process;
|
||||||
|
|
||||||
#[Route('/admin/test')]
|
#[Route('/admin/test')]
|
||||||
final class TestController extends AbstractController
|
final class TestController extends AbstractController
|
||||||
{
|
{
|
||||||
@@ -63,4 +65,26 @@ final class TestController extends AbstractController
|
|||||||
|
|
||||||
return $this->render('/frontend/test.html.twig', []);
|
return $this->render('/frontend/test.html.twig', []);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[Route('/url', name: 'app_test_url')]
|
||||||
|
public function url()
|
||||||
|
{
|
||||||
|
$process = new Process([
|
||||||
|
'yt-dlp',
|
||||||
|
'--print',
|
||||||
|
'%(title)s|%(filesize,filesize_approx)s',
|
||||||
|
'--', // 🛡️ Protection cruciale contre l'injection d'arguments
|
||||||
|
'https://www.youtube.com/watch?v=Z8hhP38-4Eg'
|
||||||
|
]);
|
||||||
|
|
||||||
|
$process->run();
|
||||||
|
|
||||||
|
//dd($process->getOutput());
|
||||||
|
if (!$process->isSuccessful()) {
|
||||||
|
echo $process->getCommandLine() . "<br>" . $process->getErrorOutput();
|
||||||
|
die;
|
||||||
|
return new Response("error1", Response::HTTP_INTERNAL_SERVER_ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-1
@@ -9,9 +9,12 @@ use Doctrine\DBAL\Types\Types;
|
|||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
||||||
use Symfony\Component\Security\Core\User\UserInterface;
|
use Symfony\Component\Security\Core\User\UserInterface;
|
||||||
|
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
#[ORM\Entity(repositoryClass: UserRepository::class)]
|
|
||||||
#[ORM\Table(name: '`user`')]
|
#[ORM\Table(name: '`user`')]
|
||||||
|
#[ORM\Entity(repositoryClass: UserRepository::class)]
|
||||||
|
#[UniqueEntity(fields: ['email'], message: 'There is already an account with this email.')]
|
||||||
class User implements UserInterface, PasswordAuthenticatedUserInterface
|
class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
@@ -20,6 +23,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
|||||||
private ?int $id = null;
|
private ?int $id = null;
|
||||||
|
|
||||||
#[ORM\Column(length: 180, unique: true)]
|
#[ORM\Column(length: 180, unique: true)]
|
||||||
|
#[Assert\Email]
|
||||||
private ?string $email = null;
|
private ?string $email = null;
|
||||||
|
|
||||||
#[ORM\Column]
|
#[ORM\Column]
|
||||||
|
|||||||
Reference in New Issue
Block a user