Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace App\Controller\Frontend; use App\Controller\Controller; use App\Dat..
Decoded Output download
<?php
namespace App\Controller\Frontend;
use App\Controller\Controller;
use App\Database\Manager as DatabaseManager;
use App\Entity\BasicAuth as BasicAuthEntity;
use App\Entity\BlockedBot as BlockedBotEntity;
use App\Entity\BlockedIp as BlockedIpEntity;
use App\Entity\Certificate as CertificateEntity;
use App\Entity\CronJob as CronJobEntity;
use App\Entity\Database as DatabaseEntity;
use App\Entity\DatabaseUser as DatabaseUserEntity;
use App\Entity\FtpUser as FtpUserEntity;
use App\Entity\Manager\BasicAuthManager as BasicAuthEntityManager;
use App\Entity\Manager\BlockedBotManager as BlockedBotEntityManager;
use App\Entity\Manager\BlockedIpManager as BlockedIpEntityManager;
use App\Entity\Manager\CertificateManager as CertificateEntityManager;
use App\Entity\Manager\ConfigManager;
use App\Entity\Manager\CronJobManager as CronJobEntityManager;
use App\Entity\Manager\DatabaseManager as DatabaseEntityManager;
use App\Entity\Manager\DatabaseServerManager as DatabaseServerEntityManager;
use App\Entity\Manager\DatabaseUserManager as DatabaseUserEntityManager;
use App\Entity\Manager\FtpUserManager as FtpUserEntityManager;
use App\Entity\Manager\NodejsSettingsManager as NodejsSettingsEntityManager;
use App\Entity\Manager\SiteManager as SiteEntityManager;
use App\Entity\Manager\SshUserManager as SshUserEntityManager;
use App\Entity\NodejsSettings;
use App\Entity\PhpSettings;
use App\Entity\PythonSettings;
use App\Entity\Site as SiteEntity;
use App\Entity\SshUser as SshUserEntity;
use App\Entity\User as UserEntity;
use App\Event\EventQueue;
use App\Log\LogfileReader;
use App\Log\LogsFinder;
use App\Log\Parser\NginxAccessLogParser;
use App\Log\Parser\NginxErrorLogParser;
use App\Log\Parser\PhpFpmErrorLogParser;
use App\Service\Crypto;
use App\Service\Logger;
use App\Site\Deleter as SiteDeleter;
use App\Site\Deleter\NodejsSite as NodejsSiteDeleter;
use App\Site\Deleter\PhpSite as PhpSiteDeleter;
use App\Site\Deleter\PythonSite as PythonSiteDeleter;
use App\Site\Deleter\ReverseProxySite as ReverseProxySiteDeleter;
use App\Site\Deleter\StaticSite as StaticSiteDeleter;
use App\Site\Nginx\Exception\InvalidVhostException;
use App\Site\NodejsSite;
use App\Site\Parser\DomainName as DomainNameParser;
use App\Site\PhpSite;
use App\Site\PythonSite;
use App\Site\ReverseProxySite;
use App\Site\Site;
use App\Site\Ssl\DistinguishedName;
use App\Site\Ssl\Generator\CsrGenerator;
use App\Site\Ssl\Generator\RsaKeyGenerator;
use App\Site\Ssl\LetsEncryptClient;
use App\Site\Ssl\PrivateKey;
use App\Site\StaticSite;
use App\Site\Updater as SiteUpdater;
use App\Site\Updater\NodejsSite as NodejsSiteUpdater;
use App\Site\Updater\PhpSite as PhpSiteUpdater;
use App\Site\Updater\PythonSite as PythonSiteUpdater;
use App\Site\Updater\ReverseProxySite as ReverseProxySiteUpdater;
use App\Site\Updater\StaticSite as StaticSiteUpdater;
use App\Site\VarnishCache\Client as VarnishCacheClient;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Form\Extension\Core\Type\ButtonType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Form;
use Symfony\Component\Form\FormError;
use Symfony\Component\HttpFoundation\Cookie;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException;
use Symfony\Contracts\Translation\TranslatorInterface;
use Twig\Environment as Twig;
class SitesController extends Controller
{
private const FILE_MANAGER_COOKIE_EXPIRATION = 3;
private ConfigManager $configManager;
private SiteEntityManager $siteEntityManager;
private BasicAuthEntityManager $basicAuthEntityManager;
private BlockedIpEntityManager $blockedIpEntityManager;
private BlockedBotEntityManager $blockedBotEntityManager;
private CertificateEntityManager $certificateEntityManager;
private CronJobEntityManager $cronJobEntityManager;
private DatabaseEntityManager $databaseEntityManager;
private DatabaseUserEntityManager $databaseUserEntityManager;
private DatabaseServerEntityManager $databaseServerEntityManager;
private NodejsSettingsEntityManager $nodejsSettingsEntityManager;
private FtpUserEntityManager $ftpUserEntityManager;
private SshUserEntityManager $sshUserEntityManager;
private DomainNameParser $domainNameParser;
public function __construct(ConfigManager $configManager, SiteEntityManager $siteEntityManager, BasicAuthEntityManager $basicAuthEntityManager, BlockedIpEntityManager $blockedIpEntityManager, BlockedBotEntityManager $blockedBotEntityManager, CertificateEntityManager $certificateEntityManager, CronJobEntityManager $cronJobEntityManager, DatabaseEntityManager $databaseEntityManager, DatabaseUserEntityManager $databaseUserEntityManager, DatabaseServerEntityManager $databaseServerEntityManager, NodejsSettingsEntityManager $nodejsSettingsEntityManager, FtpUserEntityManager $ftpUserEntityManager, SshUserEntityManager $sshUserEntityManager, DomainNameParser $domainNameParser, TranslatorInterface $translator, Logger $logger)
{
goto C8555;
eee42:
$this->databaseServerEntityManager = $databaseServerEntityManager;
goto Cb6d2;
ef6fc:
$this->blockedIpEntityManager = $blockedIpEntityManager;
goto d5b5d;
d5b5d:
$this->blockedBotEntityManager = $blockedBotEntityManager;
goto F7f2c;
fff03:
$this->cronJobEntityManager = $cronJobEntityManager;
goto A992f;
A992f:
$this->databaseEntityManager = $databaseEntityManager;
goto Add1c;
Add1c:
$this->databaseUserEntityManager = $databaseUserEntityManager;
goto eee42;
Cb6d2:
$this->nodejsSettingsEntityManager = $nodejsSettingsEntityManager;
goto E7ed6;
e6d38:
$this->domainNameParser = $domainNameParser;
goto D3a76;
D3a76:
parent::__construct($translator, $logger);
goto d0738;
F7f2c:
$this->certificateEntityManager = $certificateEntityManager;
goto fff03;
F3c61:
$this->siteEntityManager = $siteEntityManager;
goto b5dec;
E7ed6:
$this->ftpUserEntityManager = $ftpUserEntityManager;
goto Aa191;
C8555:
$this->configManager = $configManager;
goto F3c61;
Aa191:
$this->sshUserEntityManager = $sshUserEntityManager;
goto e6d38;
b5dec:
$this->basicAuthEntityManager = $basicAuthEntityManager;
goto ef6fc;
d0738:
}
public function index(Request $request): Response
{
goto ed904;
B95f0:
$response = $this->render("Frontend/Site/index.html.twig", ["user" => $user, "sites" => $sites]);
goto c02ed;
e53fb:
$sites = $this->siteEntityManager->getUserSites($user, ["domainName" => "asc"]);
goto B95f0;
c02ed:
return $response;
goto e00aa;
ed904:
$user = $this->getUser();
goto e53fb;
e00aa:
}
public function fileManager(Request $request): Response
{
goto ce2e0;
efaa4:
$data = ["user" => $siteUser, "locale" => $locale];
goto df58d;
dcb5d:
return $response;
goto B0687;
Aae29:
goto e2048;
goto C619a;
D341d: e2048:
goto dcb5d;
ce2e0:
$site = $this->getSite($request);
goto a613c;
df58d:
$session->set("clp-file-manager", $data);
goto cfb96;
c9816:
$response = $this->render("Frontend/Site/file-manager.html.twig", ["site" => $site, "fileManagerUrl" => $fileManagerUrl, "formErrors" => $this->formErrors]);
goto D341d;
F0214:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto Aae29;
B198f:
$session = $request->getSession();
goto Ad1ea;
e27f0:
$cookieExpirationDate = new \DateTime("now");
goto Cdf3b;
Cdf3b:
$cookieExpirationDate->modify(sprintf("+%s hours", self::FILE_MANAGER_COOKIE_EXPIRATION));
goto efaa4;
Ad1ea:
$locale = $request->getLocale();
goto e27f0;
a613c:
if (false === is_null($site)) {
goto f220f;
}
goto F0214;
e08d6:
$siteUser = $site->getUser();
goto B198f;
C619a: f220f:
goto e08d6;
cfb96:
$fileManagerUrl = sprintf("%s/file-manager/", rtrim($request->getSchemeAndHttpHost(), "/"));
goto c9816;
B0687:
}
public function view(Request $request): Response
{
goto E0261;
E0261:
$domainName = $request->get("domainName");
goto Ec5bf;
Ec5bf:
$response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $domainName]));
goto d5958;
d5958:
return $response;
goto c0228;
c0228:
}
public function logs(Request $request): Response
{
goto dbeb1;
a54e2: d919e:
goto C632c;
dbeb1:
$site = $this->getSite($request);
goto eb6c4;
C632c:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto e2486;
eb6c4:
if (false === is_null($site)) {
goto d919e;
}
goto F5b02;
a97a4:
goto E8a87;
goto a54e2;
a4a43: E8a87:
goto C4fd7;
F5b02:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto a97a4;
fba82:
$response = $this->render("Frontend/Site/logs.html.twig", ["site" => $site, "formErrors" => $this->formErrors, "form" => $form->createView()]);
goto a4a43;
e2486:
$form = $this->createLogsForm($siteEntity);
goto fba82;
C4fd7:
return $response;
goto c8a83;
c8a83:
}
private function createLogsForm(SiteEntity $siteEntity): Form
{
goto de9c6;
de9c6:
$form = $this->createForm("App\Form\SiteLogsType", [], ["action" => $this->generateUrl("clp_site_logs", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]);
goto A3d13;
A3d13:
$form->add("update", ButtonType::class, ["attr" => ["class" => "btn btn-lg btn-blue btn-update"], "label" => "Update"]);
goto Ae97e;
Ae97e:
return $form;
goto C0eb7;
C0eb7:
}
public function logFileContent(Request $request, Twig $twig): Response
{
goto ea935;
B2cb4:
$response = $this->json($data);
goto Cb814;
a30b2: Dff79:
goto B2cb4;
ea935:
$data = [];
goto ce9c9;
Af287:
try {
goto ffb69;
B9c67:
$logMessagesHtml = $twig->render("Frontend/Site/Logs/php-fpm-error-log-messages.html.twig", ["logMessages" => $logMessages]);
goto B21d5;
C81d2: d9ae0:
goto F8a66;
ed887:
if (!("nginx" == $service)) {
goto e20df;
}
goto aba23;
B21d5: defdc:
goto a9304;
E045b:
$user = $this->getUser();
goto ed887;
f97e9:
$phpFpmErrorLogParser = new PhpFpmErrorLogParser($logLines);
goto Dba11;
ee6d8:
$logLines = $logfileReader->getLines($numberOfLines);
goto Cac92;
a7b05:
$logMessages = $nginxErrorLogParser->parse();
goto E9103;
aba23:
$userTimezone = $user->getTimezone();
goto b40cf;
b40cf:
if ("access.log" == substr($logfileName, 0, 10)) {
goto d9ae0;
}
goto E036d;
F1c11:
if (!("php" == $service)) {
goto defdc;
}
goto f97e9;
Dba11:
$logMessages = $phpFpmErrorLogParser->parse();
goto B9c67;
f7c63:
$logMessages = $nginxAccessLogParser->parse();
goto c6f78;
a9304:
$data["logMessagesHtml"] = $logMessagesHtml;
goto b260b;
e1234:
$logfileReader = new LogfileReader($logfile);
goto ee6d8;
E036d:
$nginxErrorLogParser = new NginxErrorLogParser($logLines);
goto a7b05;
E9103:
$logMessagesHtml = $twig->render("Frontend/Site/Logs/nginx-error-log-messages.html.twig", ["logMessages" => $logMessages]);
goto Ecf9e;
F8a66:
$nginxAccessLogParser = new NginxAccessLogParser($logLines);
goto F45f1;
f5b27: Da37c:
goto Bd8bd;
Ecf9e:
goto Da37c;
goto C81d2;
F45f1:
$nginxAccessLogParser->setTimezone($userTimezone->getName());
goto f7c63;
ffb69:
$logfile = sprintf("/home/%s/logs/%s/%s", $site->getUser(), $service, $logfileName);
goto e1234;
Bd8bd: e20df:
goto F1c11;
Cac92:
$logMessagesHtml = '';
goto E045b;
c6f78:
$logMessagesHtml = $twig->render("Frontend/Site/Logs/nginx-access-log-messages.html.twig", ["logMessages" => $logMessages]);
goto f5b27;
b260b:
} catch (\Exception $e) {
$this->logger->exception($e);
}
goto Ba3c1;
ee9cb:
$service = trim($request->get("service"));
goto c4783;
C129d:
if (!(false === is_null($site))) {
goto Dff79;
}
goto ee9cb;
c4783:
$logfileName = trim($request->get("logFile"));
goto b375a;
ce9c9:
$site = $this->getSite($request);
goto C129d;
Cb814:
return $response;
goto ea246;
Ba3c1: d6b5b:
goto a30b2;
b375a:
$numberOfLines = (int)$request->get("numberOfLines");
goto B11c9;
B11c9:
if (!(false === empty($service) && false === empty($logfileName))) {
goto d6b5b;
}
goto Af287;
ea246:
}
public function loadLogfilesForService(Request $request): Response
{
goto dff15;
caaa7:
$response = $this->json($data);
goto df3a3;
A7ac0: b02d5:
goto Ac73d;
Bcc80:
if (!(false === is_null($site))) {
goto C502d;
}
goto ae69e;
Ad8fc:
$site = $this->getSite($request);
goto Bcc80;
df3a3:
return $response;
goto Fb793;
F1fc9:
try {
goto C617d;
eee3a:
$logfiles = $logsFinder->getLogfiles();
goto add42;
e2a35: B9b23:
goto b6936;
B90ba:
$data["logfiles"] = $logfiles;
goto e2a35;
Ae931:
$logsFinder = new LogsFinder($logfilesDirectory);
goto eee3a;
C617d:
$logfilesDirectory = sprintf("/home/%s/logs/%s/", $site->getUser(), $service);
goto Ae931;
add42:
if (!(false === empty($logfiles))) {
goto B9b23;
}
goto B90ba;
b6936:
} catch (\Exception $e) {
$this->logger->exception($e);
}
goto A7ac0;
ae69e:
$service = trim($request->get("service"));
goto F7a99;
Ac73d: C502d:
goto caaa7;
dff15:
$data = [];
goto Ad8fc;
F7a99:
if (!(false === empty($service))) {
goto b02d5;
}
goto F1fc9;
Fb793:
}
public function cronJobs(Request $request): Response
{
goto Ce907;
Ce907:
$site = $this->getSite($request);
goto F0a29;
E94f5:
$response = $this->render("Frontend/Site/cron-jobs.html.twig", ["site" => $site, "formErrors" => $this->formErrors]);
goto F7fe2;
d869a: fa68f:
goto E94f5;
E9bb2:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto F4908;
F7fe2: f1d0d:
goto f32a1;
f32a1:
return $response;
goto Dd58b;
F4908:
goto f1d0d;
goto d869a;
F0a29:
if (false === is_null($site)) {
goto fa68f;
}
goto E9bb2;
Dd58b:
}
public function newCronJob(Request $request): Response
{
goto F195a;
bc1ea:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto d999c;
cc5ad:
return $response;
goto bfee1;
d999c:
$cronJobEntity = $this->cronJobEntityManager->createEntity();
goto C3c38;
d43ae:
if (!(true === $request->isMethod("POST"))) {
goto a4400;
}
goto B9c59;
D6819: A6a1e:
goto cc5ad;
f2aa1:
return $response;
goto a4278;
bfc0f:
if (false === is_null($site)) {
goto Af3ec;
}
goto c51ff;
F238e: Af3ec:
goto bc1ea;
d58dd:
if (!(true === $form->isSubmitted())) {
goto Ffe2d;
}
goto ae65e;
F195a:
$site = $this->getSite($request);
goto bfc0f;
E8876: a4400:
goto fb447;
Af10b:
$form = $this->createCronJobForm($cronJobEntity);
goto d43ae;
B9c59:
$form->handleRequest($request);
goto d58dd;
D48bc:
goto A6a1e;
goto F238e;
a4278: Fefd5:
goto C2679;
C3c38:
$cronJobEntity->setSite($siteEntity);
goto Af10b;
c51ff:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto D48bc;
ae65e:
$response = $this->handleCronJobForm($request, $form, $site);
goto B847a;
C2679: Ffe2d:
goto E8876;
B847a:
if (!(false === is_null($response))) {
goto Fefd5;
}
goto f2aa1;
fb447:
$response = $this->render("Frontend/Site/new-cron-job.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]);
goto D6819;
bfee1:
}
private function createCronJobForm(CronJobEntity $cronJobEntity): Form
{
goto d274a;
b5ac0:
return $form;
goto b4d29;
d274a:
$siteEntity = $cronJobEntity->getSite();
goto a3337;
e8bf5:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Add Cron Job"]);
goto b5ac0;
a3337:
$form = $this->createForm("App\Form\SiteCronJobType", $cronJobEntity, ["action" => $this->generateUrl("clp_site_cron_job_new", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]);
goto e8bf5;
b4d29:
}
private function handleCronJobForm(Request $request, Form $form, Site $site)
{
goto ce104;
ce104:
if (true === $form->isValid()) {
goto Dfad4;
}
goto d7a18;
A9bd2:
goto d7db0;
goto Cfb66;
Cfb66: Dfad4:
goto afc92;
d7a18:
$this->formErrors = $this->getErrorMessages($form);
goto A9bd2;
afc92:
try {
goto b5b53;
c5c3f:
$user = $this->getUser();
goto Cf03b;
Cf03b:
$cronJobEntity = $form->getData();
goto Dced6;
f09d1:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto A91f2;
C1e12:
$site->setCronJobs($siteEntity->getCronJobs());
goto e070c;
cfcde:
if (false === is_null($siteEntity)) {
goto f4e9d;
}
goto f09d1;
D0b80: f4e9d:
goto c5c3f;
b5b53:
$session = $request->getSession();
goto f002a;
ed7cd:
$siteUpdater->updateUserCrontab();
goto b81c6;
f002a:
$domainName = $site->getDomainName();
goto ac432;
b81c6:
$eventData = ["site" => $domainName, "crontabExpression" => $cronJobEntity->getCrontabExpression()];
goto ce4f8;
ac432:
$siteEntity = $this->getSiteEntity($domainName);
goto cfcde;
A91f2:
goto Cef27;
goto D0b80;
a3499:
$response = $this->redirect($this->generateUrl("clp_site_cron_jobs", ["domainName" => $site->getDomainName()]));
goto C4c45;
Fbb0f:
return $response;
goto C49c8;
C4c45: Cef27:
goto Fbb0f;
Af994:
$siteUpdater = $this->getSiteUpdater($site);
goto ed7cd;
Dced6:
$siteEntity->addCronJob($cronJobEntity);
goto C1e12;
B06a4:
$session->getFlashBag()->set("success", $this->translator->trans("Cron Job has been added."));
goto a3499;
e070c:
$this->siteEntityManager->updateEntity($siteEntity);
goto Af994;
ce4f8:
EventQueue::addEvent(EventQueue::EVENT_SITE_CRON_JOB_ADD, $user, $eventData, $request);
goto B06a4;
C49c8:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto a5a6b;
a5a6b: d7db0:
goto F35df;
F35df:
}
public function deleteCronJob(Request $request): Response
{
goto Fa922;
A3699:
if (!(false === is_null($site))) {
goto C5c13;
}
goto E6590;
df940:
return $response;
goto Ec1d6;
Ad5be:
$this->checkCsrfToken($request, "cronjob-delete");
goto A3699;
Edb4b:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto df940;
E6590:
try {
goto dd9c6;
c3983:
$cronJobEntity = $this->cronJobEntityManager->findOneById($id);
goto ccbb0;
ef667:
$this->siteEntityManager->updateEntity($siteEntity);
goto a2bb6;
e0f45:
$evenData = ["site" => $domainName, "command" => $cronJobEntity->getCommand()];
goto Af748;
Da5af:
$siteEntity->removeCronJob($cronJobEntity);
goto fb09b;
Aa585:
$domainName = $site->getDomainName();
goto e760d;
F440d:
$cronJobSiteEntity = $cronJobEntity->getSite();
goto fae3d;
c9cc1:
$user = $this->getUser();
goto Da5af;
Af748:
EventQueue::addEvent(EventQueue::EVENT_SITE_CRON_JOB_DELETE, $user, $evenData, $request);
goto De971;
a2bb6:
$siteUpdater = $this->getSiteUpdater($site);
goto De30c;
dd9c6:
$session = $request->getSession();
goto f71ee;
De971:
$session->getFlashBag()->set("success", $this->translator->trans("Cron Job has been deleted."));
goto a4098;
e760d:
$siteEntity = $this->getSiteEntity($domainName);
goto c3983;
fae3d:
if (!($siteEntity->getDomainName() == $cronJobSiteEntity->getDomainName())) {
goto d5fdd;
}
goto c9cc1;
fb09b:
$site->setCronJobs($siteEntity->getCronJobs());
goto ef667;
Abbd0: D8d54:
goto b96fe;
faa94:
return $response;
goto a5a37;
a4098:
$response = $this->redirect($this->generateUrl("clp_site_cron_jobs", ["domainName" => $site->getDomainName()]));
goto faa94;
f71ee:
$id = (int)$request->get("id");
goto Aa585;
ccbb0:
if (!(false === is_null($siteEntity) && false === is_null($cronJobEntity))) {
goto D8d54;
}
goto F440d;
a5a37: d5fdd:
goto Abbd0;
De30c:
$siteUpdater->updateUserCrontab();
goto e0f45;
b96fe:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto f00f0;
f00f0: C5c13:
goto Edb4b;
Fa922:
$site = $this->getSite($request);
goto Ad5be;
Ec1d6:
}
public function editCronJob(Request $request): Response
{
goto F98ac;
ae836: bb987:
goto b54d0;
d5935: cec8c:
goto C43b9;
B4131:
$response = $this->render("Frontend/Site/edit-cron-job.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]);
goto B2ff5;
C882b:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto f5684;
cafd6:
$response = $this->handleCronJobEditForm($request, $form, $site);
goto D42bc;
f5684:
goto fc0ef;
goto d5935;
c4db9:
$cronJobEntity = $this->cronJobEntityManager->findOneById($id);
goto b7d56;
b7d56:
if (false === is_null($cronJobEntity) && false === is_null($site) && $cronJobEntity->getSite()->getDomainName() == $site->getDomainName()) {
goto cec8c;
}
goto C882b;
b54d0: Ad39b:
goto B4131;
f759f: d0826:
goto ae836;
cb290:
if (!(true === $request->isMethod("POST"))) {
goto Ad39b;
}
goto A222b;
A222b:
$form->handleRequest($request);
goto E245e;
B2ff5: fc0ef:
goto b4db4;
C43b9:
$form = $this->createCronJobEditForm($cronJobEntity);
goto cb290;
F98ac:
$id = (int)$request->get("id");
goto ebadf;
E245e:
if (!(true === $form->isSubmitted())) {
goto bb987;
}
goto cafd6;
b4db4:
return $response;
goto ed039;
D42bc:
if (!(false === is_null($response))) {
goto d0826;
}
goto E9b82;
E9b82:
return $response;
goto f759f;
ebadf:
$site = $this->getSite($request);
goto c4db9;
ed039:
}
private function createCronJobEditForm(CronJobEntity $cronJobEntity): Form
{
goto Fc595;
d8bf0:
return $form;
goto D8f48;
B3bb2:
$form = $this->createForm("App\Form\SiteCronJobEditType", $cronJobEntity, ["action" => $this->generateUrl("clp_site_cron_job_edit", ["domainName" => $siteEntity->getDomainName(), "id" => $cronJobEntity->getId()]), "method" => "POST", "attr" => []]);
goto Aa8f1;
Aa8f1:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]);
goto d8bf0;
Fc595:
$siteEntity = $cronJobEntity->getSite();
goto B3bb2;
D8f48:
}
private function handleCronJobEditForm(Request $request, Form $form, Site $site)
{
goto d9fd8;
Cc4c5:
$this->formErrors = $this->getErrorMessages($form);
goto A983b;
E4bb4: F9f81:
goto a9925;
d9fd8:
if (true === $form->isValid()) {
goto fd013;
}
goto Cc4c5;
e2a89:
try {
goto d821f;
a746c:
$this->siteEntityManager->updateEntity($siteEntity);
goto A20d8;
A336b:
$eventData = ["site" => $domainName, "crontabExpression" => $cronJobEntity->getCrontabExpression()];
goto c642f;
A2a4c: C19c2:
goto Cbcc8;
A20d8:
$siteUpdater = $this->getSiteUpdater($site);
goto b71d3;
d556b:
if (false === is_null($siteEntity)) {
goto C19c2;
}
goto e3b9c;
becae:
$session->getFlashBag()->set("success", $this->translator->trans("Cron Job has been saved."));
goto Df7d1;
aea12:
$cronJobEntity = $form->getData();
goto A7cdc;
Ff489:
goto a64e3;
goto A2a4c;
A76b3:
$site->setCronJobs($siteEntity->getCronJobs());
goto a746c;
Cbcc8:
$user = $this->getUser();
goto aea12;
c642f:
EventQueue::addEvent(EventQueue::EVENT_SITE_CRON_JOB_EDIT, $user, $eventData, $request);
goto becae;
d821f:
$session = $request->getSession();
goto d42aa;
d42aa:
$domainName = $site->getDomainName();
goto b2214;
b71d3:
$siteUpdater->updateUserCrontab();
goto A336b;
b2214:
$siteEntity = $this->getSiteEntity($domainName);
goto d556b;
e3b9c:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto Ff489;
Df7d1:
$response = $this->redirect($this->generateUrl("clp_site_cron_jobs", ["domainName" => $site->getDomainName()]));
goto d0e93;
d0e93: a64e3:
goto E8345;
E8345:
return $response;
goto de7a6;
A7cdc:
$siteEntity->addCronJob($cronJobEntity);
goto A76b3;
de7a6:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto E4bb4;
e1079: fd013:
goto e2a89;
A983b:
goto F9f81;
goto e1079;
a9925:
}
public function users(Request $request): Response
{
goto f9b88;
dec0e:
$response = $this->render("Frontend/Site/users.html.twig", ["site" => $site, "formErrors" => $this->formErrors]);
goto B4d00;
d8398:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto Df057;
F73cb: d2758:
goto dec0e;
e0a0b:
return $response;
goto D98f3;
B4d00: C26b0:
goto e0a0b;
Df057:
goto C26b0;
goto F73cb;
f9b88:
$site = $this->getSite($request);
goto e691c;
e691c:
if (false === is_null($site)) {
goto d2758;
}
goto d8398;
D98f3:
}
public function newFtpUser(Request $request): Response
{
goto dd466;
C0f3d:
return $response;
goto b413a;
Bfd14:
$form->handleRequest($request);
goto D2ba7;
A3ff5:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto deabf;
acae5: D585a:
goto bbb05;
ba137: B65ba:
goto C0f3d;
Ade2f:
return $response;
goto dec09;
dec09: b6b37:
goto acae5;
C7d34:
$ftpUserEntity->setSite($siteEntity);
goto Da0c2;
D9252: db49e:
goto Ce151;
Da0c2:
$form = $this->createFtpUserForm($ftpUserEntity);
goto a73f7;
E97c6:
if (!(false === is_null($response))) {
goto b6b37;
}
goto Ade2f;
D2ba7:
if (!(true === $form->isSubmitted())) {
goto D585a;
}
goto cc697;
deabf:
goto B65ba;
goto D9252;
Fb053:
$ftpUserEntity = $this->ftpUserEntityManager->createEntity();
goto C7d34;
a73f7:
if (!(true === $request->isMethod("POST"))) {
goto bd48e;
}
goto Bfd14;
Cfe19:
$response = $this->render("Frontend/Site/new-ftp-user.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]);
goto ba137;
Ce151:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto Fb053;
ad680:
if (false === is_null($site)) {
goto db49e;
}
goto A3ff5;
bbb05: bd48e:
goto Cfe19;
dd466:
$site = $this->getSite($request);
goto ad680;
cc697:
$response = $this->handleFtpUserForm($request, $form, $site);
goto E97c6;
b413a:
}
private function createFtpUserForm(FtpUserEntity $ftpUserEntity): Form
{
goto c6ce5;
A1003:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Add User"]);
goto E404d;
c6ce5:
$siteEntity = $ftpUserEntity->getSite();
goto Bea49;
E404d:
return $form;
goto abd7b;
Bea49:
$form = $this->createForm("App\Form\SiteFtpUserType", $ftpUserEntity, ["action" => $this->generateUrl("clp_site_ftp_user_new", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]);
goto A1003;
abd7b:
}
private function handleFtpUserForm(Request $request, Form $form, Site $site)
{
goto E5cc2;
Ee5f6:
try {
goto D1378;
B0307:
$user = $this->getUser();
goto c868a;
be51d:
$ftpUserName = $ftpUserEntity->getUserName();
goto B5a50;
c2b3c: B4faf:
goto B0307;
cbbc0:
EventQueue::addEvent(EventQueue::EVENT_SITE_FTP_USER_ADD, $user, $eventData, $request);
goto a7a7d;
Bb76d:
$response = $this->redirect($this->generateUrl("clp_site_users", ["domainName" => $site->getDomainName()]));
goto ed7c2;
Ef725:
return $response;
goto Fe045;
f7aa3:
$siteEntity = $this->getSiteEntity($domainName);
goto B72c2;
D1378:
$session = $request->getSession();
goto d072f;
ee6eb:
$siteUpdater = $this->getSiteUpdater($site);
goto f767f;
Dbdf4:
goto Ae7d0;
goto c2b3c;
c18d5:
$eventData = ["site" => $domainName, "userName" => $ftpUserName, "homeDirectory" => $ftpUserEntity->getHomeDirectory()];
goto cbbc0;
B72c2:
if (false === is_null($siteEntity)) {
goto B4faf;
}
goto Ceea3;
Ceea3:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto Dbdf4;
f767f:
$siteUpdater->createFtpUser($ftpUserEntity);
goto c18d5;
d4deb:
$this->siteEntityManager->updateEntity($siteEntity);
goto ee6eb;
c868a:
$ftpUserEntity = $form->getData();
goto be51d;
a7a7d:
$session->getFlashBag()->set("success", $this->translator->trans("User has been added."));
goto Bb76d;
D19bc:
$ftpUserEntity->setPassword($ftpUserPassword);
goto fb4ed;
B5a50:
$ftpUserPassword = $form->get("password")->getData();
goto D19bc;
fb4ed:
$siteEntity->addFtpUser($ftpUserEntity);
goto d4deb;
d072f:
$domainName = $site->getDomainName();
goto f7aa3;
ed7c2: Ae7d0:
goto Ef725;
Fe045:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto B7eec;
C2216:
$this->formErrors = $this->getErrorMessages($form);
goto A9a0a;
a78da: F1750:
goto Ee5f6;
A9a0a:
goto Ec0c3;
goto a78da;
E5cc2:
if (true === $form->isValid()) {
goto F1750;
}
goto C2216;
B7eec: Ec0c3:
goto fc92c;
fc92c:
}
public function editFtpUser(Request $request): Response
{
goto b3ff5;
Fc9ab: c868b:
goto A7d63;
c4ed1:
$response = $this->handleFtpUserEditForm($request, $form, $site);
goto A19c0;
C93d9:
if (!(true === $request->isMethod("POST"))) {
goto Be471;
}
goto ece30;
E798c:
if (!(true === $form->isSubmitted())) {
goto D2db6;
}
goto c4ed1;
F060d:
$form = $this->createFtpUserEditForm($ftpUserEntity);
goto C93d9;
F6c15:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto aa0b8;
e9eb8: Be471:
goto E4c1f;
Bc734:
$ftpUserEntity = $this->ftpUserEntityManager->findOneByUserName($userName);
goto be80e;
ece30:
$form->handleRequest($request);
goto E798c;
aa0b8:
goto B9be6;
goto D47f3;
A19c0:
if (!(false === is_null($response))) {
goto c868b;
}
goto C17c6;
E4c1f:
$response = $this->render("Frontend/Site/edit-ftp-user.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]);
goto B30c6;
B30c6: B9be6:
goto de5ce;
A7d63: D2db6:
goto e9eb8;
C87d0:
$site = $this->getSite($request);
goto Bc734;
D47f3: aa212:
goto F060d;
de5ce:
return $response;
goto f360a;
C17c6:
return $response;
goto Fc9ab;
b3ff5:
$userName = $request->get("userName");
goto C87d0;
be80e:
if (false === is_null($ftpUserEntity) && false === is_null($site) && $ftpUserEntity->getSite()->getDomainName() == $site->getDomainName()) {
goto aa212;
}
goto F6c15;
f360a:
}
private function createFtpUserEditForm(FtpUserEntity $ftpUserEntity): Form
{
goto d79f8;
Aa296:
$form = $this->createForm("App\Form\SiteFtpUserEditType", $ftpUserEntity, ["action" => $this->generateUrl("clp_site_ftp_user_edit", ["domainName" => $siteEntity->getDomainName(), "userName" => $ftpUserEntity->getUserName()]), "method" => "POST", "attr" => []]);
goto a7a13;
a7a13:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]);
goto a7b5b;
a7b5b:
return $form;
goto Ac2fd;
d79f8:
$siteEntity = $ftpUserEntity->getSite();
goto Aa296;
Ac2fd:
}
private function handleFtpUserEditForm(Request $request, Form $form, Site $site)
{
goto ca284;
cd37f:
try {
goto Baf37;
bd97b:
$domainName = $site->getDomainName();
goto Aa545;
faeef:
$siteUpdater = $this->getSiteUpdater($site);
goto c40b4;
Cf4a5:
$eventData = ["site" => $domainName, "userName" => $ftpUserName, "homeDirectory" => $ftpUserHomeDirectory];
goto e8243;
D4ea7:
$response = $this->redirect($this->generateUrl("clp_site_users", ["domainName" => $site->getDomainName()]));
goto Eded8;
e8243:
EventQueue::addEvent(EventQueue::EVENT_SITE_FTP_USER_EDIT, $user, $eventData, $request);
goto f56ff;
F2b3b:
$siteUpdater->changeUserPassword($ftpUserName, $ftpUserPassword);
goto faa3c;
ce1aa:
if (false === is_null($siteEntity)) {
goto E6ea9;
}
goto D79ee;
c40b4:
$siteUpdater->changeUserHomeDirectory($ftpUserName, $ftpUserHomeDirectory);
goto B0dae;
D4735:
$ftpUserPassword = $form->get("password")->getData();
goto E019c;
E019c:
$ftpUserHomeDirectory = $ftpUserEntity->getHomeDirectory();
goto C6c81;
Baf37:
$session = $request->getSession();
goto bd97b;
Bd46c:
$ftpUserEntity = $form->getData();
goto E7d4c;
Aa545:
$siteEntity = $this->getSiteEntity($domainName);
goto ce1aa;
Eca39:
$user = $this->getUser();
goto Bd46c;
f249f:
goto c0c49;
goto f9e32;
B0dae:
if (!(false === empty($ftpUserPassword))) {
goto Bb31d;
}
goto F2b3b;
D79ee:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto f249f;
a7a52:
return $response;
goto C53e8;
E7d4c:
$ftpUserName = $ftpUserEntity->getUserName();
goto D4735;
f56ff:
$session->getFlashBag()->set("success", $this->translator->trans("User has been saved."));
goto D4ea7;
C6c81:
$this->siteEntityManager->updateEntity($siteEntity);
goto faeef;
faa3c: Bb31d:
goto Cf4a5;
Eded8: c0c49:
goto a7a52;
f9e32: E6ea9:
goto Eca39;
C53e8:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto Ca58f;
Ca58f: A3c6f:
goto f8171;
e46b0:
$this->formErrors = $this->getErrorMessages($form);
goto f02cf;
f02cf:
goto A3c6f;
goto bfefc;
ca284:
if (true === $form->isValid()) {
goto Bd734;
}
goto e46b0;
bfefc: Bd734:
goto cd37f;
f8171:
}
public function deleteFtpUser(Request $request): Response
{
goto d414e;
bbb7f:
try {
goto D2d0c;
Db694:
EventQueue::addEvent(EventQueue::EVENT_SITE_FTP_USER_DELETE, $user, $evenData, $request);
goto F0af7;
c5850:
$this->siteEntityManager->updateEntity($siteEntity);
goto D1da1;
D2d0c:
$session = $request->getSession();
goto c24eb;
be823: D2bce:
goto e59fa;
D1da1:
$siteUpdater = $this->getSiteUpdater($site);
goto d40ac;
B3598: feabc:
goto be823;
d1dfb:
$userName = $ftpUserEntity->getUserName();
goto Eb803;
f3f12:
$evenData = ["site" => $domainName, "userName" => $userName];
goto Db694;
c24eb:
$userName = $request->get("userName");
goto e7376;
e4990:
$siteEntity = $this->getSiteEntity($domainName);
goto dc874;
F0af7:
$session->getFlashBag()->set("success", $this->translator->trans("User has been deleted."));
goto eabdf;
e7376:
$domainName = $site->getDomainName();
goto e4990;
Eec6c:
if (!($siteEntity->getDomainName() == $ftpUserSiteEntity->getDomainName())) {
goto feabc;
}
goto Edd5b;
f3d9f:
$ftpUserSiteEntity = $ftpUserEntity->getSite();
goto Eec6c;
eabdf:
$response = $this->redirect($this->generateUrl("clp_site_users", ["domainName" => $site->getDomainName()]));
goto ec358;
d40ac:
$siteUpdater->deleteUser($userName, false);
goto f3f12;
Eb803:
$siteEntity->removeFtpUser($ftpUserEntity);
goto c5850;
Edd5b:
$user = $this->getUser();
goto d1dfb;
B3472:
if (!(false === is_null($siteEntity) && false === empty($userName) && false === is_null($ftpUserEntity))) {
goto D2bce;
}
goto f3d9f;
ec358:
return $response;
goto B3598;
dc874:
$ftpUserEntity = $this->ftpUserEntityManager->findOneByUserName($userName);
goto B3472;
e59fa:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto a215a;
E06d7:
return $response;
goto d9267;
d414e:
$site = $this->getSite($request);
goto ba9cc;
c8832:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto E06d7;
a215a: Afbdc:
goto c8832;
C58ca:
if (!(false === is_null($site))) {
goto Afbdc;
}
goto bbb7f;
ba9cc:
$this->checkCsrfToken($request, "user-delete");
goto C58ca;
d9267:
}
public function newSshUser(Request $request): Response
{
goto a4fbd;
d28ac:
$response = $this->render("Frontend/Site/new-ssh-user.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]);
goto c9827;
B3470: D7291:
goto ecb19;
Dac0c:
goto Fd0ec;
goto D7305;
fd64f:
if (false === is_null($site)) {
goto E3408;
}
goto db7a6;
db7a6:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto Dac0c;
Fbb6a:
return $response;
goto Adbff;
D7305: E3408:
goto Dd854;
E1397:
$sshUserEntity = $this->sshUserEntityManager->createEntity();
goto ac07b;
a4fbd:
$site = $this->getSite($request);
goto fd64f;
A527b:
$form->handleRequest($request);
goto F3f75;
a8c1b:
return $response;
goto B2944;
ecb19: c9ed0:
goto d28ac;
b4b40:
$form = $this->createSshUserForm($sshUserEntity);
goto e420d;
e420d:
if (!(true === $request->isMethod("POST"))) {
goto c9ed0;
}
goto A527b;
d21e0:
if (!(false === is_null($response))) {
goto E6269;
}
goto a8c1b;
E991a:
$response = $this->handleSshUserForm($request, $form, $site);
goto d21e0;
c9827: Fd0ec:
goto Fbb6a;
B2944: E6269:
goto B3470;
F3f75:
if (!(true === $form->isSubmitted())) {
goto D7291;
}
goto E991a;
Dd854:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto E1397;
ac07b:
$sshUserEntity->setSite($siteEntity);
goto b4b40;
Adbff:
}
private function createSshUserForm(SshUserEntity $sshUserEntity): Form
{
goto Bdca3;
fcb05:
$form = $this->createForm("App\Form\SiteSshUserType", $sshUserEntity, ["action" => $this->generateUrl("clp_site_ssh_user_new", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]);
goto cba61;
Bdca3:
$siteEntity = $sshUserEntity->getSite();
goto fcb05;
c26b1:
return $form;
goto F5d24;
cba61:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Add User"]);
goto c26b1;
F5d24:
}
private function handleSshUserForm(Request $request, Form $form, Site $site)
{
goto F20f4;
cf522:
$this->formErrors = $this->getErrorMessages($form);
goto F0b14;
Fd679:
try {
goto ba9e8;
C72fc:
$sshUserEntity->setPassword($sshUserPassword);
goto a5b58;
bea87:
goto F475c;
goto Cc03c;
a1db1:
$this->siteEntityManager->updateEntity($siteEntity);
goto F9193;
F7f15:
$siteUpdater->updateUserSShKeys($sshUserName, $sshKeys);
goto C7a43;
e2d4c:
if (false === is_null($siteEntity)) {
goto ba69f;
}
goto fecd3;
C8c84: F475c:
goto A78cd;
A78cd:
return $response;
goto f501d;
B2f22:
$siteUpdater->createSshUser($sshUserEntity);
goto Fa5ec;
D7a34:
$response = $this->redirect($this->generateUrl("clp_site_users", ["domainName" => $site->getDomainName()]));
goto C8c84;
Fa5ec:
if (!(false === empty($sshKeys))) {
goto d97c8;
}
goto F7f15;
D5fbe:
$siteEntity->addSshUser($sshUserEntity);
goto a1db1;
F9193:
$siteUpdater = $this->getSiteUpdater($site);
goto B2f22;
F2ee7:
$siteEntity = $this->getSiteEntity($domainName);
goto e2d4c;
a5b58:
$sshKeys = $sshUserEntity->getSshKeys();
goto D5fbe;
ba9e8:
$session = $request->getSession();
goto Ca971;
Cc03c: ba69f:
goto f7102;
C88ed:
$sshUserEntity = $form->getData();
goto afa1f;
C7a43: d97c8:
goto C56d0;
f7102:
$user = $this->getUser();
goto C88ed;
e0354:
EventQueue::addEvent(EventQueue::EVENT_SITE_SSH_USER_ADD, $user, $eventData, $request);
goto Ed802;
afa1f:
$sshUserName = $sshUserEntity->getUserName();
goto fd011;
Ed802:
$session->getFlashBag()->set("success", $this->translator->trans("User has been added."));
goto D7a34;
fd011:
$sshUserPassword = $form->get("password")->getData();
goto C72fc;
fecd3:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto bea87;
Ca971:
$domainName = $site->getDomainName();
goto F2ee7;
C56d0:
$eventData = ["site" => $domainName, "userName" => $sshUserName, "sshKeys" => $sshKeys];
goto e0354;
f501d:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto C07fd;
C07fd: D9ef7:
goto Eee3e;
edfba: Ea783:
goto Fd679;
F0b14:
goto D9ef7;
goto edfba;
F20f4:
if (true === $form->isValid()) {
goto Ea783;
}
goto cf522;
Eee3e:
}
public function editSshUser(Request $request): Response
{
goto B4aaa;
e4c80:
$sshUserEntity = $this->sshUserEntityManager->findOneByUserName($userName);
goto Ad323;
C86d5:
if (!(false === is_null($response))) {
goto Fc300;
}
goto ca771;
D519c: a946c:
goto Bd327;
D5873:
goto f997f;
goto d3139;
c5229:
$site = $this->getSite($request);
goto e4c80;
ccac5: Fc300:
goto A1cc2;
b75ec:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto D5873;
A1cc2: c73cf:
goto D519c;
ca771:
return $response;
goto ccac5;
eec4c:
$response = $this->handleSshUserEditForm($request, $form, $site);
goto C86d5;
B5c1b:
if (!(true === $form->isSubmitted())) {
goto c73cf;
}
goto eec4c;
d3139: a3b0c:
goto C6b42;
B4aaa:
$userName = $request->get("userName");
goto c5229;
C6b42:
$form = $this->createSshUserEditForm($sshUserEntity);
goto f939d;
ee4e1:
return $response;
goto C0de7;
f939d:
if (!(true === $request->isMethod("POST"))) {
goto a946c;
}
goto fa14f;
fa14f:
$form->handleRequest($request);
goto B5c1b;
f08e5: f997f:
goto ee4e1;
Ad323:
if (false === is_null($sshUserEntity) && false === is_null($site) && $sshUserEntity->getSite()->getDomainName() == $site->getDomainName()) {
goto a3b0c;
}
goto b75ec;
Bd327:
$response = $this->render("Frontend/Site/edit-ssh-user.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]);
goto f08e5;
C0de7:
}
private function createSshUserEditForm(SshUserEntity $sshUserEntity): Form
{
goto Be857;
ebe43:
$form = $this->createForm("App\Form\SiteSshUserEditType", $sshUserEntity, ["action" => $this->generateUrl("clp_site_ssh_user_edit", ["domainName" => $siteEntity->getDomainName(), "userName" => $sshUserEntity->getUserName()]), "method" => "POST", "attr" => []]);
goto b684b;
Be857:
$siteEntity = $sshUserEntity->getSite();
goto ebe43;
dac2e:
return $form;
goto F7b24;
b684b:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]);
goto dac2e;
F7b24:
}
private function handleSshUserEditForm(Request $request, Form $form, Site $site)
{
goto e2d42;
e2d42:
if (true === $form->isValid()) {
goto a6c90;
}
goto A1848;
A1848:
$this->formErrors = $this->getErrorMessages($form);
goto defb7;
d3efc:
try {
goto ae009;
cbdda:
$sshUserPassword = $form->get("password")->getData();
goto e1600;
c9bfc:
goto B506e;
goto A027f;
Ba9b0:
$sshUserName = $sshUserEntity->getUserName();
goto cbdda;
ae009:
$session = $request->getSession();
goto E23b2;
cf3a7:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto c9bfc;
e1600:
$sshKeys = false === is_null($sshUserEntity->getSshKeys()) ? $sshUserEntity->getSshKeys() : '';
goto ab8d5;
fb72b: B506e:
goto Cc6d2;
A027f: Afa11:
goto A5c3e;
C90e7:
$response = $this->redirect($this->generateUrl("clp_site_users", ["domainName" => $site->getDomainName()]));
goto fb72b;
ab8d5:
$this->siteEntityManager->updateEntity($siteEntity);
goto Baee9;
A5c3e:
$user = $this->getUser();
goto cd2c2;
Fc2df:
$session->getFlashBag()->set("success", $this->translator->trans("User has been saved."));
goto C90e7;
B649f:
EventQueue::addEvent(EventQueue::EVENT_SITE_SSH_USER_EDIT, $user, $eventData, $request);
goto Fc2df;
E23b2:
$domainName = $site->getDomainName();
goto a3370;
B6b86:
$siteUpdater->updateUserSShKeys($sshUserName, $sshKeys);
goto E2b40;
c3fd7:
if (!(false === empty($sshUserPassword))) {
goto E6c61;
}
goto C0ac7;
C0ac7:
$siteUpdater->changeUserPassword($sshUserName, $sshUserPassword);
goto bfd29;
E2b40:
$eventData = ["site" => $domainName, "userName" => $sshUserName, "sshKeys" => $sshKeys];
goto B649f;
Cc6d2:
return $response;
goto Befbd;
a6f1e:
if (false === is_null($siteEntity)) {
goto Afa11;
}
goto cf3a7;
cd2c2:
$sshUserEntity = $form->getData();
goto Ba9b0;
a3370:
$siteEntity = $this->getSiteEntity($domainName);
goto a6f1e;
bfd29: E6c61:
goto B6b86;
Baee9:
$siteUpdater = $this->getSiteUpdater($site);
goto c3fd7;
Befbd:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto Bc72f;
db4cd: a6c90:
goto d3efc;
defb7:
goto e5b7f;
goto db4cd;
Bc72f: e5b7f:
goto eebc9;
eebc9:
}
public function deleteSshUser(Request $request): Response
{
goto bcc11;
d756e:
if (!(false === is_null($site))) {
goto Cb939;
}
goto f6a14;
bdffc:
$this->checkCsrfToken($request, "user-delete");
goto d756e;
f6a14:
try {
goto E27c4;
E27c4:
$session = $request->getSession();
goto B95ab;
F30f1:
return $response;
goto b5da7;
febef:
$sshUserSiteEntity = $sshUserEntity->getSite();
goto d7f3b;
Ebf47:
$domainName = $site->getDomainName();
goto Bfd39;
b1631:
EventQueue::addEvent(EventQueue::EVENT_SITE_SSH_USER_DELETE, $user, $evenData, $request);
goto D1277;
fb4f9:
$user = $this->getUser();
goto bd53e;
C9c8c:
$siteEntity->removeSshUser($sshUserEntity);
goto e2877;
abd0c:
$evenData = ["site" => $domainName, "userName" => $userName];
goto b1631;
F665a:
$response = $this->redirect($this->generateUrl("clp_site_users", ["domainName" => $site->getDomainName()]));
goto F30f1;
a7d71: f8eab:
goto d869d;
D1277:
$session->getFlashBag()->set("success", $this->translator->trans("User has been deleted."));
goto F665a;
bd53e:
$userName = $sshUserEntity->getUserName();
goto C9c8c;
A0910:
$siteUpdater = $this->getSiteUpdater($site);
goto B6049;
b5da7: F9670:
goto a7d71;
B6049:
$siteUpdater->deleteUser($userName, true);
goto abd0c;
B95ab:
$userName = $request->get("userName");
goto Ebf47;
E34c3:
$sshUserEntity = $this->sshUserEntityManager->findOneByUserName($userName);
goto Ff1ab;
Bfd39:
$siteEntity = $this->getSiteEntity($domainName);
goto E34c3;
d7f3b:
if (!($siteEntity->getDomainName() == $sshUserSiteEntity->getDomainName())) {
goto F9670;
}
goto fb4f9;
Ff1ab:
if (!(false === is_null($siteEntity) && false === empty($userName) && false === is_null($sshUserEntity))) {
goto f8eab;
}
goto febef;
e2877:
$this->siteEntityManager->updateEntity($siteEntity);
goto A0910;
d869d:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto db511;
d1722:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto f4d90;
db511: Cb939:
goto d1722;
bcc11:
$site = $this->getSite($request);
goto bdffc;
f4d90:
return $response;
goto d6b53;
d6b53:
}
public function security(Request $request): Response
{
goto f1f0a;
dcac3:
$basicAuthForm = $this->createBasicAuthForm($basicAuthEntity);
goto d1957;
b95e0:
return $response;
goto a139c;
A5523:
$response = $this->handleCloudflareForm($request, $cloudflareForm, $site);
goto A6de3;
E94a4:
$response = $this->render("Frontend/Site/security.html.twig", ["site" => $site, "blockedIps" => $blockedIps, "blockedBots" => $blockedBots, "basicAuthForm" => $basicAuthForm->createView(), "cloudflareForm" => $cloudflareForm->createView(), "formErrors" => $this->formErrors]);
goto be257;
Cbd2e: ba1a8:
goto efe40;
fc078:
if (!(false === is_null($response))) {
goto f02e6;
}
goto A2343;
E849b:
goto d4d46;
goto A5f87;
efe40:
if (!(true === $cloudflareForm->isSubmitted())) {
goto ac486;
}
goto A5523;
A5f87: a2b98:
goto f6e29;
ae675:
$response = $this->handleBasicAuthForm($request, $basicAuthForm, $site);
goto fc078;
B41c5:
if (!(true === $request->isMethod("POST"))) {
goto Dd450;
}
goto e2a34;
A6de3:
if (!(false === is_null($response))) {
goto ccc0d;
}
goto b95e0;
A23c1:
$cloudflareForm->handleRequest($request);
goto Bbfb1;
d1957:
$cloudflareForm = $this->createCloudflareForm($siteEntity, $cloudflareData);
goto B41c5;
a29f9:
$cloudflareData = ["allowTrafficFromCloudflareOnly" => $siteEntity->allowTrafficFromCloudflareOnly()];
goto e271b;
e2a34:
$basicAuthForm->handleRequest($request);
goto A23c1;
Ecb45: f02e6:
goto Cbd2e;
be257: d4d46:
goto f7d84;
B96ef:
$blockedIps = $site->getBlockedIps();
goto d3892;
bc3f7:
if (false === is_null($site)) {
goto a2b98;
}
goto C0c7a;
D222e:
if (!(true === is_null($basicAuthEntity))) {
goto cd73d;
}
goto C9d8a;
a139c: ccc0d:
goto a5dbf;
f7d84:
return $response;
goto c626c;
d3892:
$basicAuthEntity = $site->getBasicAuth();
goto D222e;
A2343:
return $response;
goto Ecb45;
d475b: Dd450:
goto E94a4;
c02c2: cd73d:
goto cd0c9;
cd0c9:
$basicAuthEntity->setSite($siteEntity);
goto dcac3;
e271b:
$blockedBots = $site->getBlockedBots();
goto B96ef;
C9d8a:
$basicAuthEntity = $this->basicAuthEntityManager->createEntity();
goto c02c2;
f6e29:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto a29f9;
f1f0a:
$site = $this->getSite($request);
goto bc3f7;
Bbfb1:
if (!(true === $basicAuthForm->isSubmitted())) {
goto ba1a8;
}
goto ae675;
C0c7a:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto E849b;
a5dbf: ac486:
goto d475b;
c626c:
}
private function createCloudflareForm(SiteEntity $siteEntity, array $data): Form
{
goto Acfc9;
b150b:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]);
goto D59da;
D59da:
return $form;
goto De5ff;
Acfc9:
$form = $this->createForm("App\Form\SiteCloudflareType", $data, ["action" => $this->generateUrl("clp_site_security", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]);
goto b150b;
De5ff:
}
private function createBasicAuthForm(BasicAuthEntity $basicAuthEntity): Form
{
goto Aae55;
F3e78:
$form = $this->createForm("App\Form\SiteBasicAuthType", $basicAuthEntity, ["action" => $this->generateUrl("clp_site_security", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]);
goto Bb3e9;
ae554:
return $form;
goto B27fc;
Aae55:
$siteEntity = $basicAuthEntity->getSite();
goto F3e78;
Bb3e9:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]);
goto ae554;
B27fc:
}
private function handleBasicAuthForm(Request $request, Form $form, Site $site)
{
goto C375e;
a9157:
$this->formErrors = $this->getErrorMessages($form);
goto a0143;
B5846: a3282:
goto Bbf48;
C375e:
if (true === $form->isValid()) {
goto C8425;
}
goto a9157;
C9172:
try {
goto D39f1;
b60c3:
$siteUpdater->reloadNginxService();
goto de52e;
e502d:
$response = $this->redirect($this->generateUrl("clp_site_security", ["domainName" => $site->getDomainName()]));
goto Bd0b0;
Fb982: c3258:
goto A1d62;
fa8e3:
$siteEntity = $this->getSiteEntity($domainName);
goto bf381;
C9cdb:
goto b79fe;
goto Fb982;
Cada8:
$siteUpdater->createBasicAuthFile($basicAuthEntity);
goto B7f00;
de52e:
$eventData = ["site" => $domainName, "active" => true === $basicAuthEntity->getIsActive() ? "1" : "0", "userName" => $basicAuthEntity->getUserName(), "whitelistedIps" => $basicAuthEntity->getWhitelistedIps()];
goto e67c7;
b8b9d:
$domainName = $site->getDomainName();
goto fa8e3;
b0019:
$siteEntity->setBasicAuth($basicAuthEntity);
goto C3da1;
C3da1:
$site->setBasicAuth($basicAuthEntity);
goto A0d04;
A1d62:
$user = $this->getUser();
goto a80d1;
a80d1:
$basicAuthEntity = $form->getData();
goto b0019;
A0d04:
$this->siteEntityManager->updateEntity($siteEntity);
goto C7aca;
e67c7:
EventQueue::addEvent(EventQueue::EVENT_SITE_BASIC_AUTHENTIFICATION_SETTINGS, $user, $eventData, $request);
goto C867b;
Bd0b0: b79fe:
goto de82a;
bf381:
if (false === is_null($siteEntity)) {
goto c3258;
}
goto c7680;
D39f1:
$session = $request->getSession();
goto b8b9d;
de82a:
return $response;
goto Ec61c;
C7aca:
$siteUpdater = $this->getSiteUpdater($site);
goto Cada8;
C867b:
$session->getFlashBag()->set("success", $this->translator->trans("Basic Authentication settings have been saved."));
goto e502d;
B7f00:
$siteUpdater->updateNginxVhost();
goto b60c3;
c7680:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto C9cdb;
Ec61c:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto B5846;
a0143:
goto a3282;
goto Ffda3;
Ffda3: C8425:
goto C9172;
Bbf48:
}
private function handleCloudflareForm(Request $request, Form $form, Site $site)
{
goto C10f9;
C10f9:
if (true === $form->isValid()) {
goto f9a89;
}
goto de271;
C9e21:
try {
goto ca90f;
Afe2d:
$eventData = ["site" => $domainName, "allowTrafficFromCloudflareOnly" => true === $allowTrafficFromCloudflareOnly ? "1" : "0"];
goto dcb09;
ac1c9:
$domainName = $site->getDomainName();
goto b8d9e;
B4b71:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto Db8f6;
c63bb:
return $response;
goto ec36c;
cea07:
$siteUpdater->updateNginxVhost();
goto C0cbb;
b8d9e:
$siteEntity = $this->getSiteEntity($domainName);
goto a32e4;
Ccac9:
$user = $this->getUser();
goto cedc4;
Ab77c:
$response = $this->redirect($this->generateUrl("clp_site_security", ["domainName" => $site->getDomainName()]));
goto Fe509;
Db8f6:
goto caf7a;
goto c7695;
ca90f:
$session = $request->getSession();
goto ac1c9;
C0cbb:
$siteUpdater->reloadNginxService();
goto Afe2d;
a0ac5:
$session->getFlashBag()->set("success", $this->translator->trans("Cloudflare settings have been saved."));
goto Ab77c;
D408b:
$this->siteEntityManager->updateEntity($siteEntity);
goto A14be;
d6d2a:
$siteEntity->setAllowTrafficFromCloudflareOnly($allowTrafficFromCloudflareOnly);
goto B6c2b;
B6c2b:
$site->setAllowTrafficFromCloudflareOnly($allowTrafficFromCloudflareOnly);
goto D408b;
dcb09:
EventQueue::addEvent(EventQueue::EVENT_SITE_CLOUDFLARE_SETTINGS, $user, $eventData, $request);
goto a0ac5;
a32e4:
if (false === is_null($siteEntity)) {
goto B4e77;
}
goto B4b71;
c7695: B4e77:
goto Ccac9;
Fe509: caf7a:
goto c63bb;
A14be:
$siteUpdater = $this->getSiteUpdater($site);
goto cea07;
cedc4:
$allowTrafficFromCloudflareOnly = $form->get("allowTrafficFromCloudflareOnly")->getData();
goto d6d2a;
ec36c:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto B6e7e;
de271:
$this->formErrors = $this->getErrorMessages($form);
goto C5364;
B6e7e: d1482:
goto de7a0;
C5364:
goto d1482;
goto Ecf26;
Ecf26: f9a89:
goto C9e21;
de7a0:
}
public function newBlockedIp(Request $request): Response
{
goto D09b1;
D33e9: Ad67c:
goto bdab8;
Cb0e0:
if (false === is_null($site)) {
goto C4f77;
}
goto A8654;
Eed83:
goto d9437;
goto feeec;
b6319:
$blockedIpEntity = $this->blockedIpEntityManager->createEntity();
goto fcc14;
d254a: d9437:
goto F7cc7;
fcc14:
$blockedIpEntity->setSite($siteEntity);
goto E0ce4;
efb5d: A4c03:
goto D33e9;
Ef8c5:
if (!(true === $form->isSubmitted())) {
goto A4c03;
}
goto D2f3c;
Ece3f:
if (!(false === is_null($response))) {
goto F8e59;
}
goto ca3ad;
A8654:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto Eed83;
F7cc7:
return $response;
goto e59b7;
Aea75: F8e59:
goto efb5d;
feeec: C4f77:
goto D9942;
D2f3c:
$response = $this->handleBlockedIpForm($request, $form, $site);
goto Ece3f;
B0ead:
$form->handleRequest($request);
goto Ef8c5;
E0ce4:
$form = $this->createBlockedIpForm($blockedIpEntity);
goto Ce991;
bdab8:
$response = $this->render("Frontend/Site/new-blocked-ip.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]);
goto d254a;
D09b1:
$site = $this->getSite($request);
goto Cb0e0;
Ce991:
if (!(true === $request->isMethod("POST"))) {
goto Ad67c;
}
goto B0ead;
D9942:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto b6319;
ca3ad:
return $response;
goto Aea75;
e59b7:
}
private function createBlockedIpForm(BlockedIpEntity $blockedIpEntity): Form
{
goto F6066;
F6066:
$siteEntity = $blockedIpEntity->getSite();
goto F8b37;
F8b37:
$form = $this->createForm("App\Form\SiteBlockedIPType", $blockedIpEntity, ["action" => $this->generateUrl("clp_site_security_blocked_ip_new", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]);
goto e64a8;
e64a8:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Add IP"]);
goto d867f;
d867f:
return $form;
goto b8af1;
b8af1:
}
private function handleBlockedIpForm(Request $request, Form $form, Site $site)
{
goto ab21f;
Ba2df:
try {
goto a101b;
a101b:
$session = $request->getSession();
goto b5835;
d4b00:
EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_IP_ADD, $user, $eventData, $request);
goto B4f18;
b01ac:
$siteEntity->addBlockedIp($blockedIp);
goto Bdf23;
D2e1a:
goto c9961;
goto b6adb;
d27c7:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto D2e1a;
b0921:
$response = $this->redirect($this->generateUrl("clp_site_security", ["domainName" => $site->getDomainName()]));
goto fc275;
A646d:
$eventData = ["site" => $domainName, "ip" => $blockedIp->getIp()];
goto d4b00;
fc275: c9961:
goto c175e;
F5e92:
$user = $this->getUser();
goto f1ae2;
ede92:
$siteUpdater->updateNginxVhost();
goto F24c9;
b6adb: a750b:
goto F5e92;
F24c9:
$siteUpdater->reloadNginxService();
goto A646d;
B4f18:
$session->getFlashBag()->set("success", $this->translator->trans("IP has been added."));
goto b0921;
f1ae2:
$blockedIp = $form->getData();
goto b01ac;
a240a:
$siteEntity = $this->getSiteEntity($domainName);
goto Df7c4;
Ea901:
$siteUpdater = $this->getSiteUpdater($site);
goto ede92;
Df7c4:
if (false === is_null($siteEntity)) {
goto a750b;
}
goto d27c7;
c175e:
return $response;
goto f8f78;
Bdf23:
$this->siteEntityManager->updateEntity($siteEntity);
goto Ea901;
b5835:
$domainName = $site->getDomainName();
goto a240a;
f8f78:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto Aa659;
a811b:
goto E56e3;
goto ea9bf;
bf487:
$this->formErrors = $this->getErrorMessages($form);
goto a811b;
Aa659: E56e3:
goto A4b86;
ea9bf: Df024:
goto Ba2df;
ab21f:
if (true === $form->isValid()) {
goto Df024;
}
goto bf487;
A4b86:
}
public function deleteBlockedIp(Request $request): Response
{
goto e8f89;
F2c0d:
$this->checkCsrfToken($request, "ip-delete");
goto Df4db;
D0765:
try {
goto Ae3b7;
c7b1f:
$eventData = ["site" => $domainName, "ip" => $blockedIpEntity->getIp()];
goto a1c27;
Ae3b7:
$session = $request->getSession();
goto d9377;
a1c27:
EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_IP_DELETE, $user, $eventData, $request);
goto b5109;
C775d:
$siteUpdater->updateNginxVhost();
goto A42ae;
b5109:
$session->getFlashBag()->set("success", $this->translator->trans("IP has been deleted."));
goto dee25;
ef4b0:
$siteUpdater = $this->getSiteUpdater($site);
goto C775d;
d9377:
$id = (int)$request->get("id");
goto Edf08;
f3a24:
return $response;
goto Fc5ed;
f3b7c:
$this->siteEntityManager->updateEntity($siteEntity);
goto ef4b0;
Ee60a:
$siteEntity = $this->getSiteEntity($domainName);
goto d4bca;
Edf08:
$domainName = $site->getDomainName();
goto Ee60a;
d4bca:
$blockedIpEntity = $this->blockedIpEntityManager->findOneById($id);
goto D70b3;
D70b3:
if (!(false === is_null($siteEntity) && false === empty($id) && false === is_null($blockedIpEntity) && $siteEntity == $blockedIpEntity->getSite())) {
goto ad09f;
}
goto E2524;
A49bc:
$siteEntity->removeBlockedIp($blockedIpEntity);
goto f3b7c;
dee25:
$response = $this->redirect($this->generateUrl("clp_site_security", ["domainName" => $site->getDomainName()]));
goto f3a24;
E2524:
$user = $this->getUser();
goto A49bc;
Fc5ed: ad09f:
goto D2dfd;
A42ae:
$siteUpdater->reloadNginxService();
goto c7b1f;
D2dfd:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto A3c32;
A3c32: F8e14:
goto b56c6;
b56c6:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto d98fb;
e8f89:
$site = $this->getSite($request);
goto F2c0d;
Df4db:
if (!(false === is_null($site))) {
goto F8e14;
}
goto D0765;
d98fb:
return $response;
goto C24e5;
C24e5:
}
public function newBlockedBot(Request $request): Response
{
goto C0bed;
Cccb4:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto c6488;
C5dd5:
$form->handleRequest($request);
goto aa948;
cc024: f8915:
goto A19ee;
F30c5:
return $response;
goto Fa7fd;
F85b9:
$form = $this->createBlockedBotForm($blockedBotEntity);
goto A015a;
E77ad: Ecc18:
goto F87c7;
A015a:
if (!(true === $request->isMethod("POST"))) {
goto B3b02;
}
goto C5dd5;
F7f3e:
if (!(false === is_null($response))) {
goto f8915;
}
goto b4b67;
b4b67:
return $response;
goto cc024;
C0bed:
$site = $this->getSite($request);
goto D26e1;
aa948:
if (!(true === $form->isSubmitted())) {
goto ee395;
}
goto e41a0;
F87c7:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto a5508;
c55d6:
$blockedBotEntity->setSite($siteEntity);
goto F85b9;
Fa84c: Fb8e6:
goto F30c5;
A0f33:
$response = $this->render("Frontend/Site/new-blocked-bot.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]);
goto Fa84c;
E4d0b: B3b02:
goto A0f33;
D26e1:
if (false === is_null($site)) {
goto Ecc18;
}
goto Cccb4;
c6488:
goto Fb8e6;
goto E77ad;
e41a0:
$response = $this->handleBlockedBotForm($request, $form, $site);
goto F7f3e;
A19ee: ee395:
goto E4d0b;
a5508:
$blockedBotEntity = $this->blockedBotEntityManager->createEntity();
goto c55d6;
Fa7fd:
}
private function createBlockedBotForm(BlockedBotEntity $blockedBotEntity): Form
{
goto Ecd7a;
E1fcb:
return $form;
goto D8ae5;
Ecd7a:
$siteEntity = $blockedBotEntity->getSite();
goto F8098;
Abaa4:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Add Bot"]);
goto E1fcb;
F8098:
$form = $this->createForm("App\Form\SiteBlockedBotType", $blockedBotEntity, ["action" => $this->generateUrl("clp_site_security_blocked_bot_new", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]);
goto Abaa4;
D8ae5:
}
private function handleBlockedBotForm(Request $request, Form $form, Site $site)
{
goto d3277;
c6262:
try {
goto F87ac;
c1d26:
$blockedBot = $form->getData();
goto f3462;
E91e9:
EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_BOT_ADD, $user, $eventData, $request);
goto Bdf1e;
De9ab:
if (false === is_null($siteEntity)) {
goto f9144;
}
goto Dba7c;
d97c5:
$this->siteEntityManager->updateEntity($siteEntity);
goto ed329;
A19c2:
$user = $this->getUser();
goto c1d26;
Dba7c:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto bfcb5;
e67c6: f9144:
goto A19c2;
Bdf1e:
$session->getFlashBag()->set("success", $this->translator->trans("Bot has been added."));
goto F7b72;
F7b72:
$response = $this->redirect($this->generateUrl("clp_site_security", ["domainName" => $site->getDomainName()]));
goto b546b;
D0f14:
$siteUpdater->reloadNginxService();
goto fa769;
b546b: fd1cd:
goto A3fda;
Db2d0:
$siteEntity = $this->getSiteEntity($domainName);
goto De9ab;
ed329:
$siteUpdater = $this->getSiteUpdater($site);
goto Cdcef;
bfcb5:
goto fd1cd;
goto e67c6;
fa769:
$eventData = ["site" => $domainName, "name" => $blockedBot->getName()];
goto E91e9;
Cdcef:
$siteUpdater->updateNginxVhost();
goto D0f14;
f3462:
$siteEntity->addBlockedBot($blockedBot);
goto d97c5;
D8269:
$domainName = $site->getDomainName();
goto Db2d0;
A3fda:
return $response;
goto Ded03;
F87ac:
$session = $request->getSession();
goto D8269;
Ded03:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto b8d85;
C2249:
$this->formErrors = $this->getErrorMessages($form);
goto a1d13;
a1d13:
goto Bef5b;
goto a1a91;
d3277:
if (true === $form->isValid()) {
goto Ce759;
}
goto C2249;
a1a91: Ce759:
goto c6262;
b8d85: Bef5b:
goto A72b9;
A72b9:
}
public function deleteBlockedBot(Request $request): Response
{
goto d6341;
eb30b:
$this->checkCsrfToken($request, "bot-delete");
goto f8095;
cb719:
return $response;
goto f02f9;
D60fc:
try {
goto bddde;
a2ccc:
$eventData = ["site" => $domainName, "name" => $blockedBotEntity->getName()];
goto ab718;
bddde:
$session = $request->getSession();
goto A5581;
Ebc3a:
$blockedBotEntity = $this->blockedBotEntityManager->findOneById($id);
goto B2562;
e3838:
$siteEntity->removeBlockedBot($blockedBotEntity);
goto E984d;
ab718:
EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_BOT_DELETE, $user, $eventData, $request);
goto A96c2;
D781c: f1546:
goto ede56;
B2562:
if (!(false === is_null($siteEntity) && false === empty($id) && false === is_null($blockedBotEntity) && $siteEntity == $blockedBotEntity->getSite())) {
goto f1546;
}
goto b9cf5;
Fe6c0:
$siteUpdater = $this->getSiteUpdater($site);
goto B7214;
A5581:
$id = (int)$request->get("id");
goto E4ae0;
B7214:
$siteUpdater->updateNginxVhost();
goto ec261;
A6429:
$response = $this->redirect($this->generateUrl("clp_site_security", ["domainName" => $site->getDomainName()]));
goto Aee6c;
Aa3c3:
$siteEntity = $this->getSiteEntity($domainName);
goto Ebc3a;
A96c2:
$session->getFlashBag()->set("success", $this->translator->trans("Bot has been deleted."));
goto A6429;
Aee6c:
return $response;
goto D781c;
E984d:
$this->siteEntityManager->updateEntity($siteEntity);
goto Fe6c0;
E4ae0:
$domainName = $site->getDomainName();
goto Aa3c3;
b9cf5:
$user = $this->getUser();
goto e3838;
ec261:
$siteUpdater->reloadNginxService();
goto a2ccc;
ede56:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto e2f40;
C794b:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto cb719;
e2f40: e5edc:
goto C794b;
f8095:
if (!(false === is_null($site))) {
goto e5edc;
}
goto D60fc;
d6341:
$site = $this->getSite($request);
goto eb30b;
f02f9:
}
public function certificates(Request $request): Response
{
goto a6758;
C05ae:
if (false === is_null($site)) {
goto Bae56;
}
goto a87cb;
A86c6:
goto e3327;
goto B3259;
B13da:
$response = $this->render("Frontend/Site/certificates.html.twig", ["site" => $site, "installedCertificate" => $installedCertificate, "certificates" => $certificates]);
goto A6427;
c3533:
$installedCertificate = $site->getCertificate();
goto f8dc8;
f8dc8:
$certificates = $site->getCertificates();
goto B13da;
A6427: e3327:
goto eab56;
a6758:
$site = $this->getSite($request);
goto C05ae;
eab56:
return $response;
goto cc9c2;
B3259: Bae56:
goto c3533;
a87cb:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto A86c6;
cc9c2:
}
public function importCertificate(Request $request): Response
{
goto eaf24;
Ff5df:
$certificateEntity->setType(CertificateEntity::TYPE_IMPORTED);
goto B8d9d;
f43cc:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto Ccac2;
Ec40c:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto a8101;
Cc181:
$form = $this->createImportCertificateForm($certificateEntity);
goto c4e48;
fc646: c8db7:
goto e3172;
a8101:
goto a8a8c;
goto Dc07a;
dfe1a:
$response = $this->handleImportCertificateForm($request, $form, $site);
goto Ead7f;
Dad1e:
return $response;
goto d5f7f;
F3325: cc09a:
goto fc646;
F452e: a8a8c:
goto Dad1e;
Ead7f:
if (!(false === is_null($response))) {
goto c86c4;
}
goto c0df8;
d9aa4:
if (!(true === $form->isSubmitted())) {
goto cc09a;
}
goto dfe1a;
Ccac2:
$certificateEntity = $this->certificateEntityManager->createEntity();
goto Ff5df;
eaf24:
$site = $this->getSite($request);
goto b93d9;
c4e48:
if (!(true === $request->isMethod("POST"))) {
goto c8db7;
}
goto C36ab;
b93d9:
if (false === is_null($site)) {
goto Af2fe;
}
goto Ec40c;
c0df8:
return $response;
goto Dbe95;
B8d9d:
$certificateEntity->setSite($siteEntity);
goto Cc181;
C36ab:
$form->handleRequest($request);
goto d9aa4;
Dbe95: c86c4:
goto F3325;
e3172:
$response = $this->render("Frontend/Site/import-certificate.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]);
goto F452e;
Dc07a: Af2fe:
goto f43cc;
d5f7f:
}
private function createImportCertificateForm(CertificateEntity $certificateEntity): Form
{
goto d81ee;
d3aea:
$form = $this->createForm("App\Form\SiteImportCertificateType", $certificateEntity, ["action" => $this->generateUrl("clp_site_certificate_import", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]);
goto ee27f;
d81ee:
$siteEntity = $certificateEntity->getSite();
goto d3aea;
C113c:
return $form;
goto Ed1cc;
ee27f:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Import and Install"]);
goto C113c;
Ed1cc:
}
private function handleImportCertificateForm(Request $request, Form $form, Site $site)
{
goto De5c8;
c0317:
goto e2f33;
goto E182a;
De5c8:
if (true === $form->isValid()) {
goto B84df;
}
goto Cd864;
D5bb6:
try {
goto ee42c;
da343: C10cf:
goto Cf152;
c2cff:
if (false === is_null($siteEntity)) {
goto C10cf;
}
goto f467b;
c9f0a: f5db9:
goto D3efd;
f467b:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto E27c8;
C4f62:
$siteEntity->addCertificate($certificateEntity);
goto c0f62;
E27c8:
goto f5db9;
goto da343;
Be0d5:
$siteUpdater = $this->getSiteUpdater($site);
goto Cdeef;
b227d:
$siteEntity = $this->getSiteEntity($domainName);
goto c2cff;
b7b4d:
$evenData = ["site" => $domainName];
goto B20c0;
c3e54:
$certificateEntity = $form->getData();
goto Be0d5;
Cf152:
$user = $this->getUser();
goto c3e54;
Cdeef:
$siteUpdater->installCertificate($certificateEntity);
goto C78f0;
b3d31:
$domainName = $site->getDomainName();
goto b227d;
ee42c:
$session = $request->getSession();
goto b3d31;
c0f62:
$this->siteEntityManager->updateEntity($siteEntity);
goto b7b4d;
Bbeec:
$session->getFlashBag()->set("success", $this->translator->trans("Certificate has been installed."));
goto Bc184;
D3efd:
return $response;
goto c48b9;
C78f0:
$siteEntity->setCertificate($certificateEntity);
goto C4f62;
B20c0:
EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_INSTALL, $user, $evenData, $request);
goto Bbeec;
Bc184:
$response = $this->redirect($this->generateUrl("clp_site_certificates", ["domainName" => $site->getDomainName()]));
goto c9f0a;
c48b9:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto Ded78;
Cd864:
$this->formErrors = $this->getErrorMessages($form);
goto c0317;
E182a: B84df:
goto D5bb6;
Ded78: e2f33:
goto B9b74;
B9b74:
}
public function newLetsEncryptCertificate(Request $request): Response
{
goto B39ea;
Ad7b6: D6477:
goto Abcc0;
A3d69: F1396:
goto cafde;
d1234: ca389:
goto A957f;
Fe8fb: Fdab2:
goto Dda69;
b1398:
$form = $this->createLetsEncryptCertificateForm($domainName);
goto B1b9b;
E8d49:
$domains = [$domainName];
goto ead5a;
Bce2e:
goto Fdab2;
goto Ad7b6;
ead5a:
goto Fc0ab;
goto D6715;
fb1bd:
if (!(false === is_null($response))) {
goto Fa57c;
}
goto F59ed;
f3fa9:
$resolvedDomainName = $this->domainNameParser->resolveDomainName($domainName);
goto A58f6;
D2df0: Fa57c:
goto d1234;
eab50:
if (false === is_null($site)) {
goto D6477;
}
goto d627d;
C8a69:
$domains = [$registrableDomain, sprintf("www.%s", $registrableDomain)];
goto ca096;
E1c36:
$domains = (array)$request->get("domains");
goto b8b7d;
B1b9b:
$domains = [];
goto E4b7f;
F59ed:
return $response;
goto D2df0;
E4b7f:
if (true === $request->isMethod("POST")) {
goto F1396;
}
goto f3fa9;
Dda69:
return $response;
goto bd26f;
A58f6:
$registrableDomain = $resolvedDomainName->registrableDomain()->toString();
goto D38c5;
A957f: E7b5b:
goto e6844;
a62ca:
$domains = array_unique($domains);
goto abb42;
Ad8af:
if (!(true === $form->isSubmitted())) {
goto ca389;
}
goto E1c36;
B8921:
if (true === is_null($subdomain) || "www" == $subdomain) {
goto bd2bf;
}
goto E8d49;
abb42:
$response = $this->handleLetsEncryptCertificateForm($request, $form, $site, $domains);
goto fb1bd;
D6715: bd2bf:
goto C8a69;
e6844:
$response = $this->render("Frontend/Site/new-lets-encrypt-certificate.html.twig", ["site" => $site, "domains" => $domains, "form" => $form->createView(), "formErrors" => $this->formErrors]);
goto Fe8fb;
cafde:
$form->handleRequest($request);
goto Ad8af;
ca096: Fc0ab:
goto ae35e;
B39ea:
$site = $this->getSite($request);
goto eab50;
d627d:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto Bce2e;
ae35e:
goto E7b5b;
goto A3d69;
b8b7d:
$domains = array_filter($domains, function ($value) {
return false === empty(trim($value));
});
goto F79d1;
F79d1:
$domains = array_map("trim", $domains);
goto a62ca;
a9d5c:
$subdomain = false === empty($subdomain) ? $subdomain : null;
goto B8921;
D38c5:
$subdomain = $resolvedDomainName->subDomain()->toString();
goto a9d5c;
Abcc0:
$domainName = $site->getDomainName();
goto b1398;
bd26f:
}
private function createLetsEncryptCertificateForm(string $domainName): Form
{
goto A0bd2;
dab6c:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Create and Install"]);
goto E54ad;
E54ad:
return $form;
goto C2593;
A0bd2:
$form = $this->createForm("App\Form\SiteLetsEncryptCertificateType", [], ["action" => $this->generateUrl("clp_site_lets_encrypt_certificate_new", ["domainName" => $domainName]), "method" => "POST", "attr" => ["id" => "create-lets-encrypt-certificate-form"]]);
goto dab6c;
C2593:
}
private function handleLetsEncryptCertificateForm(Request $request, Form $form, Site $site, array $domains)
{
goto f9a24;
f9a24:
if (!(true === $form->isValid())) {
goto f510e;
}
goto ed3d6;
B3d10:
$this->formErrors = $this->getErrorMessages($form);
goto A93d1;
ed3d6:
try {
goto B3ec7;
a2cf6:
$privateKey = new PrivateKey($letsEncryptPrivateKey);
goto Ecfaa;
C2395:
$user = $this->getUser();
goto F4145;
B4a12:
$certificateEntity->setSite($siteEntity);
goto E852d;
Ec06c:
$certificateEntity->setCertificateChain($certificate->getCertificateChain());
goto D86a3;
c7a0e:
return $response;
goto d6261;
dcd1c:
$response = $this->redirect($this->generateUrl("clp_site_certificates", ["domainName" => $site->getDomainName()]));
goto D7045;
F1619:
foreach ($validationErrors as $domain => $validationErrorMessage) {
$form->addError(new FormError(sprintf("%s: %s", $domain, $validationErrorMessage)));
B9853:
}
goto Efa83;
e2c78: a1b5e:
goto F70ba;
edb8e:
if (true === empty($validationErrors)) {
goto Bd1fa;
}
goto F1619;
D7045:
return $response;
goto ffbc3;
d6261:
goto a1b5e;
goto d5873;
E1e66:
$csrGenerator = new CsrGenerator($privateKey, $distinguishedName);
goto A6547;
a45c5:
$evenData = ["site" => $domainName];
goto ab2e8;
E1198:
$commonName = array_shift($distinguishedNameDomains);
goto c5df3;
C64fe:
$certificateEntity->setCertificate($certificate->getCertificate());
goto Ec06c;
D27a2:
$siteUpdater->createLetsEncryptChallengeFiles($certificateOrder);
goto Ecb59;
bce79:
$certificate = $letsEncryptClient->finalizeOrder($certificateOrder, $privateKey, $csr);
goto A9e75;
A6547:
$csr = $csrGenerator->generate();
goto bce79;
Abf6a:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto c7a0e;
c5df3:
$distinguishedName = new DistinguishedName($commonName, $distinguishedNameDomains);
goto A7e63;
ab2e8:
EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_INSTALL, $user, $evenData, $request);
goto a7c4b;
D8da8:
$siteUpdater->installCertificate($certificateEntity);
goto a5eb2;
ae090:
$siteUpdater = $this->getSiteUpdater($site);
goto f3163;
bc1a4: Bd1fa:
goto b3f01;
Ecfaa:
$letsEncryptClient = new LetsEncryptClient($privateKey);
goto D4b53;
b3f01:
$distinguishedNameDomains = $domains;
goto E1198;
D4b53:
$letsEncryptClient->registerAccount();
goto A82b0;
D2718:
$siteEntity->addCertificate($certificateEntity);
goto f869c;
ffbc3: fd31e:
goto e2c78;
A7e63:
$rsaKeyGenerator = new RsaKeyGenerator();
goto e9204;
B3ec7:
$session = $request->getSession();
goto faebc;
d5873: f8e7e:
goto C2395;
Bd25f:
$siteEntity = $this->getSiteEntity($domainName);
goto D3718;
A82b0:
$certificateOrder = $letsEncryptClient->requestOrder($domains);
goto ae090;
e9204:
$privateKey = $rsaKeyGenerator->generatePrivateKey();
goto E1e66;
f3163:
$siteUpdater->deleteLetsEncryptChallengeDirectory();
goto D27a2;
D86a3:
$siteUpdater = $this->getSiteUpdater($site);
goto D8da8;
a5eb2:
$siteEntity->setCertificate($certificateEntity);
goto D2718;
Bde28:
$certificateEntity->setPrivateKey($certificate->getPrivateKey());
goto C64fe;
faebc:
$domainName = $site->getDomainName();
goto Bd25f;
E852d:
$certificateEntity->setCsr($certificate->getCsr());
goto Bde28;
D3718:
if (false === is_null($siteEntity)) {
goto f8e7e;
}
goto Abf6a;
F4145:
$letsEncryptPrivateKey = $this->configManager->get("le_private_key");
goto a2cf6;
A9e75:
$certificateEntity = $this->certificateEntityManager->createEntity();
goto c50af;
c50af:
$certificateEntity->setType(CertificateEntity::TYPE_LETS_ENCRYPT);
goto B4a12;
a7c4b:
$session->getFlashBag()->set("success", $this->translator->trans("Certificate has been installed."));
goto dcd1c;
f869c:
$this->siteEntityManager->updateEntity($siteEntity);
goto a45c5;
Efa83: A5d8f:
goto A507f;
A507f:
goto fd31e;
goto bc1a4;
Ecb59:
$validationErrors = $letsEncryptClient->validateDomains($certificateOrder);
goto edb8e;
F70ba:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
} finally {
if (!(true === isset($siteUpdater))) {
goto Cb884;
}
$siteUpdater->deleteLetsEncryptChallengeDirectory();
Cb884:
}
goto da3e4;
da3e4: f510e:
goto B3d10;
A93d1:
}
public function installCertificate(Request $request): Response
{
goto C8ccc;
C8ccc:
$site = $this->getSite($request);
goto E8ec0;
e1f6a: ba7e0:
goto Cdce2;
Ef00e:
try {
goto f19f5;
A938e:
$certificateSiteEntity = $certificateEntity->getSite();
goto Cbb5a;
A532f:
return $response;
goto d15c3;
cb476:
$certificateEntity = $this->certificateEntityManager->findOneByUid($uid);
goto e318e;
e318e:
if (!(false === is_null($siteEntity) && false === empty($uid) && false === is_null($certificateEntity))) {
goto fbe7d;
}
goto A938e;
Eb6d1: fbe7d:
goto Ed354;
cd2f4:
$user = $this->getUser();
goto A1a4b;
Cf55b:
$session->getFlashBag()->set("success", $this->translator->trans("Certificate has been installed."));
goto f5859;
D06b3:
$siteEntity->setCertificate($certificateEntity);
goto E69ec;
Fdda5:
EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_INSTALL, $user, $evenData, $request);
goto Cf55b;
b8afa:
$siteUpdater->installCertificate($certificateEntity);
goto D06b3;
A1a4b:
$siteUpdater = $this->getSiteUpdater($site);
goto b8afa;
E69ec:
$this->siteEntityManager->updateEntity($siteEntity);
goto ab133;
f591e:
$siteEntity = $this->getSiteEntity($domainName);
goto cb476;
ab133:
$evenData = ["site" => $domainName];
goto Fdda5;
d15c3: A7847:
goto Eb6d1;
a5493:
$domainName = $site->getDomainName();
goto f591e;
Cbb5a:
if (!($siteEntity->getDomainName() == $certificateSiteEntity->getDomainName() && $siteEntity->getCertificate() != $certificateSiteEntity)) {
goto A7847;
}
goto cd2f4;
f5859:
$response = $this->redirect($this->generateUrl("clp_site_certificates", ["domainName" => $site->getDomainName()]));
goto A532f;
C3fa2:
$uid = $request->get("uid");
goto a5493;
f19f5:
$session = $request->getSession();
goto C3fa2;
Ed354:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto e1f6a;
fe24f:
return $response;
goto Aa428;
Cdce2:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto fe24f;
E8ec0:
if (!(false === is_null($site))) {
goto ba7e0;
}
goto Ef00e;
Aa428:
}
public function deleteCertificate(Request $request): Response
{
goto Ae472;
Ae472:
$site = $this->getSite($request);
goto F5e60;
E605c:
if (!(false === is_null($site))) {
goto B9230;
}
goto a4afd;
b7e35: B9230:
goto C5c29;
F5e60:
$this->checkCsrfToken($request, "certificate-delete");
goto E605c;
a4afd:
try {
goto Aad1a;
C3a27:
$domainName = $site->getDomainName();
goto Ce77a;
eca27:
$session->getFlashBag()->set("success", $this->translator->trans("Certificate has been deleted."));
goto cfa77;
B9fd5:
if (!(false === is_null($siteEntity) && false === empty($uid) && false === is_null($certificateEntity) && false === $certificateEntity->getDefaultCertificate())) {
goto e6426;
}
goto Bc8f1;
f2adf: a02ae:
goto Ca626;
Bba97:
$uid = $request->get("uid");
goto C3a27;
f50d9:
$this->siteEntityManager->updateEntity($siteEntity);
goto Fdc16;
Aad1a:
$session = $request->getSession();
goto Bba97;
d33fa:
$certificateEntity = $this->certificateEntityManager->findOneByUid($uid);
goto B9fd5;
Fdc16:
$evenData = ["site" => $domainName];
goto ef987;
cfa77:
$response = $this->redirect($this->generateUrl("clp_site_certificates", ["domainName" => $site->getDomainName()]));
goto C6b73;
E9da5:
$siteEntity->removeCertificate($certificateEntity);
goto f50d9;
ef987:
EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_DELETE, $user, $evenData, $request);
goto eca27;
Bc8f1:
$certificateSiteEntity = $certificateEntity->getSite();
goto Ec923;
D883f:
$user = $this->getUser();
goto E9da5;
C6b73:
return $response;
goto f2adf;
Ec923:
if (!($siteEntity->getDomainName() == $certificateSiteEntity->getDomainName() && $siteEntity->getCertificate() != $certificateSiteEntity)) {
goto a02ae;
}
goto D883f;
Ce77a:
$siteEntity = $this->getSiteEntity($domainName);
goto d33fa;
Ca626: e6426:
goto D00ed;
D00ed:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto b7e35;
dad4c:
return $response;
goto Ef059;
C5c29:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto dad4c;
Ef059:
}
public function databases(Request $request): Response
{
goto e8d34;
F3512:
goto F4e10;
goto d2954;
e8d34:
$site = $this->getSite($request);
goto E27bd;
Eb990:
return $response;
goto Dfd10;
d2954: d2a91:
goto D1fa9;
E27bd:
if (false === is_null($site)) {
goto d2a91;
}
goto Caf72;
F1276: da399:
goto C402c;
A4435:
$numberOfDatabaseUsers = 0;
goto C988a;
d1784: F4e10:
goto Eb990;
D1fa9:
$databases = $site->getDatabases();
goto Fadb1;
Caf72:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto F3512;
C988a:
foreach ($databases as $database) {
$numberOfDatabaseUsers += count($database->getUsers());
e7499:
}
goto F1276;
Fadb1:
$databaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto A4435;
C402c:
$response = $this->render("Frontend/Site/databases.html.twig", ["site" => $site, "databases" => $databases, "numberOfDatabaseUsers" => $numberOfDatabaseUsers, "databaseServer" => $databaseServerEntity]);
goto d1784;
Dfd10:
}
public function newDatabase(Request $request): Response
{
goto d6b4f;
E1499:
if (!(true === $request->isMethod("POST"))) {
goto C9ad2;
}
goto Acaca;
d6b4f:
$site = $this->getSite($request);
goto A9b1b;
f90d7:
$response = $this->handleDatabaseForm($request, $form, $site);
goto Ca970;
d8663:
$databaseEntity = $this->databaseEntityManager->createEntity();
goto D7d86;
Ca970:
if (!(false === is_null($response))) {
goto E1f29;
}
goto B930f;
d94e0:
$form = $this->createDatabaseForm($site, $databaseEntity);
goto E1499;
Cf75a: c9123:
goto a3bb8;
B930f:
return $response;
goto b4bf8;
Ffcf0: C954e:
goto D23f0;
F655e: d492b:
goto D34dc;
D7d86:
$databaseEntity->setSite($siteEntity);
goto d94e0;
fdcb5:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto Ae5cf;
D23f0:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto d8663;
Ae5cf:
goto c9123;
goto Ffcf0;
a3bb8:
return $response;
goto C9391;
A9b1b:
if (false === is_null($site)) {
goto C954e;
}
goto fdcb5;
b4bf8: E1f29:
goto F655e;
bcabd:
if (!(true === $form->isSubmitted())) {
goto d492b;
}
goto f90d7;
D34dc: C9ad2:
goto Db1b4;
Db1b4:
$response = $this->render("Frontend/Site/new-database.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]);
goto Cf75a;
Acaca:
$form->handleRequest($request);
goto bcabd;
C9391:
}
private function createDatabaseForm(Site $site, DatabaseEntity $databaseEntity): Form
{
goto Ac9ca;
C5002:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Add Database"]);
goto Ba203;
Ac9ca:
$form = $this->createForm("App\Form\SiteDatabaseType", $databaseEntity, ["action" => $this->generateUrl("clp_site_database_new", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]);
goto C5002;
Ba203:
return $form;
goto C0d87;
C0d87:
}
private function handleDatabaseForm(Request $request, Form $form, Site $site)
{
goto a6eb2;
c79da: D4c55:
goto Db5ce;
dda39: ef037:
goto E68ff;
E68ff:
try {
goto a6dc8;
f7eb0: Cc037:
goto Fb2dc;
D9add:
$databaseUserName = $form->get("userName")->getData();
goto D9ab1;
A94d1:
$response = $this->redirect($this->generateUrl("clp_site_database_new", ["domainName" => $site->getDomainName()]));
goto Fca19;
C9eb0:
$databaseManager = new DatabaseManager($activeDatabaseServerEntity);
goto d1dc8;
Fb2dc:
$databaseEntity = $form->getData();
goto A8cf4;
adfe9:
$response = $this->redirect($this->generateUrl("clp_site_databases", ["domainName" => $site->getDomainName()]));
goto D489b;
ff55e:
return $response;
goto C3398;
D489b: aaf2d:
goto ff55e;
d1dc8:
$databaseEntity->setDatabaseServer($activeDatabaseServerEntity);
goto Ebfcd;
A8cf4:
$activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto C9eb0;
Eea07:
$databaseManager->createUser($databaseUserEntity);
goto Aea68;
af87d:
if (false === is_null($siteEntity)) {
goto Cc037;
}
goto A94d1;
D9a14:
$siteEntity = $this->getSiteEntity($domainName);
goto af87d;
d34cd:
$databaseUserEntity->setDatabase($databaseEntity);
goto Cbd42;
Ae0dd:
$databaseUserEntity->setPassword(Crypto::encrypt($databaseUserPassword));
goto C20dc;
B0d82:
$databaseUserEntity->setUserName($databaseUserName);
goto Ae0dd;
C20dc:
$databaseUserEntity->setPermissions(DatabaseUserEntity::PERMISSIONS_READ_WRITE);
goto d34cd;
C3fb8:
$session->getFlashBag()->set("success", $this->translator->trans("Database has been added."));
goto adfe9;
C33c1:
$eventData = ["site" => $domainName, "database" => $databaseEntity->getName(), "databaseUserName" => $databaseUserEntity->getUserName()];
goto cf76b;
Aea68:
$this->siteEntityManager->updateEntity($siteEntity);
goto C33c1;
ac089:
$databaseManager->createDatabase($databaseEntity);
goto Eea07;
cf76b:
EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_ADD, $user, $eventData, $request);
goto C3fb8;
Db115:
$databaseUserEntity = $this->databaseUserEntityManager->createEntity();
goto B0d82;
Cbd42:
$databaseEntity->addUser($databaseUserEntity);
goto d62d4;
d62d4:
$siteEntity->addDatabase($databaseEntity);
goto ac089;
Fca19:
goto aaf2d;
goto f7eb0;
D6fc0:
$domainName = $site->getDomainName();
goto D9a14;
a6dc8:
$user = $this->getUser();
goto c2157;
D9ab1:
$databaseUserPassword = $form->get("userPassword")->getData();
goto Db115;
c2157:
$session = $request->getSession();
goto D6fc0;
Ebfcd:
$databaseEntity->setSite($siteEntity);
goto D9add;
C3398:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto c79da;
a6eb2:
if (true === $form->isValid()) {
goto ef037;
}
goto A37ab;
A37ab:
$this->formErrors = $this->getErrorMessages($form);
goto cbb2d;
cbb2d:
goto D4c55;
goto dda39;
Db5ce:
}
public function deleteDatabase(Request $request): Response
{
goto D9cd1;
D7568:
$databaseEntity = $this->databaseEntityManager->findOneByName($databaseName);
goto fabae;
B5e53:
return $response;
goto e13c6;
B53f9:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto B5e53;
Ca627: C6acf:
goto B53f9;
B1984:
$response = $this->redirect($this->generateUrl("clp_site_databases", ["domainName" => $site->getDomainName()]));
goto B66ab;
f3605:
$databaseName = $request->get("databaseName");
goto D7568;
fabae:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto Aff7c;
D9cd1:
$site = $this->getSite($request);
goto Ded5d;
d2680: cef8f:
goto Ca627;
A84a0:
try {
goto A7b1b;
A1dea:
$databaseManager->deleteDatabase($databaseEntity, true);
goto D40c3;
De56e:
EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_DELETE, $user, $eventData, $request);
goto F7426;
D35e5:
$session = $request->getSession();
goto A3fdd;
A3fdd:
$domainName = $site->getDomainName();
goto fe6ab;
Bffc2:
$this->siteEntityManager->updateEntity($siteEntity);
goto A2802;
fe6ab:
$databaseServerEntity = $databaseEntity->getDatabaseServer();
goto Dd998;
F7426:
$session->getFlashBag()->set("success", $this->translator->trans("Database has been deleted."));
goto E45c4;
A7b1b:
$user = $this->getUser();
goto D35e5;
Dd998:
$databaseManager = new DatabaseManager($databaseServerEntity);
goto A1dea;
A2802:
$eventData = ["site" => $domainName, "database" => $databaseEntity->getName()];
goto De56e;
D40c3:
$siteEntity->removeDatabase($databaseEntity);
goto Bffc2;
E45c4:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto B1984;
Af555:
if (!(false === is_null($site))) {
goto C6acf;
}
goto f3605;
B66ab:
return $response;
goto d2680;
Ded5d:
$this->checkCsrfToken($request, "database-delete");
goto Af555;
Aff7c:
if (!(false === is_null($databaseEntity) && $site->getDomainName() == $databaseEntity->getSite()->getDomainName() && false === is_null($siteEntity))) {
goto cef8f;
}
goto A84a0;
e13c6:
}
public function phpMyAdmin(Request $request): Response
{
goto Aa89c;
Eb42a:
$data = ["host" => $activeDatabaseServerEntity->getHost(), "userName" => $databaseUserEntity->getUserName(), "password" => $databaseUserEntity->getDecryptedPassword(), "port" => $activeDatabaseServerEntity->getPort()];
goto Eac22;
b7a82:
$cookie = new Cookie("clp-pma", $encryptedData);
goto ab5e4;
D5869:
if (false === is_null($domainName)) {
goto F908f;
}
goto e856f;
f30da: b547e:
goto aa4cb;
E601a:
if (!(false === is_null($activeDatabaseServerEntity))) {
goto B07b4;
}
goto F470c;
ecb6f:
if (!(false === is_null($databaseEntity) && $site->getDomainName() == $databaseEntity->getSite()->getDomainName())) {
goto A9898;
}
goto ea9cb;
Debf4:
goto E0eec;
goto F4690;
c1d94:
$response->headers->clearCookie("pmaAuth-1_https");
goto F7ac1;
B504b:
$phpMyAdminUrl = sprintf("https://%s:%s/phpmyadmin/login.php?host=%s&port=%s", $request->getHost(), $request->getPort(), $databaseServerHost, $databaseServerPort);
goto ab69e;
Ec1ef: A9898:
goto E89e3;
F0743:
$databaseEntity = $databaseUserEntity->getDatabase();
goto ecb6f;
df7c5:
$response->headers->setCookie($cookie);
goto B1726;
e5cd2:
$databaseUserEntity = $this->databaseUserEntityManager->findOneByUserName($databaseUserName);
goto eb2d2;
aa4cb: E0eec:
goto c51f2;
ab5e4:
$response = new RedirectResponse($phpMyAdminUrl);
goto df7c5;
Eac22:
$data = serialize($data);
goto cd32a;
F470c:
$databaseServerHost = urlencode(base64_encode($activeDatabaseServerEntity->getHost()));
goto d5381;
ea9cb:
$databaseServerHost = urlencode(base64_encode($activeDatabaseServerEntity->getHost()));
goto B5a84;
E27b5:
return $response;
goto ac2f4;
F4690: F908f:
goto b43c5;
c51f2:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto E27b5;
B1726:
return $response;
goto Ec1ef;
Bd2b2:
$phpMyAdminUrl = sprintf("https://%s:%s/phpmyadmin/login.php?host=%s&port=%s", $request->getHost(), $request->getPort(), $databaseServerHost, $databaseServerPort);
goto Eb42a;
eb2d2:
$activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto Ce4ba;
E89e3: fd994:
goto f30da;
e856f:
$activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto E601a;
B5a84:
$databaseServerPort = $activeDatabaseServerEntity->getPort();
goto Bd2b2;
D5a95:
return $response;
goto a5ee3;
c2242:
$encryptedData = trim(base64_encode($encryptedData));
goto b7a82;
f9a2d:
if (!(false === is_null($site))) {
goto b547e;
}
goto f40c5;
F7ac1:
$response->headers->clearCookie("SignonSession");
goto D5a95;
b43c5:
$site = $this->getSite($request);
goto f9a2d;
a5ee3: B07b4:
goto Debf4;
A029d:
$response->headers->clearCookie("clp-pma");
goto ec6bd;
ec6bd:
$response->headers->clearCookie("phpMyAdmin_https");
goto c1d94;
ab69e:
$response = new RedirectResponse($phpMyAdminUrl);
goto A029d;
f40c5:
$databaseUserName = $request->get("databaseUserName");
goto e5cd2;
d5381:
$databaseServerPort = $activeDatabaseServerEntity->getPort();
goto B504b;
cd32a:
$encryptedData = Crypto::encrypt($data);
goto c2242;
Aa89c:
$domainName = $request->get("domainName");
goto D5869;
Ce4ba:
if (!(false === is_null($activeDatabaseServerEntity) && false === is_null($activeDatabaseServerEntity))) {
goto fd994;
}
goto F0743;
ac2f4:
}
public function phpMyAdminLogout(Request $request)
{
goto D3396;
db3d1:
$response->headers->clearCookie("phpMyAdmin_https");
goto Ffe44;
D3396:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto C5ccf;
edd24:
return $response;
goto c95f2;
D5ac3:
$response->headers->clearCookie("SignonSession");
goto edd24;
Ffe44:
$response->headers->clearCookie("pmaAuth-1_https");
goto D5ac3;
C5ccf:
$response->headers->clearCookie("clp-pma");
goto db3d1;
c95f2:
}
public function newDatabaseUser(Request $request): Response
{
goto A9386;
B71a2:
$session = $request->getSession();
goto Ce9df;
Efc6e: D9fab:
goto afc24;
afc24:
$response = $this->render("Frontend/Site/new-database-user.html.twig", ["site" => $site, "databaseUser" => $databaseUserEntity, "databases" => $databases, "form" => $form->createView(), "formErrors" => $this->formErrors]);
goto D889e;
c859e: E3def:
goto Efc6e;
Eb1bc:
$databases = $site->getDatabases();
goto b7881;
f64c7: d46f2:
goto Eb1bc;
B6762:
$form->handleRequest($request);
goto fc6bf;
F0783:
$databaseUserEntity = $this->databaseUserEntityManager->createEntity();
goto E3129;
Ce9df:
$session->getFlashBag()->set("danger", $this->translator->trans("No database found; create a database first."));
goto baea8;
b3bd2: A4514:
goto c859e;
E3129:
$databaseUserEntity->setSite($siteEntity);
goto C3f4a;
B0d6d:
if (false === is_null($site)) {
goto d46f2;
}
goto C5833;
A9386:
$site = $this->getSite($request);
goto B0d6d;
Eb1ca:
return $response;
goto b3bd2;
b7881:
$domainName = $site->getDomainName();
goto Ca760;
baea8:
$response = $this->redirect($this->generateUrl("clp_site_databases", ["domainName" => $site->getDomainName()]));
goto De366;
f171e: D9c67:
goto F0783;
B1f28:
if (!(true === $request->isMethod("POST"))) {
goto D9fab;
}
goto B6762;
A4e06:
$response = $this->handleDatabaseUserForm($request, $form, $site);
goto Afed5;
De366:
goto b7b11;
goto f171e;
c98d5:
if (count($databases) && false === is_null($siteEntity)) {
goto D9c67;
}
goto B71a2;
Ca760:
$siteEntity = $this->getSiteEntity($domainName);
goto c98d5;
D889e: b7b11:
goto C31fc;
fc6bf:
if (!(true === $form->isSubmitted())) {
goto E3def;
}
goto A4e06;
Afed5:
if (!(false === is_null($response))) {
goto A4514;
}
goto Eb1ca;
fd5e7:
goto C3628;
goto f64c7;
C3f4a:
$form = $this->createDatabaseUserForm($site, $databaseUserEntity);
goto B1f28;
C31fc: C3628:
goto F634b;
C5833:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto fd5e7;
F634b:
return $response;
goto C6d44;
C6d44:
}
private function createDatabaseUserForm(Site $site, DatabaseUserEntity $databaseUserEntity): Form
{
goto Ac8e4;
Ac8e4:
$form = $this->createForm("App\Form\SiteDatabaseUserType", $databaseUserEntity, ["action" => $this->generateUrl("clp_site_database_user_new", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]);
goto fd6f4;
F40a6:
return $form;
goto Fb73e;
fd6f4:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Add Database User"]);
goto F40a6;
Fb73e:
}
private function handleDatabaseUserForm(Request $request, Form $form, Site $site)
{
goto A60e9;
A9ad2: F5553:
goto Ccefd;
A60e9:
if (true === $form->isValid()) {
goto F5553;
}
goto ee965;
Ccefd:
try {
goto F211a;
af8ca:
goto E4108;
goto Dd434;
f503b:
$eventData = ["site" => $domainName, "databaseUserName" => $databaseUserEntity->getUserName(), "permissions" => $databaseUserEntity->getPermissions(), "database" => $databaseName];
goto Ae8f3;
E876e:
$databaseName = $databaseEntity->getName();
goto f503b;
c8fe7:
$siteEntity = $this->getSiteEntity($domainName);
goto ba527;
b0e44:
$response = $this->redirect($this->generateUrl("clp_site_databases", ["domainName" => $site->getDomainName()]));
goto F3607;
eb765:
return $response;
goto f2ee5;
ba527:
if (false === is_null($siteEntity)) {
goto d0136;
}
goto B7379;
a476d:
$session = $request->getSession();
goto e52c2;
Dd434: d0136:
goto dc0dc;
Adc98:
$activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto C8ae4;
bd12e:
$encryptedPassword = Crypto::encrypt($databaseUserEntity->getPassword());
goto E0756;
dc0dc:
$databaseUserEntity = $form->getData();
goto bd12e;
F3607: E4108:
goto eb765;
Ae8f3:
EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_USER_ADD, $user, $eventData, $request);
goto f010b;
F211a:
$user = $this->getUser();
goto a476d;
B7379:
$response = $this->redirect($this->generateUrl("clp_site_database_user_new", ["domainName" => $site->getDomainName()]));
goto af8ca;
db700:
$databaseManager->createUser($databaseUserEntity);
goto E8f2d;
E8f2d:
$this->databaseUserEntityManager->updateEntity($databaseUserEntity);
goto e0ae1;
E0756:
$databaseUserEntity->setPassword($encryptedPassword);
goto Adc98;
e0ae1:
$databaseEntity = $databaseUserEntity->getDatabase();
goto E876e;
f010b:
$session->getFlashBag()->set("success", $this->translator->trans("Database User has been added."));
goto b0e44;
C8ae4:
$databaseManager = new DatabaseManager($activeDatabaseServerEntity);
goto db700;
e52c2:
$domainName = $site->getDomainName();
goto c8fe7;
f2ee5:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto e3183;
ee965:
$this->formErrors = $this->getErrorMessages($form);
goto Ff16c;
Ff16c:
goto D1585;
goto A9ad2;
e3183: D1585:
goto Fd036;
Fd036:
}
public function editDatabaseUser(Request $request): Response
{
goto d41f6;
C802d:
if (count($databases) && false === is_null($siteEntity)) {
goto A7eb5;
}
goto dc814;
c4ecb: d5902:
goto cc460;
E77e3:
$response = $this->handleDatabaseUserEditForm($request, $form, $site);
goto C1893;
Ed616:
$databaseUserEntity = $this->databaseUserEntityManager->findOneByUserName($databaseUserName);
goto c289d;
dc814:
$session = $request->getSession();
goto a94e3;
cf6f9:
$form->handleRequest($request);
goto A774e;
B057a:
return $response;
goto a99b4;
Fcec3: Ac6f2:
goto f9891;
C17e5:
if (!(true === $request->isMethod("POST"))) {
goto Cdae7;
}
goto cf6f9;
E8e26:
$databaseUserEntity->setPassword('');
goto a8481;
c6586:
$domainName = $site->getDomainName();
goto f367a;
D9a01: a98a4:
goto da477;
C1457:
$databaseUserName = $request->get("databaseUserName");
goto Ed616;
a83e9:
$response = $this->redirect($this->generateUrl("clp_site_databases", ["domainName" => $site->getDomainName()]));
goto bdfce;
C2d2c:
if (false === is_null($site)) {
goto a98a4;
}
goto e770a;
da477:
$databases = $site->getDatabases();
goto c6586;
Bfaf9:
goto Ac6f2;
goto D9a01;
a99b4: D11a3:
goto c4ecb;
a8481:
$form = $this->createDatabaseUserEditForm($site, $databaseUserEntity);
goto C17e5;
cc460: Cdae7:
goto Ed559;
bdfce:
goto F000a;
goto a6b98;
f9891:
return $response;
goto fefe7;
c289d:
if (!(false === is_null($databaseUserEntity))) {
goto Dd7fe;
}
goto E8e26;
Fa243: Dd7fe:
goto a4010;
a6b98: A7eb5:
goto C1457;
A774e:
if (!(true === $form->isSubmitted())) {
goto d5902;
}
goto E77e3;
a4010: F000a:
goto Fcec3;
Ed559:
$response = $this->render("Frontend/Site/edit-database-user.html.twig", ["site" => $site, "databaseUser" => $databaseUserEntity, "form" => $form->createView(), "formErrors" => $this->formErrors]);
goto Fa243;
e770a:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto Bfaf9;
f367a:
$siteEntity = $this->getSiteEntity($domainName);
goto C802d;
a94e3:
$session->getFlashBag()->set("danger", $this->translator->trans("No database found; create a database first."));
goto a83e9;
d41f6:
$site = $this->getSite($request);
goto C2d2c;
C1893:
if (!(false === is_null($response))) {
goto D11a3;
}
goto B057a;
fefe7:
}
private function createDatabaseUserEditForm(Site $site, DatabaseUserEntity $databaseUserEntity): Form
{
goto b11da;
bf2b4:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]);
goto F8e3a;
F8e3a:
return $form;
goto b544b;
b11da:
$form = $this->createForm("App\Form\SiteDatabaseUserEditType", $databaseUserEntity, ["action" => $this->generateUrl("clp_site_database_user_edit", ["domainName" => $site->getDomainName(), "databaseUserName" => $databaseUserEntity->getUserName()]), "method" => "POST", "attr" => []]);
goto bf2b4;
b544b:
}
private function handleDatabaseUserEditForm(Request $request, Form $form, Site $site)
{
goto f925b;
b8e5a:
$this->formErrors = $this->getErrorMessages($form);
goto F0d29;
f925b:
if (true === $form->isValid()) {
goto d0e62;
}
goto b8e5a;
F0d29:
goto a4874;
goto Dbcd6;
C3726: a4874:
goto eb1c1;
D74d7:
try {
goto B050e;
E8175:
$this->databaseUserEntityManager->updateEntity($databaseUserEntity);
goto Ac37c;
Fe144:
if (false === is_null($siteEntity)) {
goto C11b9;
}
goto bad70;
ad277:
$response = $this->redirect($this->generateUrl("clp_site_databases", ["domainName" => $site->getDomainName()]));
goto c7a8a;
b39a4:
$databaseManager = new DatabaseManager($activeDatabaseServerEntity);
goto Bb293;
E583b:
$encryptedPassword = Crypto::encrypt($databaseUserEntity->getPassword());
goto C7795;
c21ba:
$session->getFlashBag()->set("success", $this->translator->trans("Database User has been updated."));
goto ad277;
c7a8a: e5d1f:
goto a3d7c;
C5362:
$activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto b39a4;
b7bbf:
$eventData = ["site" => $domainName, "databaseUserName" => $databaseUserEntity->getUserName(), "permissions" => $databaseUserEntity->getPermissions(), "database" => $databaseName];
goto C81d3;
bad70:
$response = $this->redirect($this->generateUrl("clp_site_database_user_new", ["domainName" => $site->getDomainName()]));
goto E56b6;
Bb293:
$databaseManager->createUser($databaseUserEntity);
goto E8175;
D0f40:
$databaseUserEntity = $form->getData();
goto E583b;
fff5c:
$session = $request->getSession();
goto a0fef;
C7795:
$databaseUserEntity->setPassword($encryptedPassword);
goto C5362;
a3d7c:
return $response;
goto Fcab8;
C81d3:
EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_USER_EDIT, $user, $eventData, $request);
goto c21ba;
B050e:
$user = $this->getUser();
goto fff5c;
eb1c0:
$siteEntity = $this->getSiteEntity($domainName);
goto Fe144;
a0fef:
$domainName = $site->getDomainName();
goto eb1c0;
Ac37c:
$databaseEntity = $databaseUserEntity->getDatabase();
goto a9205;
a9205:
$databaseName = $databaseEntity->getName();
goto b7bbf;
E56b6:
goto e5d1f;
goto Abbc0;
Abbc0: C11b9:
goto D0f40;
Fcab8:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto C3726;
Dbcd6: d0e62:
goto D74d7;
eb1c1:
}
public function deleteDatabaseUser(Request $request): Response
{
goto dc054;
ef5dd:
$databaseUserName = $request->get("databaseUserName");
goto C7d48;
A1c85:
$response = $this->redirect($this->generateUrl("clp_site_databases", ["domainName" => $site->getDomainName()]));
goto C897d;
B05c4:
try {
goto fe7b8;
Ccd37:
$databaseManager->deleteUser($databaseUserEntity);
goto ec093;
A8d39:
$domainName = $site->getDomainName();
goto F14bc;
a4e81:
EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_USER_DELETE, $user, $eventData, $request);
goto dc97c;
dde77:
$session->getFlashBag()->set("success", $this->translator->trans("Database User has been deleted."));
goto C3a24;
C3a24:
$eventData = ["site" => $domainName, "databaseUserName" => $databaseUserName];
goto a4e81;
dc97c: d4581:
goto c1a60;
B06a5:
$databaseManager = new DatabaseManager($activeDatabaseServerEntity);
goto Ccd37;
e4dcf:
$activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto B06a5;
b563b:
$user = $this->getUser();
goto A8d39;
ec093:
$this->databaseUserEntityManager->deleteEntity($databaseUserEntity);
goto dde77;
F14bc:
$session = $request->getSession();
goto e4dcf;
Afbd4:
if (!(false === is_null($databaseEntity) && $site->getDomainName() == $databaseEntity->getSite()->getDomainName())) {
goto d4581;
}
goto b563b;
fe7b8:
$databaseEntity = $databaseUserEntity->getDatabase();
goto Afbd4;
c1a60:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto A1c85;
C897d:
return $response;
goto B54d0;
C7d48:
$databaseUserEntity = $this->databaseUserEntityManager->findOneByUserName($databaseUserName);
goto e099a;
f97b0: aba43:
goto A8b9b;
A8b9b:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto Ce61f;
dc054:
$site = $this->getSite($request);
goto E3387;
Ce61f:
return $response;
goto e5b9d;
b9a37:
if (!(false === is_null($site))) {
goto aba43;
}
goto ef5dd;
B54d0: b6b87:
goto f97b0;
e099a:
if (!(false === is_null($databaseUserEntity))) {
goto b6b87;
}
goto B05c4;
E3387:
$this->checkCsrfToken($request, "database-user-delete");
goto b9a37;
e5b9d:
}
public function varnishCache(Request $request): Response
{
goto Cd06a;
ad964:
if (false === is_null($site) && true === $site->getVarnishCache()) {
goto f39c7;
}
goto e101c;
f69fb: f39c7:
goto Fa34d;
dc8db:
$purgeCacheForm = $this->createVarnishCachePurgeCacheForm($site);
goto e7eb0;
e7eb0:
if (!(true === $request->isMethod("POST"))) {
goto b9306;
}
goto B24a7;
e07a4: ee3cb:
goto E97b9;
C306a:
return $response;
goto abb53;
d7b01:
goto ee3cb;
goto f69fb;
Bb6e1:
$response = $this->handleVarnishCachePurgeCacheForm($request, $purgeCacheForm, $site);
goto a754f;
E97b9:
return $response;
goto Ae8a3;
A8c2c: c843f:
goto d0d91;
e5986:
return $response;
goto a9570;
e1216:
$response = $this->handleVarnishCacheSettingsForm($request, $settingsForm, $site);
goto D169f;
D169f:
if (!(false === is_null($response))) {
goto f6d1b;
}
goto e5986;
A035f:
if (!(true === $purgeCacheForm->isSubmitted())) {
goto c843f;
}
goto Bb6e1;
c6b63:
$purgeCacheForm->handleRequest($request);
goto Febe8;
Fa34d:
$varnishCacheSettings = $site->getVarnishCacheSettings();
goto E8955;
a754f:
if (!(false === is_null($response))) {
goto fdd8e;
}
goto C306a;
E8955:
$varnishCacheSettingsData = ["isEnabled" => true === isset($varnishCacheSettings["enabled"]) && true === $varnishCacheSettings["enabled"] ? true : false, "server" => true === isset($varnishCacheSettings["server"]) ? $varnishCacheSettings["server"] : "127.0.0.1:6081", "cacheTagPrefix" => true === isset($varnishCacheSettings["cacheTagPrefix"]) ? $varnishCacheSettings["cacheTagPrefix"] : substr(md5(time()), 0, 4), "cacheLifetime" => true === isset($varnishCacheSettings["cacheLifetime"]) ? $varnishCacheSettings["cacheLifetime"] : "604800", "excludedParams" => true === isset($varnishCacheSettings["excludedParams"]) ? implode(",", $varnishCacheSettings["excludedParams"]) : "__SID,noCache,", "excludes" => true === isset($varnishCacheSettings["excludes"]) ? implode(PHP_EOL, $varnishCacheSettings["excludes"]) : ''];
goto Cdf1a;
e101c:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto d7b01;
Cdf1a:
$settingsForm = $this->createVarnishCacheSettingsForm($site, $varnishCacheSettingsData);
goto dc8db;
B24a7:
$settingsForm->handleRequest($request);
goto c6b63;
a9570: f6d1b:
goto E455a;
abb53: fdd8e:
goto A8c2c;
E455a: Bc6fa:
goto A035f;
Cd5fb:
$response = $this->render("Frontend/Site/varnish-cache.html.twig", ["site" => $site, "settingsForm" => $settingsForm->createView(), "purgeCacheForm" => $purgeCacheForm->createView(), "formErrors" => $this->formErrors]);
goto e07a4;
Febe8:
if (!(true === $settingsForm->isSubmitted())) {
goto Bc6fa;
}
goto e1216;
d0d91: b9306:
goto Cd5fb;
Cd06a:
$site = $this->getSite($request);
goto ad964;
Ae8a3:
}
private function createVarnishCacheSettingsForm(Site $site, array $data): Form
{
goto e138e;
e138e:
$form = $this->createForm("App\Form\SiteVarnishCacheSettingsType", $data, ["action" => $this->generateUrl("clp_site_varnish_cache", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]);
goto b2873;
b2873:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]);
goto f35c0;
f35c0:
return $form;
goto d4d87;
d4d87:
}
private function createVarnishCachePurgeCacheForm(Site $site): Form
{
goto ccbf7;
d8651:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Purge Cache"]);
goto bf72c;
ccbf7:
$form = $this->createForm("App\Form\SiteVarnishCachePurgeCacheType", ["site" => $site], ["action" => $this->generateUrl("clp_site_varnish_cache", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]);
goto d8651;
bf72c:
return $form;
goto Bf282;
Bf282:
}
private function handleVarnishCacheSettingsForm(Request $request, Form $form, Site $site)
{
goto e321a;
e321a:
if (true === $form->isValid()) {
goto ecfe6;
}
goto d5466;
E426e:
try {
goto F0ad0;
a3a2e:
$siteEntity = $this->getSiteEntity($domainName);
goto Dd98a;
B2425:
EventQueue::addEvent(EventQueue::EVENT_SITE_VARNISH_CACHE_SETTINGS_UPDATE, $user, $eventData, $request);
goto A512f;
Cf9fb:
$site->setVarnishCacheSettings($varnishCacheSettings);
goto dbfda;
fb1d4:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto C0ada;
c1c92:
$cacheTagPrefix = $form->get("cacheTagPrefix")->getData();
goto E8eda;
da5b3:
$siteUpdater->phpSettings();
goto c5768;
f6c99:
$excludes = array_map("trim", array_filter(explode(PHP_EOL, trim($form->get("excludes")->getData()))));
goto F73f1;
Bc357:
$user = $this->getUser();
goto cf999;
E8eda:
$excludedParams = array_map("trim", array_filter(explode(",", trim($form->get("excludedParams")->getData()))));
goto f6c99;
A252b:
$cacheLifetime = $form->get("cacheLifetime")->getData();
goto c1c92;
E9284:
$response = $this->redirect($this->generateUrl("clp_site_varnish_cache", ["domainName" => $site->getDomainName()]));
goto fa4b5;
dbfda:
$siteUpdater = $this->getSiteUpdater($site);
goto B6c76;
fa4b5: ede1d:
goto B6d3c;
F73f1:
$varnishCacheSettings = ["enabled" => $isEnabled, "server" => $server, "cacheTagPrefix" => $cacheTagPrefix, "cacheLifetime" => $cacheLifetime, "excludes" => $excludes, "excludedParams" => $excludedParams];
goto Cf9fb;
Cff07:
$domainName = $site->getDomainName();
goto a3a2e;
B6c76:
$siteUpdater->writeVarnishCacheSettingsFile($varnishCacheSettings);
goto da5b3;
C0ada:
goto ede1d;
goto fe132;
F0ad0:
$session = $request->getSession();
goto Cff07;
c5768:
$eventData = ["site" => $domainName, "varnishCacheEnabled" => $isEnabled, "server" => $server, "cacheTagPrefix" => $cacheTagPrefix, "cacheLifetime" => $cacheLifetime, "excludes" => $excludes, "excludedParams" => $excludedParams];
goto B2425;
A512f:
$session->getFlashBag()->set("success", $this->translator->trans("Varnish Cache Settings have been saved."));
goto E9284;
Dd98a:
if (false === is_null($siteEntity)) {
goto F8bd6;
}
goto fb1d4;
B6d3c:
return $response;
goto cd571;
fe132: F8bd6:
goto Bc357;
cf999:
$isEnabled = $form->get("isEnabled")->getData();
goto Aea49;
Aea49:
$server = $form->get("server")->getData();
goto A252b;
cd571:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto B3f56;
Fc6ab:
goto a7ac6;
goto ec1d2;
B3f56: a7ac6:
goto E4ee0;
ec1d2: ecfe6:
goto E426e;
d5466:
$this->formErrors = $this->getErrorMessages($form);
goto Fc6ab;
E4ee0:
}
private function handleVarnishCachePurgeCacheForm(Request $request, Form $form, Site $site)
{
goto ddb1f;
B89cb:
$this->formErrors = $this->getErrorMessages($form);
goto dc908;
dc908:
goto C3b12;
goto b3dd2;
b3dd2: Bed3c:
goto acd18;
Ea95b: C3b12:
goto C9afe;
ddb1f:
if (true === $form->isValid()) {
goto Bed3c;
}
goto B89cb;
acd18:
try {
goto F23ca;
edf30:
$varnishCacheClient = new VarnishCacheClient();
goto B2868;
Bf518: a2e7c:
goto f565e;
Ce6d8:
$siteEntity = $this->getSiteEntity($domainName);
goto A5448;
d5f9a:
throw new \Exception("Varnish Cache Settings cannot be empty.");
goto f32ba;
A5448:
if (false === is_null($siteEntity)) {
goto a2e7c;
}
goto Fba36;
A533d:
goto Fc4fe;
goto Bf518;
bef15:
$response = $this->redirect($this->generateUrl("clp_site_varnish_cache", ["domainName" => $site->getDomainName()]));
goto bd1bc;
cff52: ff1fb:
goto a8f82;
F092b:
$purgeValues = array_map("trim", array_filter(explode(",", trim($form->get("value")->getData()))));
goto e8e8d;
b775b:
$eventData = ["site" => $domainName, "values" => implode(",", $purgeValues)];
goto Bce37;
f32ba:
goto b9004;
goto Efd81;
f565e:
$user = $this->getUser();
goto f39c8;
B2868:
$varnishCacheClient->setServer($varnishCacheSettings["server"]);
goto ccbf9;
Fd83a:
return $response;
goto F231c;
bd1bc: Fc4fe:
goto Fd83a;
F23ca:
$session = $request->getSession();
goto b7c63;
f39c8:
$varnishCacheSettings = $site->getVarnishCacheSettings();
goto F092b;
Efd81: d3674:
goto edf30;
a3011:
$session->getFlashBag()->set("success", $this->translator->trans("Varnish Cache has been purged."));
goto bef15;
a8f82: b9004:
goto b775b;
Bce37:
EventQueue::addEvent(EventQueue::EVENT_SITE_VARNISH_CACHE_PURGE, $user, $eventData, $request);
goto a3011;
ccbf9:
foreach ($purgeValues as $purgeValue) {
goto D53e1;
C9e57:
$varnishCacheClient->purgeTag($purgeValue);
goto Cc321;
D53e1:
$purgeValue = trim($purgeValue);
goto A5d16;
b17a1:
if (true === str_starts_with($purgeValue, "http")) {
goto E815f;
}
goto C9e57;
B928e: bcf56:
goto C73f3;
A5d16:
if (!(false === empty($purgeValue))) {
goto A812f;
}
goto b17a1;
F598e:
$varnishCacheClient->purgeUrl($purgeValue);
goto ff775;
e536a: E815f:
goto F598e;
ff775: f4dba:
goto f2696;
Cc321:
goto f4dba;
goto e536a;
f2696: A812f:
goto B928e;
C73f3:
}
goto cff52;
b7c63:
$domainName = $site->getDomainName();
goto Ce6d8;
e8e8d:
if (false === empty($purgeValues) && true === isset($varnishCacheSettings["server"]) && false === empty($varnishCacheSettings["server"])) {
goto d3674;
}
goto d5f9a;
Fba36:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto A533d;
F231c:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto Ea95b;
C9afe:
}
public function purgeVarnishCache(Request $request): Response
{
goto Ef874;
A29e0:
$response = $this->redirect($this->generateUrl("clp_site_varnish_cache", ["domainName" => $site->getDomainName()]));
goto d4d65;
c5bd3:
return $response;
goto b7fb1;
F4045:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto Fda37;
Fda37:
goto A050f;
goto af73a;
c69a9:
try {
goto A3b0d;
F9f37:
$varnishCacheClient = new VarnishCacheClient();
goto cd308;
d4689:
$session = $request->getSession();
goto Ce349;
a920d:
$varnishCacheClient->purgeHost($domainName);
goto Ff2d6;
f90b7:
$varnishCacheClient->purgeTag($cacheTagPrefix);
goto a920d;
e6640:
$cacheTagPrefix = $varnishCacheSettings["cacheTagPrefix"];
goto F9f37;
C25fe:
$eventData = ["site" => $domainName, "purge" => "full"];
goto F6535;
cd308:
$varnishCacheClient->setServer($varnishCacheSettings["server"]);
goto f90b7;
Ff2d6: F98fc:
goto C25fe;
E831e:
$varnishCacheSettings = $site->getVarnishCacheSettings();
goto f9ffe;
F6535:
EventQueue::addEvent(EventQueue::EVENT_SITE_VARNISH_CACHE_PURGE, $user, $eventData, $request);
goto A589d;
Ce349:
$domainName = $site->getDomainName();
goto E831e;
A589d:
$session->getFlashBag()->set("success", $this->translator->trans("Varnish Cache has been purged."));
goto A838c;
A3b0d:
$user = $this->getUser();
goto d4689;
f9ffe:
if (!(true === isset($varnishCacheSettings["server"]) && true === isset($varnishCacheSettings["cacheTagPrefix"]) && false === empty($varnishCacheSettings["cacheTagPrefix"]))) {
goto F98fc;
}
goto e6640;
A838c:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto A29e0;
da3cd:
if (false === is_null($site)) {
goto b805b;
}
goto F4045;
Ef874:
$site = $this->getSite($request);
goto da3cd;
d4d65:
return $response;
goto d86af;
af73a: b805b:
goto c69a9;
d86af: A050f:
goto c5bd3;
b7fb1:
}
public function vhost(Request $request): Response
{
goto c14e6;
E2ed2:
goto ac9ec;
goto Ffff4;
df750:
$domainName = $site->getDomainName();
goto a6b27;
a1d68:
return $response;
goto Fdeb0;
E560f:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto E2ed2;
D3fea:
if (!(false === empty($vhostTemplate))) {
goto Cd811;
}
goto df750;
dfc38:
$oldVhostTemplate = $siteEntity->getVhostTemplate();
goto a4b30;
Fc93a:
$isCsrfTokenValid = $this->isCsrfTokenValid("vhost-update", (string)$request->get("token"));
goto B8697;
b918b: F7cc3:
goto c39d2;
a6b27:
$siteEntity = $this->getSiteEntity($domainName);
goto dfc38;
Babae: Cd811:
goto b918b;
A90bf:
if (!(false === is_null($response))) {
goto bfd96;
}
goto C0d6d;
bf467:
if (false === is_null($site)) {
goto A8b7b;
}
goto E560f;
a4b30:
$site->setVhostTemplate($vhostTemplate);
goto ed160;
ed160:
$response = $this->handleVhostUpdate($request, $site, $siteEntity, $oldVhostTemplate);
goto A90bf;
c4da5: A7170:
goto e94df;
f9130: ac9ec:
goto a1d68;
c39d2:
$response = $this->render("Frontend/Site/vhost.html.twig", ["site" => $site]);
goto f9130;
Ffff4: A8b7b:
goto c0747;
B8697:
if (!(false === $isCsrfTokenValid)) {
goto A7170;
}
goto E1b56;
C0d6d:
return $response;
goto d6ce6;
c0747:
if (!(true === $request->isMethod("POST"))) {
goto F7cc3;
}
goto Fc93a;
c14e6:
$site = $this->getSite($request);
goto bf467;
e94df:
$vhostTemplate = trim($request->get("vhost-template"));
goto D3fea;
d6ce6: bfd96:
goto Babae;
E1b56:
throw new InvalidCsrfTokenException("The CSRF token is invalid.");
goto c4da5;
Fdeb0:
}
private function handleVhostUpdate(Request $request, Site $site, SiteEntity $siteEntity, string $oldVhostTemplate)
{
try {
goto Cd1ae;
D1e25:
return $response;
goto A9b48;
Bce9f:
EventQueue::addEvent(EventQueue::EVENT_SITE_VHOST_UPDATE, $user, $eventData, $request);
goto Fb747;
Cbc1c:
$siteUpdater->updateNginxVhostWithRollback();
goto d5c2b;
f61b6:
$this->siteEntityManager->updateEntity($siteEntity);
goto e87df;
B08a5:
$domainName = $site->getDomainName();
goto D1e48;
f4d49:
$eventData = ["site" => $domainName, "vhost" => $vhostTemplate, "oldVhost" => $oldVhostTemplate];
goto Bce9f;
e87df:
$session->getFlashBag()->set("success", $this->translator->trans("Vhost has been saved."));
goto f4d49;
Cd1ae:
$user = $this->getUser();
goto f4774;
Fb747:
$response = $this->redirect($this->generateUrl("clp_site_vhost", ["domainName" => $domainName]));
goto D1e25;
d5c2b:
$siteEntity->setVhostTemplate($vhostTemplate);
goto f61b6;
D1e48:
$vhostTemplate = $site->getVhostTemplate();
goto f84db;
f4774:
$session = $request->getSession();
goto B08a5;
f84db:
$siteUpdater = $this->getSiteUpdater($site);
goto Cbc1c;
A9b48:
} catch (InvalidVhostException $e) {
$session->getFlashBag()->set("danger", $this->translator->trans("Vhost is not valid, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
}
public function settings(Request $request): Response
{
goto c46d9;
A5df4:
$response = $this->render("Frontend/Site/settings.html.twig", $parameters);
goto E132a;
C9b42:
$response = $this->handleDomainSettingsForm($request, $domainSettingsForm, $site);
goto D7ec8;
D08fa:
$domainSettingsForm->handleRequest($request);
goto bb32e;
De021:
$currentNodeSettings = clone $nodejsSettings;
goto c2208;
b4930:
$parameters["reverseProxySettingsForm"] = $reverseProxySettingsForm->createView();
goto f91b5;
Bfd71: e4b17:
goto C55b4;
d8ce2:
$pythonSettingsForm->handleRequest($request);
goto abed1;
a551e:
return $response;
goto F7123;
F7135: a7fc8:
goto cc13f;
Abf7b:
return $response;
goto c6716;
fd2d4:
$siteDeleteForm->handleRequest($request);
goto B1c6f;
fce17:
$siteDeleteForm = $this->createSiteDeleteForm($site, $siteDeleteData);
goto Afa3b;
Bd372:
if (!(SiteEntity::TYPE_PHP == $site->getType())) {
goto ac30b;
}
goto Ce5ef;
ed064:
if (!(true === $siteUserSettingsForm->isSubmitted())) {
goto ae0b9;
}
goto E7f7c;
A9cb9: B4b9e:
goto Ee023;
E604b:
$pythonSettingsForm = $this->createPythonSettingsForm($site, $pythonSettings);
goto F75cf;
fb425:
if (!(false === is_null($response))) {
goto C2bc5;
}
goto Abf7b;
C55b4:
$parameters["phpSettingsForm"] = $phpSettingsForm->createView();
goto e6d7f;
C1d56: E01f5:
goto f32ef;
A8f45:
$parameters["nodejsSettingsForm"] = $nodejsSettingsForm->createView();
goto d61f5;
f91b5:
unset($parameters["pageSpeedSettingsForm"]);
goto A29af;
ae1b3: C7f27:
goto Bfd71;
C985d:
if (!(true === $request->isMethod("POST"))) {
goto ea63a;
}
goto D7a00;
f3aa9:
$reverseProxySettingsForm = $this->createReverseProxySettingsForm($site);
goto C985d;
E5287: Da19a:
goto Bd372;
a4ac2:
$response = null;
goto b5ce1;
Ee023:
$domainSettingsData = ["domainName" => $site->getDomainName(), "rootDirectory" => $site->getRootDirectory()];
goto D05bc;
D0375:
return $response;
goto b473a;
b473a: C2770:
goto B9423;
dadcc:
$currentPhpSettings = clone $phpSettings;
goto Fdd90;
D7a00:
$reverseProxySettingsForm->handleRequest($request);
goto b40dd;
Afa3b:
if (!(true === $request->isMethod("POST"))) {
goto a7fc8;
}
goto D08fa;
b4fd4:
if (!(true === $nodejsSettingsForm->isSubmitted())) {
goto a3a6e;
}
goto aa1f9;
b40dd:
if (!(true === $reverseProxySettingsForm->isSubmitted())) {
goto Ff12b;
}
goto ebe4b;
Ce5ef:
$phpSettings = $site->getPhpSettings();
goto F912c;
A601e:
$nodejsSettingsForm = $this->createNodejsSettingsForm($site, $nodejsSettings);
goto a53c1;
E3f2e:
$parameters["pythonSettingsForm"] = $pythonSettingsForm->createView();
goto Bba07;
b0604:
$pythonSettings = $site->getPythonSettings();
goto E604b;
e21a1:
if (!(true === $pageSpeedSettingsForm->isSubmitted())) {
goto a0e06;
}
goto b184a;
c46d9:
$site = $this->getSite($request);
goto b17ef;
aa1f9:
$response = $this->handleNodejsSettingsForm($request, $nodejsSettingsForm, $currentNodeSettings, $site);
goto f70d6;
afefd: Ba23f:
goto F7135;
f260d: ea63a:
goto b4930;
ad0b7:
$siteUserSettingsForm = $this->createSiteUserSettingsForm($site, $siteUserSettingsData);
goto F6e60;
Fa796:
return $response;
goto Dd6a6;
Bba07: E3925:
goto A0bf1;
C3359:
$domainSettingsForm = $this->createDomainSettingsForm($site, $domainSettingsData);
goto ad0b7;
b17ef:
if (false === is_null($site)) {
goto B4b9e;
}
goto D2b0a;
D3a5e: a0e06:
goto e29a8;
c6716: C2bc5:
goto ae1b3;
a9605:
if (!(true === $phpSettingsForm->isSubmitted())) {
goto C7f27;
}
goto F0e2a;
Fdd90:
$phpSettingsForm->handleRequest($request);
goto a9605;
ebe4b:
$response = $this->handleReverseProxySettingsForm($request, $reverseProxySettingsForm, $site);
goto c9109;
cc13f:
$parameters = ["site" => $site, "domainSettingsForm" => $domainSettingsForm->createView(), "siteUserSettingsForm" => $siteUserSettingsForm->createView(), "pageSpeedSettingsForm" => $pageSpeedSettingsForm->createView(), "siteDeleteForm" => $siteDeleteForm->createView()];
goto ab5dd;
F912c:
$phpSettingsForm = $this->createPhpSettingsForm($site, $phpSettings);
goto D48a5;
D3f0f:
if (!(false === is_null($response))) {
goto b6f4a;
}
goto Fa796;
F6e60:
$pageSpeedSettingsForm = $this->createPageSpeedSettingsForm($site, $pageSpeedSettingsData);
goto fce17;
c9109:
if (!(false === is_null($response))) {
goto cd19f;
}
goto Fe726;
D05bc:
$siteUserSettingsData = ["siteUser" => $site->getUser(), "sshKeys" => $site->getSshKeys()];
goto C79be;
D2b0a:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto e5d8b;
B1c6f:
$pageSpeedSettingsForm->handleRequest($request);
goto a4ac2;
c8805: Ff12b:
goto f260d;
E1bb0:
if (!(SiteEntity::TYPE_PYTHON == $site->getType())) {
goto E3925;
}
goto b0604;
Dd6a6: b6f4a:
goto C1d56;
D5252:
$parameters["formErrors"] = $this->formErrors;
goto A5df4;
a53c1:
if (!(true === $request->isMethod("POST"))) {
goto E1e63;
}
goto De021;
b184a:
$response = $this->handlePageSpeedSettingsForm($request, $pageSpeedSettingsForm, $site);
goto D3a5e;
c2574: E1e63:
goto A8f45;
f32ef: eabf9:
goto E3f2e;
F75cf:
if (!(true === $request->isMethod("POST"))) {
goto eabf9;
}
goto d8ce2;
f70d6:
if (!(false === is_null($response))) {
goto C2770;
}
goto D0375;
F3696: ae0b9:
goto e21a1;
abed1:
if (!(true === $pythonSettingsForm->isSubmitted())) {
goto E01f5;
}
goto e30a0;
bb32e:
$siteUserSettingsForm->handleRequest($request);
goto fd2d4;
F02de: cd19f:
goto c8805;
Fe726:
return $response;
goto F02de;
Be8c7:
$response = $this->handleSiteDeleteForm($request, $siteDeleteForm, $site);
goto B8325;
f9a1a:
$pageSpeedSettingsData = ["isEnabled" => $site->getPageSpeedEnabled(), "settings" => $site->getPageSpeedSettings()];
goto C3359;
c2208:
$nodejsSettingsForm->handleRequest($request);
goto b4fd4;
e29a8:
if (!(true === $siteDeleteForm->isSubmitted())) {
goto eb273;
}
goto Be8c7;
e5d8b:
goto f1b79;
goto A9cb9;
C79be:
$siteDeleteData = ["domainName" => $site->getDomainName()];
goto f9a1a;
E7f7c:
$response = $this->handleSiteUserSettingsForm($request, $siteUserSettingsForm, $site);
goto F3696;
F86c4:
$nodejsSettings = $site->getNodejsSettings();
goto A601e;
e9e79:
if (!(false === is_null($response))) {
goto Ba23f;
}
goto Cb01c;
E132a: f1b79:
goto a551e;
e6d7f: ac30b:
goto E1bb0;
F0e2a:
$response = $this->handlePhpSettingsForm($request, $phpSettingsForm, $currentPhpSettings, $site);
goto fb425;
d61f5:
unset($parameters["pageSpeedSettingsForm"]);
goto E5287;
b5ce1:
if (!(true === $domainSettingsForm->isSubmitted())) {
goto C38a5;
}
goto C9b42;
D7ec8: C38a5:
goto ed064;
ab5dd:
if (!(SiteEntity::TYPE_NODEJS == $site->getType())) {
goto Da19a;
}
goto F86c4;
Cb01c:
return $response;
goto afefd;
B8325: eb273:
goto e9e79;
e30a0:
$response = $this->handlePythonSettingsForm($request, $pythonSettingsForm, $site);
goto D3f0f;
A29af: D28b5:
goto D5252;
B9423: a3a6e:
goto c2574;
D48a5:
if (!(true === $request->isMethod("POST"))) {
goto e4b17;
}
goto dadcc;
A0bf1:
if (!(SiteEntity::TYPE_REVERSE_PROXY == $site->getType())) {
goto D28b5;
}
goto f3aa9;
F7123:
}
public function purgePageSpeedCache(Request $request): Response
{
goto F748b;
Dd8f5:
return $response;
goto d75e8;
A482d:
return $response;
goto E5aeb;
fa9f2:
if (false === is_null($site)) {
goto b372d;
}
goto ae168;
B26ec:
goto d9292;
goto d4d3f;
ae168:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto B26ec;
Bc81f:
$response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]));
goto Dd8f5;
d75e8: d9292:
goto A482d;
d4d3f: b372d:
goto B5750;
B5750:
try {
goto C18a2;
C18a2:
$user = $this->getUser();
goto f3f98;
B0a03:
$eventData = ["site" => $site->getDomainName()];
goto a5a35;
F7869:
$siteUpdater->purgePageSpeedCache();
goto B0a03;
Fed1d:
$siteUpdater = $this->getSiteUpdater($site);
goto F7869;
ac525:
$session->getFlashBag()->set("success", $this->translator->trans("Page Speed Cache has been purged."));
goto fe556;
f3f98:
$session = $request->getSession();
goto Fed1d;
a5a35:
EventQueue::addEvent(EventQueue::EVENT_SITE_PAGE_SPEED_CACHE_PURGE, $user, $eventData, $request);
goto ac525;
fe556:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto Bc81f;
F748b:
$site = $this->getSite($request);
goto fa9f2;
E5aeb:
}
private function createDomainSettingsForm(Site $site, array $data): Form
{
goto aa606;
b7df5:
return $form;
goto e98be;
aa606:
$form = $this->createForm("App\Form\SiteDomainSettingsType", $data, ["action" => $this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]);
goto fa2a5;
fa2a5:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]);
goto b7df5;
e98be:
}
private function createSiteUserSettingsForm(Site $site, array $data): Form
{
goto d84ff;
Dc038:
return $form;
goto A78b4;
A0283:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]);
goto Dc038;
d84ff:
$form = $this->createForm("App\Form\SiteUserSettingsType", $data, ["action" => $this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]);
goto A0283;
A78b4:
}
private function createPageSpeedSettingsForm(Site $site, array $data): Form
{
goto F45fc;
Fa72f:
return $form;
goto A656c;
a042d:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]);
goto Fa72f;
F45fc:
$form = $this->createForm("App\Form\SitePageSpeedSettingsType", $data, ["action" => $this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]);
goto a042d;
A656c:
}
private function createReverseProxySettingsForm(Site $site): Form
{
goto Bad5c;
Faa2d:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]);
goto Ffbc1;
B6a80:
$form = $this->createForm("App\Form\SiteReverseProxySettingsType", $data, ["action" => $this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => ["id" => "reverse-proxy-settings-form"]]);
goto Faa2d;
Ffbc1:
return $form;
goto bd5bb;
Bad5c:
$data = ["reverseProxyUrl" => $site->getReverseProxyUrl()];
goto B6a80;
bd5bb:
}
private function createNodejsSettingsForm(Site $site, NodejsSettings $nodejsSettings): Form
{
goto c1908;
c1908:
$form = $this->createForm("App\Form\SiteNodejsSettingsType", $nodejsSettings, ["action" => $this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => ["id" => "nodejs-settings-form"]]);
goto b97d8;
e058b:
return $form;
goto A8dbf;
b97d8:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]);
goto e058b;
A8dbf:
}
private function createPhpSettingsForm(Site $site, PhpSettings $phpSettings): Form
{
goto Af922;
Af922:
$form = $this->createForm("App\Form\SitePhpSettingsType", $phpSettings, ["action" => $this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]);
goto ca582;
Fab82:
return $form;
goto A3073;
ca582:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]);
goto Fab82;
A3073:
}
private function createPythonSettingsForm(Site $site, PythonSettings $pythonSettings): Form
{
goto ea37d;
A55de:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]);
goto Ebeaf;
Ebeaf:
return $form;
goto D2b20;
ea37d:
$form = $this->createForm("App\Form\SitePythonSettingsType", $pythonSettings, ["action" => $this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]);
goto A55de;
D2b20:
}
private function createSiteDeleteForm(Site $site, array $data): Form
{
goto E8a98;
af988:
return $form;
goto E96a3;
b27b4:
$form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg", "disabled" => "disabled"], "label" => "Delete Site"]);
goto af988;
E8a98:
$form = $this->createForm("App\Form\SiteDeleteType", $data, ["action" => $this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]);
goto b27b4;
E96a3:
}
private function handleDomainSettingsForm(Request $request, Form $form, Site $site)
{
goto F0b2b;
bac62: Ce249:
goto a2d40;
a2d40:
try {
goto Ea651;
Eb765:
$session->getFlashBag()->set("success", $this->translator->trans("Root Directory has been saved."));
goto a9d68;
d853b:
$site->setRootDirectory($rootDirectory);
goto Df22e;
D44e3:
$rootDirectory = rtrim($form->get("rootDirectory")->getData(), "/");
goto d853b;
de4c8:
$siteEntity = $this->getSiteEntity($domainName);
goto bdd2c;
C8d40:
$eventData = ["site" => $domainName, "rootDirectory" => $rootDirectory];
goto D577a;
bdd2c:
if (!(false === is_null($siteEntity))) {
goto ee64c;
}
goto D44e3;
Ea651:
$user = $this->getUser();
goto E3b35;
D577a:
EventQueue::addEvent(EventQueue::EVENT_SITE_ROOT_DIRECTORY_UPDATE, $user, $eventData, $request);
goto Eb765;
Df22e:
$siteEntity->setRootDirectory($rootDirectory);
goto f9a35;
E3b35:
$session = $request->getSession();
goto c4d98;
c4d98:
$domainName = $site->getDomainName();
goto de4c8;
f9a35:
$this->siteEntityManager->updateEntity($siteEntity);
goto D5da7;
Cb9a4:
$response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]));
goto c9626;
D5da7:
$siteUpdater = $this->getSiteUpdater($site);
goto b64bc;
a9d68: ee64c:
goto Cb9a4;
b64bc:
$siteUpdater->domainSettings();
goto C8d40;
c9626:
return $response;
goto f4c60;
f4c60:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto be68f;
F2b2b:
$this->formErrors = $this->getErrorMessages($form);
goto caba3;
be68f: ac2c5:
goto Df4fd;
caba3:
goto ac2c5;
goto bac62;
F0b2b:
if (true === $form->isValid()) {
goto Ce249;
}
goto F2b2b;
Df4fd:
}
private function handleSiteUserSettingsForm(Request $request, Form $form, Site $site)
{
goto f9500;
D9855: b61c9:
goto a1c02;
a1c02:
try {
goto f9cf4;
d8c22:
$session->getFlashBag()->set("success", $this->translator->trans("Site User Settings have been saved."));
goto F6688;
Df818: E9594:
goto aa145;
bf5e5:
if (!(false === empty($password))) {
goto E9594;
}
goto a2dab;
Dcc30:
$session = $request->getSession();
goto A5461;
A5461:
$domainName = $site->getDomainName();
goto Dce41;
F0279:
$password = trim($form->get("password")->getData());
goto f2fba;
a7c41:
if (!(false === is_null($siteEntity))) {
goto a8567;
}
goto B2763;
B2763:
$siteUser = $site->getUser();
goto fc1d1;
a4690:
EventQueue::addEvent(EventQueue::EVENT_SITE_USER_SETTINGS_UPDATE, $user, $eventData, $request);
goto d8c22;
a2dab:
$siteUpdater->changeUserPassword($siteUser, $password);
goto Df818;
a0ee2:
return $response;
goto e371f;
e4e41:
$siteUpdater->updateUserSShKeys($siteUser, $sshKeys);
goto bf5e5;
B99dc:
$this->siteEntityManager->updateEntity($siteEntity);
goto D10a6;
Dce41:
$siteEntity = $this->getSiteEntity($domainName);
goto a7c41;
F6688: a8567:
goto F1e5c;
f2fba:
$siteEntity->setSshKeys($sshKeys);
goto B99dc;
D10a6:
$siteUpdater = $this->getSiteUpdater($site);
goto e4e41;
fc1d1:
$sshKeys = trim($form->get("sshKeys")->getData());
goto F0279;
aa145:
$eventData = ["site" => $domainName, "sshKeys" => $sshKeys];
goto a4690;
F1e5c:
$response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]));
goto a0ee2;
f9cf4:
$user = $this->getUser();
goto Dcc30;
e371f:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto c0afd;
c0afd: f9026:
goto Ceff2;
efcf8:
$this->formErrors = $this->getErrorMessages($form);
goto Cb955;
Cb955:
goto f9026;
goto D9855;
f9500:
if (true === $form->isValid()) {
goto b61c9;
}
goto efcf8;
Ceff2:
}
private function handlePageSpeedSettingsForm(Request $request, Form $form, Site $site)
{
goto Ec8d7;
Ec8d7:
if (true === $form->isValid()) {
goto Deeae;
}
goto f86c1;
E4401: e7b64:
goto dafca;
d9088: Deeae:
goto dde72;
dde72:
try {
goto B8cd6;
B8cd6:
$user = $this->getUser();
goto E329f;
aeb51:
return $response;
goto fc128;
e2a6e:
$siteEntity->setPageSpeedEnabled($isEnabled);
goto f68ce;
d14d9:
if (!(false === is_null($siteEntity))) {
goto ab720;
}
goto Ef25c;
A7090:
$this->siteEntityManager->updateEntity($siteEntity);
goto A9869;
A41aa:
$siteUpdater->purgePageSpeedCache();
goto e2a6e;
f68ce:
$siteEntity->setPageSpeedSettings($settings);
goto A7090;
e941c:
$response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]));
goto aeb51;
B370f:
$settings = trim($form->get("settings")->getData());
goto D66c0;
Ef25c:
$isEnabled = $form->get("isEnabled")->getData();
goto B370f;
C0244:
$site->setPageSpeedSettings($settings);
goto d3351;
Aedba:
$domainName = $site->getDomainName();
goto D4207;
E329f:
$session = $request->getSession();
goto Aedba;
D4207:
$siteEntity = $this->getSiteEntity($domainName);
goto d14d9;
a816a:
$session->getFlashBag()->set("success", $this->translator->trans("Page Speed Settings have been saved."));
goto cd53e;
B46bb:
$siteUpdater->updateNginxVhostWithRollback();
goto A41aa;
D66c0:
$site->setPageSpeedEnabled($isEnabled);
goto C0244;
cd53e: ab720:
goto e941c;
d3351:
$siteUpdater = $this->getSiteUpdater($site);
goto B46bb;
A9869:
$eventData = ["site" => $domainName, "pageSpeedEnabled" => $isEnabled, "pageSpeedSettings" => $settings];
goto D0537;
D0537:
EventQueue::addEvent(EventQueue::EVENT_SITE_PAGE_SPEED_SETTINGS_UPDATE, $user, $eventData, $request);
goto a816a;
fc128:
} catch (InvalidVhostException $e) {
$session->getFlashBag()->set("danger", $this->translator->trans("PageSpeed Setting are not valid, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto E4401;
dd834:
goto e7b64;
goto d9088;
f86c1:
$this->formErrors = $this->getErrorMessages($form);
goto dd834;
dafca:
}
private function handleSiteDeleteForm(Request $request, Form $form, Site $site)
{
goto b46cd;
b46cd:
if (true === $form->isValid()) {
goto e62c8;
}
goto d8523;
D15e4:
goto fc8ba;
goto A9c7b;
d8523:
$this->formErrors = $this->getErrorMessages($form);
goto D15e4;
Beefe: fc8ba:
goto d8e44;
E9d67:
try {
goto f9dd2;
Db3ad:
$session->getFlashBag()->set("success", $this->translator->trans("Site has been deleted."));
goto b13ba;
ae9a9:
$siteEntity = $this->getSiteEntity($domainName);
goto f6c51;
D2050:
$siteDeleter->delete();
goto A749d;
f9dd2:
$user = $this->getUser();
goto b5305;
def96:
EventQueue::addEvent(EventQueue::EVENT_SITE_DELETE, $user, $eventData, $request);
goto Db3ad;
Ee228:
return $response;
goto F3d1e;
f6c51:
if (!(false === is_null($siteEntity))) {
goto F4152;
}
goto Fcb26;
b13ba: F4152:
goto B2e19;
B2e19:
$response = $this->redirect($this->generateUrl("clp_sites"));
goto Ee228;
Fcb26:
$siteDeleter = $this->getSiteDeleter($site);
goto D2050;
b5305:
$session = $request->getSession();
goto be66f;
e7cf4:
$eventData = ["site" => $domainName, "type" => $site->getType()];
goto def96;
A749d:
$this->siteEntityManager->deleteEntity($siteEntity);
goto e7cf4;
be66f:
$domainName = $site->getDomainName();
goto ae9a9;
F3d1e:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto Beefe;
A9c7b: e62c8:
goto E9d67;
d8e44:
}
private function handleNodejsSettingsForm(Request $request, Form $form, NodejsSettings $currentNodejsSettings, Site $site)
{
goto b4beb;
Bedbd: a4581:
goto c368e;
f0370: c426f:
goto b926d;
b4beb:
if (true === $form->isValid()) {
goto c426f;
}
goto edd2e;
edd2e:
$this->formErrors = $this->getErrorMessages($form);
goto Eddea;
b926d:
try {
goto Df1e9;
ee5ee:
$siteUpdater = $this->getSiteUpdater($site);
goto a0a3d;
D7073: fcdee:
goto A6488;
Dee47:
EventQueue::addEvent(EventQueue::EVENT_SITE_NODEJS_SETTINGS_UPDATE, $user, $eventData, $request);
goto cfc84;
b78bc:
if (!(false === is_null($siteEntity))) {
goto a84b1;
}
goto Dd5f5;
A19c9:
$siteEntity = $this->getSiteEntity($domainName);
goto b78bc;
a0a3d:
if (!(true === $hasNodejsVersionChanged)) {
goto fcdee;
}
goto Bcb6f;
Eb99f:
$session = $request->getSession();
goto Dd47d;
Dd5f5:
$nodejsSettings = $form->getData();
goto e02ed;
A6488:
$siteUpdater->nodejsSettings();
goto Caee2;
C100b: a84b1:
goto c3e4f;
Dd47d:
$domainName = $site->getDomainName();
goto A19c9;
F50f4:
$hasNodejsVersionChanged = $currentNodejsSettings->getNodejsVersion() != $nodejsVersion;
goto ee5ee;
e02ed:
$nodejsVersion = $nodejsSettings->getNodejsVersion();
goto F50f4;
e80f3:
$eventData = ["site" => $domainName, "nodejsVersion" => $nodejsVersion, "port" => $nodejsSettings->getPort()];
goto Dee47;
c3e4f:
$response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]));
goto D13cf;
Df1e9:
$user = $this->getUser();
goto Eb99f;
Bcb6f:
$siteUpdater->installNodejsVersion();
goto D7073;
D13cf:
return $response;
goto f077f;
Caee2:
$this->siteEntityManager->updateEntity($siteEntity);
goto e80f3;
cfc84:
$session->getFlashBag()->set("success", $this->translator->trans("Node.js Settings have been saved."));
goto C100b;
f077f:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto Bedbd;
Eddea:
goto a4581;
goto f0370;
c368e:
}
private function handlePythonSettingsForm(Request $request, Form $form, Site $site)
{
goto Ebe23;
Cd199:
$this->formErrors = $this->getErrorMessages($form);
goto e1f08;
b7ab1: b15a0:
goto Af8b8;
e1f08:
goto Bb1d8;
goto b7ab1;
Ebe23:
if (true === $form->isValid()) {
goto b15a0;
}
goto Cd199;
aed49: Bb1d8:
goto f5c2e;
Af8b8:
try {
goto c0b23;
d3d94:
$siteUpdater->writePythonVersionFile();
goto C8aaa;
e8260:
$domainName = $site->getDomainName();
goto ca439;
Fc97b: D1fe4:
goto d4daf;
E62ce:
return $response;
goto Ae765;
C8d5f:
if (!(false === is_null($siteEntity))) {
goto D1fe4;
}
goto D523c;
d4daf:
$response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]));
goto E62ce;
c0b23:
$user = $this->getUser();
goto Ebbd5;
Dccdc:
$pythonVersion = $pythonSettings->getPythonVersion();
goto A9946;
D523c:
$pythonSettings = $form->getData();
goto Dccdc;
C8aaa:
$siteUpdater->pythonSettings();
goto ffa4a;
a8965:
EventQueue::addEvent(EventQueue::EVENT_SITE_PYTHON_SETTINGS_UPDATE, $user, $eventData, $request);
goto Eae37;
ffa4a:
$this->siteEntityManager->updateEntity($siteEntity);
goto d9b7b;
ca439:
$siteEntity = $this->getSiteEntity($domainName);
goto C8d5f;
d9b7b:
$eventData = ["site" => $domainName, "pythonVersion" => $pythonVersion, "port" => $pythonSettings->getPort()];
goto a8965;
Eae37:
$session->getFlashBag()->set("success", $this->translator->trans("Python Settings have been saved."));
goto Fc97b;
A9946:
$siteUpdater = $this->getSiteUpdater($site);
goto d3d94;
Ebbd5:
$session = $request->getSession();
goto e8260;
Ae765:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto aed49;
f5c2e:
}
private function handleReverseProxySettingsForm(Request $request, Form $form, Site $site)
{
goto E045e;
E045e:
if (true === $form->isValid()) {
goto f02ac;
}
goto f8a6f;
b084f: dfc41:
goto c9eb5;
f8a6f:
$this->formErrors = $this->getErrorMessages($form);
goto b7395;
B5aa9:
try {
goto e8aac;
ac4a1:
$reverseProxyUrl = $form->get("reverseProxyUrl")->getData();
goto A01b9;
d6f3e:
$response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]));
goto b68de;
eb3d9:
$eventData = ["site" => $domainName, "reverseProxyUrl" => $reverseProxyUrl];
goto C04a3;
A9dcd:
$siteEntity->setReverseProxyUrl($reverseProxyUrl);
goto E3db1;
b68de:
return $response;
goto F3904;
D9779:
$session->getFlashBag()->set("success", $this->translator->trans("Reverse Proxy Settings have been saved."));
goto b10f9;
e8aac:
$user = $this->getUser();
goto ca5f2;
Be975:
$siteUpdater->updateNginxVhostWithRollback();
goto D8368;
E3db1:
$siteUpdater = $this->getSiteUpdater($site);
goto Be975;
a2f32:
if (!(false === is_null($siteEntity))) {
goto eac31;
}
goto ac4a1;
D8368:
$this->siteEntityManager->updateEntity($siteEntity);
goto eb3d9;
a04cd:
$domainName = $site->getDomainName();
goto A4366;
b10f9: eac31:
goto d6f3e;
ca5f2:
$session = $request->getSession();
goto a04cd;
C04a3:
EventQueue::addEvent(EventQueue::EVENT_SITE_REVERSE_PROXY_SETTINGS_UPDATE, $user, $eventData, $request);
goto D9779;
A4366:
$siteEntity = $this->getSiteEntity($domainName);
goto a2f32;
A01b9:
$site->setReverseProxyUrl($reverseProxyUrl);
goto A9dcd;
F3904:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto b084f;
D7637: f02ac:
goto B5aa9;
b7395:
goto dfc41;
goto D7637;
c9eb5:
}
private function handlePhpSettingsForm(Request $request, Form $form, PhpSettings $currentPhpSettings, Site $site)
{
goto ee81b;
f5e30:
$this->formErrors = $this->getErrorMessages($form);
goto f7b24;
E865d: Be1ac:
goto f0ce9;
f0ce9:
try {
goto C93a0;
a633c:
$this->siteEntityManager->updateEntity($siteEntity);
goto da01f;
Bdc58:
$siteEntity = $this->getSiteEntity($domainName);
goto b339a;
F6cfc:
if (!(true === $hasPhpVersionChanged)) {
goto Bc55a;
}
goto F563a;
Af730:
$phpSettings = $form->getData();
goto a5354;
b7c5f:
return $response;
goto Ab3f8;
da01f:
$eventData = ["site" => $domainName, "phpVersion" => $phpSettings->getPhpVersion(), "memory_limit" => $phpSettings->getMemoryLimit(), "max_execution_time" => $phpSettings->getMaxExecutionTime(), "max_input_time" => $phpSettings->getMaxInputTime(), "max_input_vars" => $phpSettings->getMaxInputVars(), "post_max_size" => $phpSettings->getPostMaxSize(), "upload_max_filesize" => $phpSettings->getUploadMaxFileSize()];
goto Bb755;
fc89a: Bc55a:
goto Bb1ea;
Bb1ea:
$siteUpdater->phpSettings();
goto a633c;
b339a:
if (!(false === is_null($siteEntity))) {
goto B5d95;
}
goto Af730;
b34eb:
$session = $request->getSession();
goto B09ca;
B09ca:
$domainName = $site->getDomainName();
goto Bdc58;
C93a0:
$user = $this->getUser();
goto b34eb;
b111d:
$response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]));
goto b7c5f;
b6507:
$siteUpdater = $this->getSiteUpdater($site);
goto F6cfc;
F563a:
$siteUpdater->changePhpVersion($currentPhpSettings->getPhpVersion(), $phpSettings->getPhpVersion());
goto fc89a;
a5354:
$hasPhpVersionChanged = $currentPhpSettings->getPhpVersion() != $phpSettings->getPhpVersion();
goto b6507;
Ff663:
$session->getFlashBag()->set("success", $this->translator->trans("PHP Settings have been saved."));
goto E7342;
Bb755:
EventQueue::addEvent(EventQueue::EVENT_SITE_PHP_SETTINGS_UPDATE, $user, $eventData, $request);
goto Ff663;
E7342: B5d95:
goto b111d;
Ab3f8:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("danger", $this->translator->trans("An error has occurred, error message: %errorMessage%", ["%errorMessage%" => $e->getMessage()]));
}
goto c5a04;
ee81b:
if (true === $form->isValid()) {
goto Be1ac;
}
goto f5e30;
f7b24:
goto cca0f;
goto E865d;
c5a04: cca0f:
goto Ba106;
Ba106:
}
private function getSite(Request $request): ?Site
{
goto f527e;
E6fc9:
$subdomain = false === empty($subdomain) ? $subdomain : null;
goto C45fd;
Ce11c: f0c48:
goto C4926;
C56e3:
$site->setRegistrableDomain($registrableDomain);
goto C77ff;
a0e4d:
$site->setBasicAuth($siteEntity->getBasicAuth());
goto c514a;
E5cf8:
return null;
goto fbd21;
C77ff:
$site->setSubdomain($subdomain);
goto e96a8;
aed19:
if (!(false === is_null($site))) {
goto E4809;
}
goto Fb6a6;
Fdb29:
$site->setUser($siteEntity->getUser());
goto ea3da;
C29ec:
$site->setSshKeys($siteEntity->getSshKeys());
goto Ebeb8;
c514a:
$site->setBlockedBots($siteEntity->getBlockedBots());
goto F85cf;
E0d66:
$site->setFtpUsers($siteEntity->getFtpUsers());
goto e57a1;
acf65:
$site->setPageSpeedSettings($siteEntity->getPageSpeedSettings());
goto c9c43;
C4926:
return $site;
goto A0a4a;
fd179:
$siteEntity = $this->getSiteEntity($domainName);
goto C67ad;
aaf24:
$site->setDatabases($siteDatabases);
goto f3f59;
ea3da:
$site->setDomainName($siteEntity->getDomainName());
goto C56e3;
C67ad:
$site = null;
goto D8899;
Bf8c9:
switch ($siteType) {
case SiteEntity::TYPE_NODEJS:
goto Bd3d0;
Bd3d0:
$site = new NodejsSite();
goto Cf351;
c79af:
goto efc81;
goto cf4a5;
Cf351:
$site->setNodejsSettings($siteEntity->getNodejsSettings());
goto c79af;
cf4a5:
case SiteEntity::TYPE_STATIC:
$site = new StaticSite();
goto efc81;
case SiteEntity::TYPE_PHP:
goto E9d6c;
E9d6c:
$site = new PhpSite();
goto fda1e;
fda1e:
$site->setPhpSettings($siteEntity->getPhpSettings());
goto ac9ae;
ac9ae:
$site->setVarnishCache($siteEntity->getVarnishCache());
goto A1115;
A1115:
goto efc81;
goto Cf538;
Cf538:
case SiteEntity::TYPE_PYTHON:
goto a3842;
a3842:
$site = new PythonSite();
goto A4dc7;
A4dc7:
$site->setPythonSettings($siteEntity->getPythonSettings());
goto A7cbd;
A7cbd:
goto efc81;
goto e4b7f;
e4b7f:
case SiteEntity::TYPE_REVERSE_PROXY:
goto cf2ff;
cf2ff:
$site = new ReverseProxySite();
goto Ae9b5;
E91e6:
goto efc81;
goto B6ed3;
Ae9b5:
$site->setReverseProxyUrl($siteEntity->getReverseProxyUrl());
goto E91e6;
B6ed3:
}
goto fe8d3;
Fb6a6:
$resolvedDomainName = $this->domainNameParser->resolveDomainName($domainName);
goto f810a;
f509d:
$siteType = $siteEntity->getType();
goto Bf8c9;
Ebeb8:
$site->setVhostTemplate($siteEntity->getVhostTemplate());
goto cb576;
cb576:
$site->setAllowTrafficFromCloudflareOnly($siteEntity->allowTrafficFromCloudflareOnly());
goto d77fc;
e96a8:
$site->setRootDirectory($siteEntity->getRootDirectory());
goto a0e4d;
d77fc:
$site->setPageSpeedEnabled($siteEntity->getPageSpeedEnabled());
goto acf65;
e6b8d:
if (!(UserEntity::ROLE_USER == $user->getRole() && false === $user->hasSite($siteEntity))) {
goto a17b5;
}
goto E5cf8;
f810a:
$registrableDomain = $resolvedDomainName->registrableDomain()->toString();
goto a9a1c;
fb336:
$site->setCronJobs($siteEntity->getCronJobs());
goto E0d66;
fbd21: a17b5:
goto f509d;
e57a1:
$site->setSshUsers($siteEntity->getSshUsers());
goto C29ec;
c7494:
$domainName = $request->get("domainName");
goto fd179;
fe8d3: Fff2d:
goto ce15d;
f3f59:
$site->setCertificate($siteEntity->getCertificate());
goto e14f0;
c9c43: E4809:
goto Ce11c;
e14f0:
$site->setCertificates($siteEntity->getCertificates());
goto fb336;
ce15d: efc81:
goto aed19;
F85cf:
$site->setBlockedIps($siteEntity->getBlockedIps());
goto aaf24;
f527e:
$user = $this->getUser();
goto c7494;
C45fd:
$siteDatabases = $this->getSiteDatabases($siteEntity);
goto Fdb29;
D8899:
if (!(false === is_null($siteEntity))) {
goto f0c48;
}
goto e6b8d;
a9a1c:
$subdomain = $resolvedDomainName->subDomain()->toString();
goto E6fc9;
A0a4a:
}
private function getSiteDatabases(SiteEntity $siteEntity): ?ArrayCollection
{
goto e8452;
e8452:
$siteDatabases = new ArrayCollection();
goto Abab6;
Abab6:
$activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto A835b;
A4546: f00f3:
goto be60c;
A835b:
$databaseEntities = $siteEntity->getDatabases();
goto B25c0;
be60c:
return $siteDatabases;
goto B904d;
B25c0:
foreach ($databaseEntities as $databaseEntity) {
goto A31bb;
C35f4:
$siteDatabases->add($databaseEntity);
goto f21af;
F3c50:
if (!($databaseServerEntity->getId() == $activeDatabaseServerEntity->getId())) {
goto Fa4b4;
}
goto C35f4;
ab439: dbf93:
goto f1220;
f21af: Fa4b4:
goto ab439;
A31bb:
$databaseServerEntity = $databaseEntity->getDatabaseServer();
goto F3c50;
f1220:
}
goto A4546;
B904d:
}
private function getSiteUpdater(Site $site): ?SiteUpdater
{
goto Dabe0;
A1540:
$siteType = $site->getType();
goto ede87;
E3d0e: c3bb8:
goto f8c99;
e88ad: C0eca:
goto E3d0e;
f8c99:
return $siteUpdater;
goto Efcae;
Dabe0:
$siteUpdater = null;
goto A1540;
ede87:
switch ($siteType) {
case SiteEntity::TYPE_NODEJS:
$siteUpdater = new NodejsSiteUpdater($site);
goto c3bb8;
case SiteEntity::TYPE_STATIC:
$siteUpdater = new StaticSiteUpdater($site);
goto c3bb8;
case SiteEntity::TYPE_PHP:
$siteUpdater = new PhpSiteUpdater($site);
goto c3bb8;
case SiteEntity::TYPE_PYTHON:
$siteUpdater = new PythonSiteUpdater($site);
goto c3bb8;
case SiteEntity::TYPE_REVERSE_PROXY:
$siteUpdater = new ReverseProxySiteUpdater($site);
goto c3bb8;
}
goto e88ad;
Efcae:
}
protected function getSiteDeleter(Site $site): ?SiteDeleter
{
goto efd85;
efd85:
$siteDeleter = null;
goto Cb6f9;
C08aa:
return $siteDeleter;
goto aee59;
C0657: a78d3:
goto C08aa;
Cb6f9:
$siteType = $site->getType();
goto Ea87f;
Ea87f:
switch ($siteType) {
case SiteEntity::TYPE_NODEJS:
$siteDeleter = new NodejsSiteDeleter($site);
goto a78d3;
case SiteEntity::TYPE_STATIC:
$siteDeleter = new StaticSiteDeleter($site);
goto a78d3;
case SiteEntity::TYPE_PHP:
$siteDeleter = new PhpSiteDeleter($site);
goto a78d3;
case SiteEntity::TYPE_PYTHON:
$siteDeleter = new PythonSiteDeleter($site);
goto a78d3;
case SiteEntity::TYPE_REVERSE_PROXY:
$siteDeleter = new ReverseProxySiteDeleter($site);
goto a78d3;
}
goto c43bc;
c43bc: a518e:
goto C0657;
aee59:
}
private function getSiteEntity(string $domainName): ?SiteEntity
{
$siteEntity = $this->siteEntityManager->findOneByDomainName($domainName);
return $siteEntity;
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace App\Controller\Frontend;
use App\Controller\Controller;
use App\Database\Manager as DatabaseManager;
use App\Entity\BasicAuth as BasicAuthEntity;
use App\Entity\BlockedBot as BlockedBotEntity;
use App\Entity\BlockedIp as BlockedIpEntity;
use App\Entity\Certificate as CertificateEntity;
use App\Entity\CronJob as CronJobEntity;
use App\Entity\Database as DatabaseEntity;
use App\Entity\DatabaseUser as DatabaseUserEntity;
use App\Entity\FtpUser as FtpUserEntity;
use App\Entity\Manager\BasicAuthManager as BasicAuthEntityManager;
use App\Entity\Manager\BlockedBotManager as BlockedBotEntityManager;
use App\Entity\Manager\BlockedIpManager as BlockedIpEntityManager;
use App\Entity\Manager\CertificateManager as CertificateEntityManager;
use App\Entity\Manager\ConfigManager;
use App\Entity\Manager\CronJobManager as CronJobEntityManager;
use App\Entity\Manager\DatabaseManager as DatabaseEntityManager;
use App\Entity\Manager\DatabaseServerManager as DatabaseServerEntityManager;
use App\Entity\Manager\DatabaseUserManager as DatabaseUserEntityManager;
use App\Entity\Manager\FtpUserManager as FtpUserEntityManager;
use App\Entity\Manager\NodejsSettingsManager as NodejsSettingsEntityManager;
use App\Entity\Manager\SiteManager as SiteEntityManager;
use App\Entity\Manager\SshUserManager as SshUserEntityManager;
use App\Entity\NodejsSettings;
use App\Entity\PhpSettings;
use App\Entity\PythonSettings;
use App\Entity\Site as SiteEntity;
use App\Entity\SshUser as SshUserEntity;
use App\Entity\User as UserEntity;
use App\Event\EventQueue;
use App\Log\LogfileReader;
use App\Log\LogsFinder;
use App\Log\Parser\NginxAccessLogParser;
use App\Log\Parser\NginxErrorLogParser;
use App\Log\Parser\PhpFpmErrorLogParser;
use App\Service\Crypto;
use App\Service\Logger;
use App\Site\Deleter as SiteDeleter;
use App\Site\Deleter\NodejsSite as NodejsSiteDeleter;
use App\Site\Deleter\PhpSite as PhpSiteDeleter;
use App\Site\Deleter\PythonSite as PythonSiteDeleter;
use App\Site\Deleter\ReverseProxySite as ReverseProxySiteDeleter;
use App\Site\Deleter\StaticSite as StaticSiteDeleter;
use App\Site\Nginx\Exception\InvalidVhostException;
use App\Site\NodejsSite;
use App\Site\Parser\DomainName as DomainNameParser;
use App\Site\PhpSite;
use App\Site\PythonSite;
use App\Site\ReverseProxySite;
use App\Site\Site;
use App\Site\Ssl\DistinguishedName;
use App\Site\Ssl\Generator\CsrGenerator;
use App\Site\Ssl\Generator\RsaKeyGenerator;
use App\Site\Ssl\LetsEncryptClient;
use App\Site\Ssl\PrivateKey;
use App\Site\StaticSite;
use App\Site\Updater as SiteUpdater;
use App\Site\Updater\NodejsSite as NodejsSiteUpdater;
use App\Site\Updater\PhpSite as PhpSiteUpdater;
use App\Site\Updater\PythonSite as PythonSiteUpdater;
use App\Site\Updater\ReverseProxySite as ReverseProxySiteUpdater;
use App\Site\Updater\StaticSite as StaticSiteUpdater;
use App\Site\VarnishCache\Client as VarnishCacheClient;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Form\Extension\Core\Type\ButtonType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Form;
use Symfony\Component\Form\FormError;
use Symfony\Component\HttpFoundation\Cookie;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException;
use Symfony\Contracts\Translation\TranslatorInterface;
use Twig\Environment as Twig;
class SitesController extends Controller
{
private const FILE_MANAGER_COOKIE_EXPIRATION = 3;
private ConfigManager $configManager;
private SiteEntityManager $siteEntityManager;
private BasicAuthEntityManager $basicAuthEntityManager;
private BlockedIpEntityManager $blockedIpEntityManager;
private BlockedBotEntityManager $blockedBotEntityManager;
private CertificateEntityManager $certificateEntityManager;
private CronJobEntityManager $cronJobEntityManager;
private DatabaseEntityManager $databaseEntityManager;
private DatabaseUserEntityManager $databaseUserEntityManager;
private DatabaseServerEntityManager $databaseServerEntityManager;
private NodejsSettingsEntityManager $nodejsSettingsEntityManager;
private FtpUserEntityManager $ftpUserEntityManager;
private SshUserEntityManager $sshUserEntityManager;
private DomainNameParser $domainNameParser;
public function __construct(ConfigManager $configManager, SiteEntityManager $siteEntityManager, BasicAuthEntityManager $basicAuthEntityManager, BlockedIpEntityManager $blockedIpEntityManager, BlockedBotEntityManager $blockedBotEntityManager, CertificateEntityManager $certificateEntityManager, CronJobEntityManager $cronJobEntityManager, DatabaseEntityManager $databaseEntityManager, DatabaseUserEntityManager $databaseUserEntityManager, DatabaseServerEntityManager $databaseServerEntityManager, NodejsSettingsEntityManager $nodejsSettingsEntityManager, FtpUserEntityManager $ftpUserEntityManager, SshUserEntityManager $sshUserEntityManager, DomainNameParser $domainNameParser, TranslatorInterface $translator, Logger $logger)
{
goto C8555;
eee42:
$this->databaseServerEntityManager = $databaseServerEntityManager;
goto Cb6d2;
ef6fc:
$this->blockedIpEntityManager = $blockedIpEntityManager;
goto d5b5d;
d5b5d:
$this->blockedBotEntityManager = $blockedBotEntityManager;
goto F7f2c;
fff03:
$this->cronJobEntityManager = $cronJobEntityManager;
goto A992f;
A992f:
$this->databaseEntityManager = $databaseEntityManager;
goto Add1c;
Add1c:
$this->databaseUserEntityManager = $databaseUserEntityManager;
goto eee42;
Cb6d2:
$this->nodejsSettingsEntityManager = $nodejsSettingsEntityManager;
goto E7ed6;
e6d38:
$this->domainNameParser = $domainNameParser;
goto D3a76;
D3a76:
parent::__construct($translator, $logger);
goto d0738;
F7f2c:
$this->certificateEntityManager = $certificateEntityManager;
goto fff03;
F3c61:
$this->siteEntityManager = $siteEntityManager;
goto b5dec;
E7ed6:
$this->ftpUserEntityManager = $ftpUserEntityManager;
goto Aa191;
C8555:
$this->configManager = $configManager;
goto F3c61;
Aa191:
$this->sshUserEntityManager = $sshUserEntityManager;
goto e6d38;
b5dec:
$this->basicAuthEntityManager = $basicAuthEntityManager;
goto ef6fc;
d0738:
}
public function index(Request $request): Response
{
goto ed904;
B95f0:
$response = $this->render("\x46\x72\157\156\164\145\x6e\144\57\x53\x69\x74\x65\x2f\151\x6e\144\145\x78\x2e\150\x74\x6d\154\x2e\164\x77\x69\147", ["\165\163\x65\x72" => $user, "\x73\151\164\x65\x73" => $sites]);
goto c02ed;
e53fb:
$sites = $this->siteEntityManager->getUserSites($user, ["\144\x6f\155\141\x69\x6e\116\141\x6d\145" => "\141\x73\143"]);
goto B95f0;
c02ed:
return $response;
goto e00aa;
ed904:
$user = $this->getUser();
goto e53fb;
e00aa:
}
public function fileManager(Request $request): Response
{
goto ce2e0;
efaa4:
$data = ["\165\163\x65\x72" => $siteUser, "\154\157\143\x61\154\x65" => $locale];
goto df58d;
dcb5d:
return $response;
goto B0687;
Aae29:
goto e2048;
goto C619a;
D341d: e2048:
goto dcb5d;
ce2e0:
$site = $this->getSite($request);
goto a613c;
df58d:
$session->set("\x63\154\x70\55\146\151\154\145\x2d\155\x61\156\x61\147\145\x72", $data);
goto cfb96;
c9816:
$response = $this->render("\x46\x72\157\x6e\x74\x65\x6e\x64\57\123\x69\x74\145\57\146\151\154\x65\x2d\155\141\x6e\x61\147\x65\x72\x2e\150\x74\155\154\56\164\x77\x69\x67", ["\x73\x69\164\x65" => $site, "\x66\151\154\x65\115\x61\x6e\x61\x67\x65\162\125\x72\x6c" => $fileManagerUrl, "\x66\x6f\x72\155\105\x72\162\157\162\163" => $this->formErrors]);
goto D341d;
F0214:
$response = $this->redirect($this->generateUrl("\143\154\160\137\x73\x69\x74\145\x73"));
goto Aae29;
B198f:
$session = $request->getSession();
goto Ad1ea;
e27f0:
$cookieExpirationDate = new \DateTime("\x6e\157\167");
goto Cdf3b;
Cdf3b:
$cookieExpirationDate->modify(sprintf("\x2b\45\x73\x20\150\157\165\x72\x73", self::FILE_MANAGER_COOKIE_EXPIRATION));
goto efaa4;
Ad1ea:
$locale = $request->getLocale();
goto e27f0;
a613c:
if (false === is_null($site)) {
goto f220f;
}
goto F0214;
e08d6:
$siteUser = $site->getUser();
goto B198f;
C619a: f220f:
goto e08d6;
cfb96:
$fileManagerUrl = sprintf("\x25\163\57\x66\151\x6c\x65\x2d\155\x61\x6e\x61\147\145\162\x2f", rtrim($request->getSchemeAndHttpHost(), "\x2f"));
goto c9816;
B0687:
}
public function view(Request $request): Response
{
goto E0261;
E0261:
$domainName = $request->get("\x64\x6f\155\x61\151\x6e\x4e\141\x6d\x65");
goto Ec5bf;
Ec5bf:
$response = $this->redirect($this->generateUrl("\143\x6c\x70\137\163\x69\164\x65\x5f\163\x65\x74\x74\x69\156\147\x73", ["\x64\157\155\x61\151\x6e\x4e\x61\x6d\x65" => $domainName]));
goto d5958;
d5958:
return $response;
goto c0228;
c0228:
}
public function logs(Request $request): Response
{
goto dbeb1;
a54e2: d919e:
goto C632c;
dbeb1:
$site = $this->getSite($request);
goto eb6c4;
C632c:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto e2486;
eb6c4:
if (false === is_null($site)) {
goto d919e;
}
goto F5b02;
a97a4:
goto E8a87;
goto a54e2;
a4a43: E8a87:
goto C4fd7;
F5b02:
$response = $this->redirect($this->generateUrl("\143\x6c\160\x5f\x73\x69\164\x65\x73"));
goto a97a4;
fba82:
$response = $this->render("\x46\x72\157\x6e\x74\145\x6e\144\57\x53\151\x74\145\57\x6c\157\x67\x73\x2e\150\164\155\154\56\164\x77\151\x67", ["\x73\x69\164\x65" => $site, "\146\157\162\155\x45\x72\x72\x6f\162\x73" => $this->formErrors, "\x66\157\162\155" => $form->createView()]);
goto a4a43;
e2486:
$form = $this->createLogsForm($siteEntity);
goto fba82;
C4fd7:
return $response;
goto c8a83;
c8a83:
}
private function createLogsForm(SiteEntity $siteEntity): Form
{
goto de9c6;
de9c6:
$form = $this->createForm("\101\160\160\134\106\157\162\x6d\x5c\x53\151\x74\x65\114\x6f\x67\163\124\x79\160\145", [], ["\x61\x63\164\x69\x6f\156" => $this->generateUrl("\x63\x6c\160\137\x73\151\164\145\137\x6c\157\x67\163", ["\x64\x6f\x6d\141\x69\x6e\116\141\155\x65" => $siteEntity->getDomainName()]), "\155\145\164\150\x6f\144" => "\120\x4f\x53\x54", "\x61\164\164\x72" => []]);
goto A3d13;
A3d13:
$form->add("\165\x70\144\x61\x74\145", ButtonType::class, ["\x61\164\164\x72" => ["\x63\x6c\141\x73\x73" => "\142\164\156\x20\142\x74\156\55\x6c\147\x20\142\164\x6e\x2d\x62\x6c\165\x65\x20\x62\164\156\x2d\x75\x70\x64\141\164\145"], "\154\x61\x62\x65\x6c" => "\125\x70\x64\141\164\x65"]);
goto Ae97e;
Ae97e:
return $form;
goto C0eb7;
C0eb7:
}
public function logFileContent(Request $request, Twig $twig): Response
{
goto ea935;
B2cb4:
$response = $this->json($data);
goto Cb814;
a30b2: Dff79:
goto B2cb4;
ea935:
$data = [];
goto ce9c9;
Af287:
try {
goto ffb69;
B9c67:
$logMessagesHtml = $twig->render("\x46\x72\x6f\x6e\164\145\x6e\x64\57\123\151\x74\145\57\114\157\147\x73\x2f\x70\150\160\x2d\x66\x70\x6d\x2d\x65\162\x72\157\162\55\x6c\x6f\147\x2d\155\x65\163\163\141\147\x65\163\x2e\x68\164\155\x6c\56\x74\x77\x69\147", ["\154\157\147\x4d\x65\163\163\141\x67\x65\163" => $logMessages]);
goto B21d5;
C81d2: d9ae0:
goto F8a66;
ed887:
if (!("\x6e\x67\151\156\170" == $service)) {
goto e20df;
}
goto aba23;
B21d5: defdc:
goto a9304;
E045b:
$user = $this->getUser();
goto ed887;
f97e9:
$phpFpmErrorLogParser = new PhpFpmErrorLogParser($logLines);
goto Dba11;
ee6d8:
$logLines = $logfileReader->getLines($numberOfLines);
goto Cac92;
a7b05:
$logMessages = $nginxErrorLogParser->parse();
goto E9103;
aba23:
$userTimezone = $user->getTimezone();
goto b40cf;
b40cf:
if ("\x61\143\x63\x65\x73\x73\56\x6c\x6f\147" == substr($logfileName, 0, 10)) {
goto d9ae0;
}
goto E036d;
F1c11:
if (!("\160\x68\160" == $service)) {
goto defdc;
}
goto f97e9;
Dba11:
$logMessages = $phpFpmErrorLogParser->parse();
goto B9c67;
f7c63:
$logMessages = $nginxAccessLogParser->parse();
goto c6f78;
a9304:
$data["\x6c\x6f\x67\115\145\163\163\x61\147\145\x73\x48\164\155\x6c"] = $logMessagesHtml;
goto b260b;
e1234:
$logfileReader = new LogfileReader($logfile);
goto ee6d8;
E036d:
$nginxErrorLogParser = new NginxErrorLogParser($logLines);
goto a7b05;
E9103:
$logMessagesHtml = $twig->render("\x46\x72\x6f\x6e\x74\145\156\144\57\123\x69\164\x65\57\x4c\x6f\147\163\x2f\x6e\x67\151\156\x78\x2d\145\162\x72\x6f\x72\x2d\154\x6f\147\55\155\x65\x73\163\x61\147\145\x73\x2e\150\x74\x6d\x6c\56\x74\167\x69\x67", ["\x6c\x6f\x67\115\145\x73\x73\x61\x67\x65\163" => $logMessages]);
goto Ecf9e;
F8a66:
$nginxAccessLogParser = new NginxAccessLogParser($logLines);
goto F45f1;
f5b27: Da37c:
goto Bd8bd;
Ecf9e:
goto Da37c;
goto C81d2;
F45f1:
$nginxAccessLogParser->setTimezone($userTimezone->getName());
goto f7c63;
ffb69:
$logfile = sprintf("\x2f\x68\157\155\145\x2f\x25\163\x2f\154\157\147\x73\57\x25\x73\57\45\163", $site->getUser(), $service, $logfileName);
goto e1234;
Bd8bd: e20df:
goto F1c11;
Cac92:
$logMessagesHtml = '';
goto E045b;
c6f78:
$logMessagesHtml = $twig->render("\106\162\x6f\156\x74\145\156\144\57\123\151\164\145\x2f\x4c\x6f\x67\x73\57\x6e\x67\151\x6e\170\x2d\x61\143\143\x65\x73\163\55\x6c\157\x67\55\x6d\x65\x73\163\x61\147\145\163\x2e\x68\x74\x6d\154\56\x74\x77\x69\x67", ["\154\157\x67\x4d\x65\163\163\141\x67\145\163" => $logMessages]);
goto f5b27;
b260b:
} catch (\Exception $e) {
$this->logger->exception($e);
}
goto Ba3c1;
ee9cb:
$service = trim($request->get("\163\x65\x72\166\x69\143\x65"));
goto c4783;
C129d:
if (!(false === is_null($site))) {
goto Dff79;
}
goto ee9cb;
c4783:
$logfileName = trim($request->get("\x6c\x6f\x67\x46\151\154\145"));
goto b375a;
ce9c9:
$site = $this->getSite($request);
goto C129d;
Cb814:
return $response;
goto ea246;
Ba3c1: d6b5b:
goto a30b2;
b375a:
$numberOfLines = (int)$request->get("\x6e\x75\155\x62\145\x72\117\146\x4c\151\156\145\163");
goto B11c9;
B11c9:
if (!(false === empty($service) && false === empty($logfileName))) {
goto d6b5b;
}
goto Af287;
ea246:
}
public function loadLogfilesForService(Request $request): Response
{
goto dff15;
caaa7:
$response = $this->json($data);
goto df3a3;
A7ac0: b02d5:
goto Ac73d;
Bcc80:
if (!(false === is_null($site))) {
goto C502d;
}
goto ae69e;
Ad8fc:
$site = $this->getSite($request);
goto Bcc80;
df3a3:
return $response;
goto Fb793;
F1fc9:
try {
goto C617d;
eee3a:
$logfiles = $logsFinder->getLogfiles();
goto add42;
e2a35: B9b23:
goto b6936;
B90ba:
$data["\x6c\157\x67\x66\151\154\x65\x73"] = $logfiles;
goto e2a35;
Ae931:
$logsFinder = new LogsFinder($logfilesDirectory);
goto eee3a;
C617d:
$logfilesDirectory = sprintf("\57\150\x6f\155\145\x2f\45\x73\57\154\157\147\163\x2f\45\163\57", $site->getUser(), $service);
goto Ae931;
add42:
if (!(false === empty($logfiles))) {
goto B9b23;
}
goto B90ba;
b6936:
} catch (\Exception $e) {
$this->logger->exception($e);
}
goto A7ac0;
ae69e:
$service = trim($request->get("\163\145\162\x76\x69\x63\145"));
goto F7a99;
Ac73d: C502d:
goto caaa7;
dff15:
$data = [];
goto Ad8fc;
F7a99:
if (!(false === empty($service))) {
goto b02d5;
}
goto F1fc9;
Fb793:
}
public function cronJobs(Request $request): Response
{
goto Ce907;
Ce907:
$site = $this->getSite($request);
goto F0a29;
E94f5:
$response = $this->render("\106\162\157\156\164\x65\156\144\57\x53\x69\x74\x65\x2f\x63\x72\157\x6e\55\152\x6f\x62\163\56\150\164\x6d\154\x2e\x74\167\x69\x67", ["\163\151\164\x65" => $site, "\146\x6f\x72\155\105\162\162\x6f\x72\163" => $this->formErrors]);
goto F7fe2;
d869a: fa68f:
goto E94f5;
E9bb2:
$response = $this->redirect($this->generateUrl("\x63\x6c\x70\137\x73\151\164\145\x73"));
goto F4908;
F7fe2: f1d0d:
goto f32a1;
f32a1:
return $response;
goto Dd58b;
F4908:
goto f1d0d;
goto d869a;
F0a29:
if (false === is_null($site)) {
goto fa68f;
}
goto E9bb2;
Dd58b:
}
public function newCronJob(Request $request): Response
{
goto F195a;
bc1ea:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto d999c;
cc5ad:
return $response;
goto bfee1;
d999c:
$cronJobEntity = $this->cronJobEntityManager->createEntity();
goto C3c38;
d43ae:
if (!(true === $request->isMethod("\x50\117\123\124"))) {
goto a4400;
}
goto B9c59;
D6819: A6a1e:
goto cc5ad;
f2aa1:
return $response;
goto a4278;
bfc0f:
if (false === is_null($site)) {
goto Af3ec;
}
goto c51ff;
F238e: Af3ec:
goto bc1ea;
d58dd:
if (!(true === $form->isSubmitted())) {
goto Ffe2d;
}
goto ae65e;
F195a:
$site = $this->getSite($request);
goto bfc0f;
E8876: a4400:
goto fb447;
Af10b:
$form = $this->createCronJobForm($cronJobEntity);
goto d43ae;
B9c59:
$form->handleRequest($request);
goto d58dd;
D48bc:
goto A6a1e;
goto F238e;
a4278: Fefd5:
goto C2679;
C3c38:
$cronJobEntity->setSite($siteEntity);
goto Af10b;
c51ff:
$response = $this->redirect($this->generateUrl("\x63\x6c\x70\x5f\x73\151\164\145\x73"));
goto D48bc;
ae65e:
$response = $this->handleCronJobForm($request, $form, $site);
goto B847a;
C2679: Ffe2d:
goto E8876;
B847a:
if (!(false === is_null($response))) {
goto Fefd5;
}
goto f2aa1;
fb447:
$response = $this->render("\x46\x72\x6f\x6e\x74\x65\x6e\x64\x2f\x53\151\x74\145\57\156\x65\167\x2d\x63\x72\157\x6e\55\152\157\x62\56\150\x74\155\x6c\56\x74\x77\151\147", ["\163\151\x74\x65" => $site, "\x66\x6f\162\x6d" => $form->createView(), "\x66\157\x72\155\x45\162\x72\x6f\x72\163" => $this->formErrors]);
goto D6819;
bfee1:
}
private function createCronJobForm(CronJobEntity $cronJobEntity): Form
{
goto d274a;
b5ac0:
return $form;
goto b4d29;
d274a:
$siteEntity = $cronJobEntity->getSite();
goto a3337;
e8bf5:
$form->add("\163\x75\142\155\151\x74", SubmitType::class, ["\141\x74\x74\x72" => ["\x63\x6c\141\163\x73" => "\142\x74\x6e\40\142\x74\x6e\x2d\142\154\165\x65\x20\142\x74\156\55\x6c\x67"], "\x6c\141\x62\145\154" => "\x41\144\144\x20\x43\162\x6f\156\x20\x4a\x6f\142"]);
goto b5ac0;
a3337:
$form = $this->createForm("\x41\x70\160\134\x46\x6f\x72\155\x5c\x53\151\x74\x65\103\x72\157\156\x4a\157\142\124\x79\160\145", $cronJobEntity, ["\x61\x63\x74\x69\157\156" => $this->generateUrl("\x63\x6c\x70\x5f\163\151\x74\x65\x5f\x63\162\157\156\137\152\157\142\137\156\145\x77", ["\x64\x6f\x6d\141\151\x6e\116\141\155\145" => $siteEntity->getDomainName()]), "\155\145\x74\150\x6f\144" => "\120\x4f\123\124", "\x61\164\164\x72" => []]);
goto e8bf5;
b4d29:
}
private function handleCronJobForm(Request $request, Form $form, Site $site)
{
goto ce104;
ce104:
if (true === $form->isValid()) {
goto Dfad4;
}
goto d7a18;
A9bd2:
goto d7db0;
goto Cfb66;
Cfb66: Dfad4:
goto afc92;
d7a18:
$this->formErrors = $this->getErrorMessages($form);
goto A9bd2;
afc92:
try {
goto b5b53;
c5c3f:
$user = $this->getUser();
goto Cf03b;
Cf03b:
$cronJobEntity = $form->getData();
goto Dced6;
f09d1:
$response = $this->redirect($this->generateUrl("\x63\x6c\x70\x5f\163\151\x74\145\x73"));
goto A91f2;
C1e12:
$site->setCronJobs($siteEntity->getCronJobs());
goto e070c;
cfcde:
if (false === is_null($siteEntity)) {
goto f4e9d;
}
goto f09d1;
D0b80: f4e9d:
goto c5c3f;
b5b53:
$session = $request->getSession();
goto f002a;
ed7cd:
$siteUpdater->updateUserCrontab();
goto b81c6;
f002a:
$domainName = $site->getDomainName();
goto ac432;
b81c6:
$eventData = ["\163\x69\x74\145" => $domainName, "\x63\162\157\x6e\x74\141\x62\x45\170\x70\x72\145\x73\x73\x69\157\156" => $cronJobEntity->getCrontabExpression()];
goto ce4f8;
ac432:
$siteEntity = $this->getSiteEntity($domainName);
goto cfcde;
A91f2:
goto Cef27;
goto D0b80;
a3499:
$response = $this->redirect($this->generateUrl("\143\x6c\160\x5f\x73\151\164\x65\137\x63\x72\157\156\x5f\x6a\x6f\142\163", ["\144\x6f\x6d\x61\x69\156\116\x61\155\x65" => $site->getDomainName()]));
goto C4c45;
Fbb0f:
return $response;
goto C49c8;
C4c45: Cef27:
goto Fbb0f;
Af994:
$siteUpdater = $this->getSiteUpdater($site);
goto ed7cd;
Dced6:
$siteEntity->addCronJob($cronJobEntity);
goto C1e12;
B06a4:
$session->getFlashBag()->set("\163\x75\x63\143\x65\x73\163", $this->translator->trans("\103\162\x6f\156\x20\x4a\157\142\40\x68\x61\163\x20\x62\145\x65\156\40\141\144\144\x65\144\56"));
goto a3499;
e070c:
$this->siteEntityManager->updateEntity($siteEntity);
goto Af994;
ce4f8:
EventQueue::addEvent(EventQueue::EVENT_SITE_CRON_JOB_ADD, $user, $eventData, $request);
goto B06a4;
C49c8:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\141\156\x67\145\x72", $this->translator->trans("\x41\156\40\145\x72\x72\157\x72\x20\150\x61\163\40\157\143\143\x75\x72\162\x65\x64\x2c\40\145\162\162\x6f\162\x20\155\x65\x73\x73\141\x67\x65\x3a\x20\45\x65\x72\x72\157\162\115\x65\163\163\141\x67\145\45", ["\45\x65\162\x72\157\x72\x4d\145\x73\x73\141\147\x65\45" => $e->getMessage()]));
}
goto a5a6b;
a5a6b: d7db0:
goto F35df;
F35df:
}
public function deleteCronJob(Request $request): Response
{
goto Fa922;
A3699:
if (!(false === is_null($site))) {
goto C5c13;
}
goto E6590;
df940:
return $response;
goto Ec1d6;
Ad5be:
$this->checkCsrfToken($request, "\143\162\x6f\156\x6a\x6f\142\x2d\144\145\154\x65\x74\x65");
goto A3699;
Edb4b:
$response = $this->redirect($this->generateUrl("\143\x6c\160\x5f\163\151\x74\x65\163"));
goto df940;
E6590:
try {
goto dd9c6;
c3983:
$cronJobEntity = $this->cronJobEntityManager->findOneById($id);
goto ccbb0;
ef667:
$this->siteEntityManager->updateEntity($siteEntity);
goto a2bb6;
e0f45:
$evenData = ["\x73\x69\x74\145" => $domainName, "\x63\x6f\155\x6d\x61\156\144" => $cronJobEntity->getCommand()];
goto Af748;
Da5af:
$siteEntity->removeCronJob($cronJobEntity);
goto fb09b;
Aa585:
$domainName = $site->getDomainName();
goto e760d;
F440d:
$cronJobSiteEntity = $cronJobEntity->getSite();
goto fae3d;
c9cc1:
$user = $this->getUser();
goto Da5af;
Af748:
EventQueue::addEvent(EventQueue::EVENT_SITE_CRON_JOB_DELETE, $user, $evenData, $request);
goto De971;
a2bb6:
$siteUpdater = $this->getSiteUpdater($site);
goto De30c;
dd9c6:
$session = $request->getSession();
goto f71ee;
De971:
$session->getFlashBag()->set("\163\165\x63\x63\145\163\x73", $this->translator->trans("\x43\162\x6f\156\40\x4a\157\142\x20\150\141\x73\x20\x62\145\145\156\40\x64\145\x6c\145\164\x65\x64\x2e"));
goto a4098;
e760d:
$siteEntity = $this->getSiteEntity($domainName);
goto c3983;
fae3d:
if (!($siteEntity->getDomainName() == $cronJobSiteEntity->getDomainName())) {
goto d5fdd;
}
goto c9cc1;
fb09b:
$site->setCronJobs($siteEntity->getCronJobs());
goto ef667;
Abbd0: D8d54:
goto b96fe;
faa94:
return $response;
goto a5a37;
a4098:
$response = $this->redirect($this->generateUrl("\143\154\160\137\163\151\x74\145\x5f\x63\x72\157\x6e\137\x6a\157\142\x73", ["\x64\x6f\x6d\141\151\156\x4e\141\155\x65" => $site->getDomainName()]));
goto faa94;
f71ee:
$id = (int)$request->get("\151\144");
goto Aa585;
ccbb0:
if (!(false === is_null($siteEntity) && false === is_null($cronJobEntity))) {
goto D8d54;
}
goto F440d;
a5a37: d5fdd:
goto Abbd0;
De30c:
$siteUpdater->updateUserCrontab();
goto e0f45;
b96fe:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\x61\156\147\145\162", $this->translator->trans("\101\156\40\x65\x72\162\x6f\x72\40\x68\x61\163\40\157\x63\x63\x75\x72\162\145\x64\x2c\x20\145\x72\x72\x6f\162\x20\x6d\x65\163\163\x61\147\145\72\40\45\x65\162\x72\157\162\x4d\x65\163\163\141\x67\145\x25", ["\x25\x65\x72\x72\x6f\162\x4d\145\x73\163\x61\147\145\45" => $e->getMessage()]));
}
goto f00f0;
f00f0: C5c13:
goto Edb4b;
Fa922:
$site = $this->getSite($request);
goto Ad5be;
Ec1d6:
}
public function editCronJob(Request $request): Response
{
goto F98ac;
ae836: bb987:
goto b54d0;
d5935: cec8c:
goto C43b9;
B4131:
$response = $this->render("\x46\162\157\x6e\x74\145\156\x64\x2f\123\x69\164\145\57\x65\144\151\x74\x2d\x63\162\x6f\156\x2d\x6a\x6f\x62\x2e\x68\x74\x6d\154\x2e\164\167\151\147", ["\163\x69\x74\145" => $site, "\146\157\x72\155" => $form->createView(), "\146\157\162\155\x45\x72\162\157\162\163" => $this->formErrors]);
goto B2ff5;
C882b:
$response = $this->redirect($this->generateUrl("\143\x6c\x70\137\x73\151\164\145\163"));
goto f5684;
cafd6:
$response = $this->handleCronJobEditForm($request, $form, $site);
goto D42bc;
f5684:
goto fc0ef;
goto d5935;
c4db9:
$cronJobEntity = $this->cronJobEntityManager->findOneById($id);
goto b7d56;
b7d56:
if (false === is_null($cronJobEntity) && false === is_null($site) && $cronJobEntity->getSite()->getDomainName() == $site->getDomainName()) {
goto cec8c;
}
goto C882b;
b54d0: Ad39b:
goto B4131;
f759f: d0826:
goto ae836;
cb290:
if (!(true === $request->isMethod("\x50\117\123\124"))) {
goto Ad39b;
}
goto A222b;
A222b:
$form->handleRequest($request);
goto E245e;
B2ff5: fc0ef:
goto b4db4;
C43b9:
$form = $this->createCronJobEditForm($cronJobEntity);
goto cb290;
F98ac:
$id = (int)$request->get("\151\144");
goto ebadf;
E245e:
if (!(true === $form->isSubmitted())) {
goto bb987;
}
goto cafd6;
b4db4:
return $response;
goto ed039;
D42bc:
if (!(false === is_null($response))) {
goto d0826;
}
goto E9b82;
E9b82:
return $response;
goto f759f;
ebadf:
$site = $this->getSite($request);
goto c4db9;
ed039:
}
private function createCronJobEditForm(CronJobEntity $cronJobEntity): Form
{
goto Fc595;
d8bf0:
return $form;
goto D8f48;
B3bb2:
$form = $this->createForm("\x41\x70\x70\x5c\106\x6f\162\155\x5c\x53\151\x74\145\103\x72\x6f\x6e\x4a\x6f\142\105\144\x69\164\124\171\x70\x65", $cronJobEntity, ["\141\143\164\x69\157\x6e" => $this->generateUrl("\143\x6c\x70\137\x73\151\x74\x65\137\x63\162\157\156\x5f\x6a\x6f\x62\x5f\145\x64\151\x74", ["\x64\157\x6d\x61\151\156\x4e\141\x6d\145" => $siteEntity->getDomainName(), "\x69\144" => $cronJobEntity->getId()]), "\x6d\x65\x74\x68\157\144" => "\120\117\123\124", "\141\x74\164\x72" => []]);
goto Aa8f1;
Aa8f1:
$form->add("\163\x75\142\x6d\151\x74", SubmitType::class, ["\141\164\x74\x72" => ["\x63\x6c\x61\x73\163" => "\142\x74\156\x20\x62\x74\x6e\55\142\x6c\x75\x65\40\142\x74\x6e\55\154\x67"], "\154\x61\142\x65\x6c" => "\x53\141\166\x65"]);
goto d8bf0;
Fc595:
$siteEntity = $cronJobEntity->getSite();
goto B3bb2;
D8f48:
}
private function handleCronJobEditForm(Request $request, Form $form, Site $site)
{
goto d9fd8;
Cc4c5:
$this->formErrors = $this->getErrorMessages($form);
goto A983b;
E4bb4: F9f81:
goto a9925;
d9fd8:
if (true === $form->isValid()) {
goto fd013;
}
goto Cc4c5;
e2a89:
try {
goto d821f;
a746c:
$this->siteEntityManager->updateEntity($siteEntity);
goto A20d8;
A336b:
$eventData = ["\x73\x69\x74\x65" => $domainName, "\143\x72\157\x6e\x74\141\142\105\170\x70\x72\145\x73\x73\151\x6f\x6e" => $cronJobEntity->getCrontabExpression()];
goto c642f;
A2a4c: C19c2:
goto Cbcc8;
A20d8:
$siteUpdater = $this->getSiteUpdater($site);
goto b71d3;
d556b:
if (false === is_null($siteEntity)) {
goto C19c2;
}
goto e3b9c;
becae:
$session->getFlashBag()->set("\163\x75\x63\x63\x65\x73\163", $this->translator->trans("\x43\162\x6f\156\x20\112\157\142\40\150\x61\x73\x20\142\145\x65\156\40\163\x61\x76\145\x64\56"));
goto Df7d1;
aea12:
$cronJobEntity = $form->getData();
goto A7cdc;
Ff489:
goto a64e3;
goto A2a4c;
A76b3:
$site->setCronJobs($siteEntity->getCronJobs());
goto a746c;
Cbcc8:
$user = $this->getUser();
goto aea12;
c642f:
EventQueue::addEvent(EventQueue::EVENT_SITE_CRON_JOB_EDIT, $user, $eventData, $request);
goto becae;
d821f:
$session = $request->getSession();
goto d42aa;
d42aa:
$domainName = $site->getDomainName();
goto b2214;
b71d3:
$siteUpdater->updateUserCrontab();
goto A336b;
b2214:
$siteEntity = $this->getSiteEntity($domainName);
goto d556b;
e3b9c:
$response = $this->redirect($this->generateUrl("\x63\x6c\160\x5f\x73\151\164\145\x73"));
goto Ff489;
Df7d1:
$response = $this->redirect($this->generateUrl("\143\x6c\x70\x5f\163\x69\164\145\x5f\143\x72\x6f\156\137\152\x6f\142\x73", ["\144\157\x6d\x61\x69\156\x4e\141\x6d\x65" => $site->getDomainName()]));
goto d0e93;
d0e93: a64e3:
goto E8345;
E8345:
return $response;
goto de7a6;
A7cdc:
$siteEntity->addCronJob($cronJobEntity);
goto A76b3;
de7a6:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\x61\156\147\145\162", $this->translator->trans("\101\156\x20\145\x72\162\157\162\40\150\141\x73\x20\157\x63\143\x75\162\162\145\x64\54\40\x65\162\x72\x6f\162\40\155\x65\x73\x73\x61\147\145\x3a\x20\45\x65\x72\x72\157\x72\115\x65\x73\163\x61\x67\145\x25", ["\45\x65\x72\x72\157\162\x4d\145\163\x73\x61\147\145\x25" => $e->getMessage()]));
}
goto E4bb4;
e1079: fd013:
goto e2a89;
A983b:
goto F9f81;
goto e1079;
a9925:
}
public function users(Request $request): Response
{
goto f9b88;
dec0e:
$response = $this->render("\x46\162\157\x6e\164\145\x6e\x64\x2f\x53\x69\x74\x65\x2f\165\163\145\x72\x73\56\x68\x74\x6d\x6c\56\164\x77\151\147", ["\x73\151\164\145" => $site, "\x66\157\162\155\105\x72\162\x6f\x72\x73" => $this->formErrors]);
goto B4d00;
d8398:
$response = $this->redirect($this->generateUrl("\143\154\x70\137\163\151\x74\x65\163"));
goto Df057;
F73cb: d2758:
goto dec0e;
e0a0b:
return $response;
goto D98f3;
B4d00: C26b0:
goto e0a0b;
Df057:
goto C26b0;
goto F73cb;
f9b88:
$site = $this->getSite($request);
goto e691c;
e691c:
if (false === is_null($site)) {
goto d2758;
}
goto d8398;
D98f3:
}
public function newFtpUser(Request $request): Response
{
goto dd466;
C0f3d:
return $response;
goto b413a;
Bfd14:
$form->handleRequest($request);
goto D2ba7;
A3ff5:
$response = $this->redirect($this->generateUrl("\x63\x6c\160\137\163\151\x74\145\163"));
goto deabf;
acae5: D585a:
goto bbb05;
ba137: B65ba:
goto C0f3d;
Ade2f:
return $response;
goto dec09;
dec09: b6b37:
goto acae5;
C7d34:
$ftpUserEntity->setSite($siteEntity);
goto Da0c2;
D9252: db49e:
goto Ce151;
Da0c2:
$form = $this->createFtpUserForm($ftpUserEntity);
goto a73f7;
E97c6:
if (!(false === is_null($response))) {
goto b6b37;
}
goto Ade2f;
D2ba7:
if (!(true === $form->isSubmitted())) {
goto D585a;
}
goto cc697;
deabf:
goto B65ba;
goto D9252;
Fb053:
$ftpUserEntity = $this->ftpUserEntityManager->createEntity();
goto C7d34;
a73f7:
if (!(true === $request->isMethod("\120\117\x53\x54"))) {
goto bd48e;
}
goto Bfd14;
Cfe19:
$response = $this->render("\106\x72\157\156\x74\145\x6e\x64\57\x53\x69\164\145\57\x6e\x65\x77\55\x66\x74\x70\x2d\x75\x73\x65\x72\x2e\150\x74\x6d\154\x2e\x74\x77\151\147", ["\x73\151\164\145" => $site, "\x66\x6f\162\x6d" => $form->createView(), "\x66\157\x72\x6d\x45\162\162\157\162\x73" => $this->formErrors]);
goto ba137;
Ce151:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto Fb053;
ad680:
if (false === is_null($site)) {
goto db49e;
}
goto A3ff5;
bbb05: bd48e:
goto Cfe19;
dd466:
$site = $this->getSite($request);
goto ad680;
cc697:
$response = $this->handleFtpUserForm($request, $form, $site);
goto E97c6;
b413a:
}
private function createFtpUserForm(FtpUserEntity $ftpUserEntity): Form
{
goto c6ce5;
A1003:
$form->add("\x73\x75\142\x6d\x69\164", SubmitType::class, ["\141\164\x74\162" => ["\x63\x6c\x61\163\163" => "\142\x74\x6e\40\142\164\156\x2d\x62\x6c\165\x65\x20\142\x74\x6e\x2d\x6c\x67"], "\154\x61\142\x65\x6c" => "\x41\144\x64\40\125\163\x65\162"]);
goto E404d;
c6ce5:
$siteEntity = $ftpUserEntity->getSite();
goto Bea49;
E404d:
return $form;
goto abd7b;
Bea49:
$form = $this->createForm("\101\x70\160\x5c\106\157\162\155\134\x53\151\164\x65\x46\164\x70\x55\163\x65\x72\x54\171\160\x65", $ftpUserEntity, ["\141\143\164\151\157\x6e" => $this->generateUrl("\143\154\160\137\x73\x69\x74\x65\x5f\x66\x74\160\x5f\x75\163\x65\162\x5f\x6e\145\167", ["\144\x6f\x6d\141\x69\x6e\x4e\141\x6d\x65" => $siteEntity->getDomainName()]), "\155\145\x74\x68\157\144" => "\x50\117\x53\x54", "\141\164\x74\162" => []]);
goto A1003;
abd7b:
}
private function handleFtpUserForm(Request $request, Form $form, Site $site)
{
goto E5cc2;
Ee5f6:
try {
goto D1378;
B0307:
$user = $this->getUser();
goto c868a;
be51d:
$ftpUserName = $ftpUserEntity->getUserName();
goto B5a50;
c2b3c: B4faf:
goto B0307;
cbbc0:
EventQueue::addEvent(EventQueue::EVENT_SITE_FTP_USER_ADD, $user, $eventData, $request);
goto a7a7d;
Bb76d:
$response = $this->redirect($this->generateUrl("\143\154\x70\137\163\x69\x74\145\137\x75\163\145\162\x73", ["\x64\157\x6d\x61\x69\156\116\141\x6d\x65" => $site->getDomainName()]));
goto ed7c2;
Ef725:
return $response;
goto Fe045;
f7aa3:
$siteEntity = $this->getSiteEntity($domainName);
goto B72c2;
D1378:
$session = $request->getSession();
goto d072f;
ee6eb:
$siteUpdater = $this->getSiteUpdater($site);
goto f767f;
Dbdf4:
goto Ae7d0;
goto c2b3c;
c18d5:
$eventData = ["\x73\151\164\x65" => $domainName, "\x75\163\x65\x72\116\141\155\x65" => $ftpUserName, "\150\157\x6d\x65\x44\x69\162\x65\x63\x74\x6f\x72\171" => $ftpUserEntity->getHomeDirectory()];
goto cbbc0;
B72c2:
if (false === is_null($siteEntity)) {
goto B4faf;
}
goto Ceea3;
Ceea3:
$response = $this->redirect($this->generateUrl("\143\154\x70\x5f\163\151\164\x65\163"));
goto Dbdf4;
f767f:
$siteUpdater->createFtpUser($ftpUserEntity);
goto c18d5;
d4deb:
$this->siteEntityManager->updateEntity($siteEntity);
goto ee6eb;
c868a:
$ftpUserEntity = $form->getData();
goto be51d;
a7a7d:
$session->getFlashBag()->set("\x73\165\x63\143\x65\x73\x73", $this->translator->trans("\125\163\145\162\40\x68\x61\163\40\x62\145\145\156\x20\141\144\x64\x65\x64\56"));
goto Bb76d;
D19bc:
$ftpUserEntity->setPassword($ftpUserPassword);
goto fb4ed;
B5a50:
$ftpUserPassword = $form->get("\x70\141\163\x73\167\157\162\144")->getData();
goto D19bc;
fb4ed:
$siteEntity->addFtpUser($ftpUserEntity);
goto d4deb;
d072f:
$domainName = $site->getDomainName();
goto f7aa3;
ed7c2: Ae7d0:
goto Ef725;
Fe045:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\x64\x61\156\x67\145\162", $this->translator->trans("\x41\x6e\x20\x65\162\162\x6f\x72\40\150\x61\163\40\157\143\x63\x75\x72\x72\x65\x64\x2c\40\145\x72\162\x6f\x72\40\x6d\145\163\163\x61\x67\145\72\40\x25\x65\162\162\x6f\x72\x4d\145\x73\x73\x61\147\145\x25", ["\x25\145\x72\162\x6f\162\115\145\163\163\141\x67\145\x25" => $e->getMessage()]));
}
goto B7eec;
C2216:
$this->formErrors = $this->getErrorMessages($form);
goto A9a0a;
a78da: F1750:
goto Ee5f6;
A9a0a:
goto Ec0c3;
goto a78da;
E5cc2:
if (true === $form->isValid()) {
goto F1750;
}
goto C2216;
B7eec: Ec0c3:
goto fc92c;
fc92c:
}
public function editFtpUser(Request $request): Response
{
goto b3ff5;
Fc9ab: c868b:
goto A7d63;
c4ed1:
$response = $this->handleFtpUserEditForm($request, $form, $site);
goto A19c0;
C93d9:
if (!(true === $request->isMethod("\x50\x4f\123\x54"))) {
goto Be471;
}
goto ece30;
E798c:
if (!(true === $form->isSubmitted())) {
goto D2db6;
}
goto c4ed1;
F060d:
$form = $this->createFtpUserEditForm($ftpUserEntity);
goto C93d9;
F6c15:
$response = $this->redirect($this->generateUrl("\x63\154\160\x5f\x73\x69\164\145\163"));
goto aa0b8;
e9eb8: Be471:
goto E4c1f;
Bc734:
$ftpUserEntity = $this->ftpUserEntityManager->findOneByUserName($userName);
goto be80e;
ece30:
$form->handleRequest($request);
goto E798c;
aa0b8:
goto B9be6;
goto D47f3;
A19c0:
if (!(false === is_null($response))) {
goto c868b;
}
goto C17c6;
E4c1f:
$response = $this->render("\106\x72\x6f\x6e\164\x65\x6e\x64\x2f\123\151\164\x65\57\x65\144\x69\x74\55\146\x74\160\x2d\x75\x73\x65\162\56\150\164\155\154\56\x74\167\x69\x67", ["\x73\x69\164\x65" => $site, "\x66\x6f\162\x6d" => $form->createView(), "\x66\157\x72\x6d\105\162\x72\x6f\162\163" => $this->formErrors]);
goto B30c6;
B30c6: B9be6:
goto de5ce;
A7d63: D2db6:
goto e9eb8;
C87d0:
$site = $this->getSite($request);
goto Bc734;
D47f3: aa212:
goto F060d;
de5ce:
return $response;
goto f360a;
C17c6:
return $response;
goto Fc9ab;
b3ff5:
$userName = $request->get("\x75\163\145\x72\116\x61\x6d\145");
goto C87d0;
be80e:
if (false === is_null($ftpUserEntity) && false === is_null($site) && $ftpUserEntity->getSite()->getDomainName() == $site->getDomainName()) {
goto aa212;
}
goto F6c15;
f360a:
}
private function createFtpUserEditForm(FtpUserEntity $ftpUserEntity): Form
{
goto d79f8;
Aa296:
$form = $this->createForm("\101\160\160\134\106\157\162\155\x5c\x53\x69\164\145\x46\164\x70\x55\x73\x65\162\105\144\151\x74\x54\171\160\x65", $ftpUserEntity, ["\141\143\x74\151\157\x6e" => $this->generateUrl("\143\154\160\137\163\151\x74\145\137\x66\x74\160\x5f\165\163\145\162\x5f\x65\x64\x69\x74", ["\x64\157\x6d\141\151\156\x4e\x61\155\145" => $siteEntity->getDomainName(), "\x75\x73\x65\162\116\141\x6d\x65" => $ftpUserEntity->getUserName()]), "\x6d\145\164\150\x6f\x64" => "\x50\117\x53\x54", "\x61\x74\x74\x72" => []]);
goto a7a13;
a7a13:
$form->add("\x73\x75\x62\x6d\x69\x74", SubmitType::class, ["\x61\x74\164\162" => ["\x63\x6c\x61\163\163" => "\142\164\156\x20\142\x74\x6e\x2d\x62\x6c\x75\145\x20\142\164\156\x2d\154\147"], "\154\x61\x62\145\154" => "\123\x61\166\x65"]);
goto a7b5b;
a7b5b:
return $form;
goto Ac2fd;
d79f8:
$siteEntity = $ftpUserEntity->getSite();
goto Aa296;
Ac2fd:
}
private function handleFtpUserEditForm(Request $request, Form $form, Site $site)
{
goto ca284;
cd37f:
try {
goto Baf37;
bd97b:
$domainName = $site->getDomainName();
goto Aa545;
faeef:
$siteUpdater = $this->getSiteUpdater($site);
goto c40b4;
Cf4a5:
$eventData = ["\163\x69\164\x65" => $domainName, "\165\163\x65\162\x4e\x61\155\145" => $ftpUserName, "\150\157\155\145\x44\x69\162\145\143\x74\x6f\x72\171" => $ftpUserHomeDirectory];
goto e8243;
D4ea7:
$response = $this->redirect($this->generateUrl("\143\154\160\x5f\x73\151\164\x65\x5f\x75\163\x65\162\163", ["\x64\x6f\x6d\141\x69\156\x4e\141\x6d\x65" => $site->getDomainName()]));
goto Eded8;
e8243:
EventQueue::addEvent(EventQueue::EVENT_SITE_FTP_USER_EDIT, $user, $eventData, $request);
goto f56ff;
F2b3b:
$siteUpdater->changeUserPassword($ftpUserName, $ftpUserPassword);
goto faa3c;
ce1aa:
if (false === is_null($siteEntity)) {
goto E6ea9;
}
goto D79ee;
c40b4:
$siteUpdater->changeUserHomeDirectory($ftpUserName, $ftpUserHomeDirectory);
goto B0dae;
D4735:
$ftpUserPassword = $form->get("\x70\x61\x73\x73\x77\157\x72\x64")->getData();
goto E019c;
E019c:
$ftpUserHomeDirectory = $ftpUserEntity->getHomeDirectory();
goto C6c81;
Baf37:
$session = $request->getSession();
goto bd97b;
Bd46c:
$ftpUserEntity = $form->getData();
goto E7d4c;
Aa545:
$siteEntity = $this->getSiteEntity($domainName);
goto ce1aa;
Eca39:
$user = $this->getUser();
goto Bd46c;
f249f:
goto c0c49;
goto f9e32;
B0dae:
if (!(false === empty($ftpUserPassword))) {
goto Bb31d;
}
goto F2b3b;
D79ee:
$response = $this->redirect($this->generateUrl("\143\154\x70\x5f\x73\x69\x74\x65\163"));
goto f249f;
a7a52:
return $response;
goto C53e8;
E7d4c:
$ftpUserName = $ftpUserEntity->getUserName();
goto D4735;
f56ff:
$session->getFlashBag()->set("\163\165\x63\x63\x65\163\x73", $this->translator->trans("\125\163\145\162\x20\150\x61\163\x20\x62\x65\x65\156\40\163\141\166\x65\x64\56"));
goto D4ea7;
C6c81:
$this->siteEntityManager->updateEntity($siteEntity);
goto faeef;
faa3c: Bb31d:
goto Cf4a5;
Eded8: c0c49:
goto a7a52;
f9e32: E6ea9:
goto Eca39;
C53e8:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\x64\x61\x6e\x67\x65\x72", $this->translator->trans("\101\x6e\40\145\x72\162\157\162\x20\150\x61\x73\40\x6f\x63\143\165\162\x72\145\x64\x2c\40\x65\x72\162\x6f\162\x20\x6d\145\x73\163\141\x67\x65\x3a\40\45\145\162\162\x6f\x72\115\x65\163\163\141\147\x65\45", ["\x25\145\x72\x72\x6f\x72\x4d\x65\x73\163\141\x67\145\x25" => $e->getMessage()]));
}
goto Ca58f;
Ca58f: A3c6f:
goto f8171;
e46b0:
$this->formErrors = $this->getErrorMessages($form);
goto f02cf;
f02cf:
goto A3c6f;
goto bfefc;
ca284:
if (true === $form->isValid()) {
goto Bd734;
}
goto e46b0;
bfefc: Bd734:
goto cd37f;
f8171:
}
public function deleteFtpUser(Request $request): Response
{
goto d414e;
bbb7f:
try {
goto D2d0c;
Db694:
EventQueue::addEvent(EventQueue::EVENT_SITE_FTP_USER_DELETE, $user, $evenData, $request);
goto F0af7;
c5850:
$this->siteEntityManager->updateEntity($siteEntity);
goto D1da1;
D2d0c:
$session = $request->getSession();
goto c24eb;
be823: D2bce:
goto e59fa;
D1da1:
$siteUpdater = $this->getSiteUpdater($site);
goto d40ac;
B3598: feabc:
goto be823;
d1dfb:
$userName = $ftpUserEntity->getUserName();
goto Eb803;
f3f12:
$evenData = ["\163\151\x74\145" => $domainName, "\x75\163\x65\162\116\x61\x6d\145" => $userName];
goto Db694;
c24eb:
$userName = $request->get("\165\x73\145\x72\x4e\x61\155\x65");
goto e7376;
e4990:
$siteEntity = $this->getSiteEntity($domainName);
goto dc874;
F0af7:
$session->getFlashBag()->set("\x73\x75\x63\143\x65\163\163", $this->translator->trans("\x55\163\145\162\x20\x68\x61\x73\40\x62\145\145\x6e\x20\x64\145\x6c\x65\164\145\144\56"));
goto eabdf;
e7376:
$domainName = $site->getDomainName();
goto e4990;
Eec6c:
if (!($siteEntity->getDomainName() == $ftpUserSiteEntity->getDomainName())) {
goto feabc;
}
goto Edd5b;
f3d9f:
$ftpUserSiteEntity = $ftpUserEntity->getSite();
goto Eec6c;
eabdf:
$response = $this->redirect($this->generateUrl("\143\154\160\x5f\x73\151\164\x65\137\165\163\x65\x72\163", ["\144\x6f\x6d\141\151\156\116\141\155\145" => $site->getDomainName()]));
goto ec358;
d40ac:
$siteUpdater->deleteUser($userName, false);
goto f3f12;
Eb803:
$siteEntity->removeFtpUser($ftpUserEntity);
goto c5850;
Edd5b:
$user = $this->getUser();
goto d1dfb;
B3472:
if (!(false === is_null($siteEntity) && false === empty($userName) && false === is_null($ftpUserEntity))) {
goto D2bce;
}
goto f3d9f;
ec358:
return $response;
goto B3598;
dc874:
$ftpUserEntity = $this->ftpUserEntityManager->findOneByUserName($userName);
goto B3472;
e59fa:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\141\156\x67\145\162", $this->translator->trans("\101\x6e\x20\145\162\x72\157\162\x20\150\x61\x73\x20\x6f\143\x63\165\162\x72\145\x64\54\x20\145\162\162\157\x72\x20\155\x65\x73\x73\141\147\145\x3a\x20\x25\145\162\162\x6f\x72\x4d\145\x73\163\141\x67\145\x25", ["\45\x65\x72\x72\x6f\162\115\x65\163\x73\x61\147\145\x25" => $e->getMessage()]));
}
goto a215a;
E06d7:
return $response;
goto d9267;
d414e:
$site = $this->getSite($request);
goto ba9cc;
c8832:
$response = $this->redirect($this->generateUrl("\143\x6c\160\137\x73\x69\164\x65\x73"));
goto E06d7;
a215a: Afbdc:
goto c8832;
C58ca:
if (!(false === is_null($site))) {
goto Afbdc;
}
goto bbb7f;
ba9cc:
$this->checkCsrfToken($request, "\165\x73\x65\x72\55\144\x65\154\x65\x74\145");
goto C58ca;
d9267:
}
public function newSshUser(Request $request): Response
{
goto a4fbd;
d28ac:
$response = $this->render("\106\162\157\x6e\164\145\x6e\x64\x2f\123\x69\164\x65\57\x6e\145\x77\55\163\163\x68\x2d\165\x73\145\x72\56\150\164\155\x6c\x2e\164\167\151\x67", ["\x73\x69\x74\145" => $site, "\146\x6f\162\x6d" => $form->createView(), "\146\157\162\155\x45\x72\x72\x6f\162\x73" => $this->formErrors]);
goto c9827;
B3470: D7291:
goto ecb19;
Dac0c:
goto Fd0ec;
goto D7305;
fd64f:
if (false === is_null($site)) {
goto E3408;
}
goto db7a6;
db7a6:
$response = $this->redirect($this->generateUrl("\143\154\160\x5f\163\x69\x74\x65\x73"));
goto Dac0c;
Fbb6a:
return $response;
goto Adbff;
D7305: E3408:
goto Dd854;
E1397:
$sshUserEntity = $this->sshUserEntityManager->createEntity();
goto ac07b;
a4fbd:
$site = $this->getSite($request);
goto fd64f;
A527b:
$form->handleRequest($request);
goto F3f75;
a8c1b:
return $response;
goto B2944;
ecb19: c9ed0:
goto d28ac;
b4b40:
$form = $this->createSshUserForm($sshUserEntity);
goto e420d;
e420d:
if (!(true === $request->isMethod("\x50\117\123\x54"))) {
goto c9ed0;
}
goto A527b;
d21e0:
if (!(false === is_null($response))) {
goto E6269;
}
goto a8c1b;
E991a:
$response = $this->handleSshUserForm($request, $form, $site);
goto d21e0;
c9827: Fd0ec:
goto Fbb6a;
B2944: E6269:
goto B3470;
F3f75:
if (!(true === $form->isSubmitted())) {
goto D7291;
}
goto E991a;
Dd854:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto E1397;
ac07b:
$sshUserEntity->setSite($siteEntity);
goto b4b40;
Adbff:
}
private function createSshUserForm(SshUserEntity $sshUserEntity): Form
{
goto Bdca3;
fcb05:
$form = $this->createForm("\x41\160\160\134\x46\157\162\x6d\134\123\x69\164\x65\x53\163\150\125\x73\x65\162\x54\x79\x70\x65", $sshUserEntity, ["\141\143\164\x69\157\x6e" => $this->generateUrl("\x63\154\x70\137\163\151\164\145\x5f\x73\x73\x68\x5f\x75\163\145\x72\x5f\x6e\145\167", ["\x64\157\x6d\141\x69\156\x4e\x61\155\145" => $siteEntity->getDomainName()]), "\155\x65\x74\150\157\144" => "\120\x4f\123\x54", "\x61\x74\x74\x72" => []]);
goto cba61;
Bdca3:
$siteEntity = $sshUserEntity->getSite();
goto fcb05;
c26b1:
return $form;
goto F5d24;
cba61:
$form->add("\163\x75\x62\155\x69\164", SubmitType::class, ["\141\164\164\x72" => ["\143\x6c\141\x73\x73" => "\x62\164\x6e\x20\x62\x74\156\x2d\x62\x6c\165\x65\40\142\164\156\55\154\147"], "\x6c\141\x62\145\154" => "\x41\x64\144\x20\125\x73\145\162"]);
goto c26b1;
F5d24:
}
private function handleSshUserForm(Request $request, Form $form, Site $site)
{
goto F20f4;
cf522:
$this->formErrors = $this->getErrorMessages($form);
goto F0b14;
Fd679:
try {
goto ba9e8;
C72fc:
$sshUserEntity->setPassword($sshUserPassword);
goto a5b58;
bea87:
goto F475c;
goto Cc03c;
a1db1:
$this->siteEntityManager->updateEntity($siteEntity);
goto F9193;
F7f15:
$siteUpdater->updateUserSShKeys($sshUserName, $sshKeys);
goto C7a43;
e2d4c:
if (false === is_null($siteEntity)) {
goto ba69f;
}
goto fecd3;
C8c84: F475c:
goto A78cd;
A78cd:
return $response;
goto f501d;
B2f22:
$siteUpdater->createSshUser($sshUserEntity);
goto Fa5ec;
D7a34:
$response = $this->redirect($this->generateUrl("\x63\x6c\160\137\163\x69\164\145\137\x75\163\145\162\163", ["\144\157\x6d\141\151\x6e\x4e\x61\155\145" => $site->getDomainName()]));
goto C8c84;
Fa5ec:
if (!(false === empty($sshKeys))) {
goto d97c8;
}
goto F7f15;
D5fbe:
$siteEntity->addSshUser($sshUserEntity);
goto a1db1;
F9193:
$siteUpdater = $this->getSiteUpdater($site);
goto B2f22;
F2ee7:
$siteEntity = $this->getSiteEntity($domainName);
goto e2d4c;
a5b58:
$sshKeys = $sshUserEntity->getSshKeys();
goto D5fbe;
ba9e8:
$session = $request->getSession();
goto Ca971;
Cc03c: ba69f:
goto f7102;
C88ed:
$sshUserEntity = $form->getData();
goto afa1f;
C7a43: d97c8:
goto C56d0;
f7102:
$user = $this->getUser();
goto C88ed;
e0354:
EventQueue::addEvent(EventQueue::EVENT_SITE_SSH_USER_ADD, $user, $eventData, $request);
goto Ed802;
afa1f:
$sshUserName = $sshUserEntity->getUserName();
goto fd011;
Ed802:
$session->getFlashBag()->set("\163\x75\x63\x63\x65\163\163", $this->translator->trans("\125\163\145\x72\40\150\x61\x73\40\x62\x65\145\x6e\x20\141\144\x64\145\x64\56"));
goto D7a34;
fd011:
$sshUserPassword = $form->get("\160\141\x73\163\167\157\x72\144")->getData();
goto C72fc;
fecd3:
$response = $this->redirect($this->generateUrl("\143\x6c\160\x5f\x73\x69\x74\x65\163"));
goto bea87;
Ca971:
$domainName = $site->getDomainName();
goto F2ee7;
C56d0:
$eventData = ["\x73\x69\x74\145" => $domainName, "\x75\163\x65\x72\x4e\141\155\x65" => $sshUserName, "\163\163\x68\x4b\x65\x79\163" => $sshKeys];
goto e0354;
f501d:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\x64\141\156\x67\145\x72", $this->translator->trans("\101\156\40\x65\162\162\157\162\40\x68\x61\163\x20\157\143\x63\165\x72\162\145\144\54\x20\145\162\x72\x6f\x72\40\155\x65\163\163\x61\147\x65\72\x20\x25\145\162\162\157\x72\x4d\145\163\163\x61\147\x65\45", ["\x25\145\162\162\157\162\115\145\x73\163\141\x67\145\45" => $e->getMessage()]));
}
goto C07fd;
C07fd: D9ef7:
goto Eee3e;
edfba: Ea783:
goto Fd679;
F0b14:
goto D9ef7;
goto edfba;
F20f4:
if (true === $form->isValid()) {
goto Ea783;
}
goto cf522;
Eee3e:
}
public function editSshUser(Request $request): Response
{
goto B4aaa;
e4c80:
$sshUserEntity = $this->sshUserEntityManager->findOneByUserName($userName);
goto Ad323;
C86d5:
if (!(false === is_null($response))) {
goto Fc300;
}
goto ca771;
D519c: a946c:
goto Bd327;
D5873:
goto f997f;
goto d3139;
c5229:
$site = $this->getSite($request);
goto e4c80;
ccac5: Fc300:
goto A1cc2;
b75ec:
$response = $this->redirect($this->generateUrl("\x63\154\160\x5f\x73\x69\164\145\x73"));
goto D5873;
A1cc2: c73cf:
goto D519c;
ca771:
return $response;
goto ccac5;
eec4c:
$response = $this->handleSshUserEditForm($request, $form, $site);
goto C86d5;
B5c1b:
if (!(true === $form->isSubmitted())) {
goto c73cf;
}
goto eec4c;
d3139: a3b0c:
goto C6b42;
B4aaa:
$userName = $request->get("\x75\x73\x65\162\116\x61\x6d\145");
goto c5229;
C6b42:
$form = $this->createSshUserEditForm($sshUserEntity);
goto f939d;
ee4e1:
return $response;
goto C0de7;
f939d:
if (!(true === $request->isMethod("\x50\117\x53\124"))) {
goto a946c;
}
goto fa14f;
fa14f:
$form->handleRequest($request);
goto B5c1b;
f08e5: f997f:
goto ee4e1;
Ad323:
if (false === is_null($sshUserEntity) && false === is_null($site) && $sshUserEntity->getSite()->getDomainName() == $site->getDomainName()) {
goto a3b0c;
}
goto b75ec;
Bd327:
$response = $this->render("\106\x72\157\x6e\164\145\x6e\x64\x2f\123\x69\164\145\57\145\x64\x69\164\x2d\163\163\x68\55\165\x73\x65\162\x2e\x68\164\x6d\154\56\164\x77\151\x67", ["\x73\x69\x74\x65" => $site, "\146\157\x72\155" => $form->createView(), "\x66\x6f\x72\155\x45\162\162\157\x72\163" => $this->formErrors]);
goto f08e5;
C0de7:
}
private function createSshUserEditForm(SshUserEntity $sshUserEntity): Form
{
goto Be857;
ebe43:
$form = $this->createForm("\101\160\160\x5c\106\x6f\162\155\x5c\123\151\x74\145\x53\163\x68\x55\163\145\162\x45\144\x69\x74\124\171\160\145", $sshUserEntity, ["\x61\143\x74\151\157\x6e" => $this->generateUrl("\143\154\x70\137\x73\x69\164\145\x5f\x73\x73\150\x5f\165\x73\145\x72\x5f\x65\x64\151\164", ["\144\x6f\155\141\x69\x6e\x4e\x61\155\x65" => $siteEntity->getDomainName(), "\165\x73\x65\162\116\141\x6d\145" => $sshUserEntity->getUserName()]), "\x6d\145\x74\150\157\144" => "\x50\x4f\x53\124", "\x61\x74\164\162" => []]);
goto b684b;
Be857:
$siteEntity = $sshUserEntity->getSite();
goto ebe43;
dac2e:
return $form;
goto F7b24;
b684b:
$form->add("\x73\165\142\x6d\151\x74", SubmitType::class, ["\141\164\x74\x72" => ["\143\x6c\141\163\x73" => "\142\x74\x6e\40\x62\164\156\x2d\142\154\165\x65\40\x62\x74\x6e\55\x6c\x67"], "\154\141\142\x65\154" => "\x53\141\x76\145"]);
goto dac2e;
F7b24:
}
private function handleSshUserEditForm(Request $request, Form $form, Site $site)
{
goto e2d42;
e2d42:
if (true === $form->isValid()) {
goto a6c90;
}
goto A1848;
A1848:
$this->formErrors = $this->getErrorMessages($form);
goto defb7;
d3efc:
try {
goto ae009;
cbdda:
$sshUserPassword = $form->get("\160\141\163\163\x77\157\x72\144")->getData();
goto e1600;
c9bfc:
goto B506e;
goto A027f;
Ba9b0:
$sshUserName = $sshUserEntity->getUserName();
goto cbdda;
ae009:
$session = $request->getSession();
goto E23b2;
cf3a7:
$response = $this->redirect($this->generateUrl("\x63\154\160\137\163\151\164\145\x73"));
goto c9bfc;
e1600:
$sshKeys = false === is_null($sshUserEntity->getSshKeys()) ? $sshUserEntity->getSshKeys() : '';
goto ab8d5;
fb72b: B506e:
goto Cc6d2;
A027f: Afa11:
goto A5c3e;
C90e7:
$response = $this->redirect($this->generateUrl("\x63\154\x70\137\x73\x69\x74\145\x5f\165\x73\145\162\x73", ["\144\x6f\x6d\x61\x69\x6e\116\x61\155\145" => $site->getDomainName()]));
goto fb72b;
ab8d5:
$this->siteEntityManager->updateEntity($siteEntity);
goto Baee9;
A5c3e:
$user = $this->getUser();
goto cd2c2;
Fc2df:
$session->getFlashBag()->set("\163\x75\143\x63\x65\x73\163", $this->translator->trans("\125\x73\x65\162\40\x68\141\x73\x20\142\x65\x65\x6e\x20\x73\x61\x76\145\144\x2e"));
goto C90e7;
B649f:
EventQueue::addEvent(EventQueue::EVENT_SITE_SSH_USER_EDIT, $user, $eventData, $request);
goto Fc2df;
E23b2:
$domainName = $site->getDomainName();
goto a3370;
B6b86:
$siteUpdater->updateUserSShKeys($sshUserName, $sshKeys);
goto E2b40;
c3fd7:
if (!(false === empty($sshUserPassword))) {
goto E6c61;
}
goto C0ac7;
C0ac7:
$siteUpdater->changeUserPassword($sshUserName, $sshUserPassword);
goto bfd29;
E2b40:
$eventData = ["\x73\151\x74\145" => $domainName, "\x75\x73\145\162\x4e\141\155\x65" => $sshUserName, "\163\163\x68\113\145\171\x73" => $sshKeys];
goto B649f;
Cc6d2:
return $response;
goto Befbd;
a6f1e:
if (false === is_null($siteEntity)) {
goto Afa11;
}
goto cf3a7;
cd2c2:
$sshUserEntity = $form->getData();
goto Ba9b0;
a3370:
$siteEntity = $this->getSiteEntity($domainName);
goto a6f1e;
bfd29: E6c61:
goto B6b86;
Baee9:
$siteUpdater = $this->getSiteUpdater($site);
goto c3fd7;
Befbd:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\141\156\x67\x65\162", $this->translator->trans("\101\156\40\145\x72\162\157\x72\40\150\x61\163\40\157\143\143\x75\162\x72\x65\x64\54\x20\145\x72\162\157\x72\40\x6d\145\x73\x73\141\x67\x65\72\40\45\145\162\162\157\162\x4d\145\163\x73\141\x67\x65\x25", ["\45\145\x72\x72\x6f\x72\x4d\x65\x73\163\x61\147\145\x25" => $e->getMessage()]));
}
goto Bc72f;
db4cd: a6c90:
goto d3efc;
defb7:
goto e5b7f;
goto db4cd;
Bc72f: e5b7f:
goto eebc9;
eebc9:
}
public function deleteSshUser(Request $request): Response
{
goto bcc11;
d756e:
if (!(false === is_null($site))) {
goto Cb939;
}
goto f6a14;
bdffc:
$this->checkCsrfToken($request, "\165\x73\145\x72\x2d\x64\145\x6c\x65\164\x65");
goto d756e;
f6a14:
try {
goto E27c4;
E27c4:
$session = $request->getSession();
goto B95ab;
F30f1:
return $response;
goto b5da7;
febef:
$sshUserSiteEntity = $sshUserEntity->getSite();
goto d7f3b;
Ebf47:
$domainName = $site->getDomainName();
goto Bfd39;
b1631:
EventQueue::addEvent(EventQueue::EVENT_SITE_SSH_USER_DELETE, $user, $evenData, $request);
goto D1277;
fb4f9:
$user = $this->getUser();
goto bd53e;
C9c8c:
$siteEntity->removeSshUser($sshUserEntity);
goto e2877;
abd0c:
$evenData = ["\163\x69\164\145" => $domainName, "\x75\x73\x65\162\x4e\141\155\145" => $userName];
goto b1631;
F665a:
$response = $this->redirect($this->generateUrl("\143\154\160\137\163\x69\164\145\x5f\x75\163\145\x72\163", ["\x64\157\155\141\151\x6e\x4e\x61\155\145" => $site->getDomainName()]));
goto F30f1;
a7d71: f8eab:
goto d869d;
D1277:
$session->getFlashBag()->set("\163\165\143\143\x65\163\x73", $this->translator->trans("\125\163\x65\162\x20\150\x61\163\40\142\x65\x65\x6e\40\144\x65\x6c\145\x74\x65\144\x2e"));
goto F665a;
bd53e:
$userName = $sshUserEntity->getUserName();
goto C9c8c;
A0910:
$siteUpdater = $this->getSiteUpdater($site);
goto B6049;
b5da7: F9670:
goto a7d71;
B6049:
$siteUpdater->deleteUser($userName, true);
goto abd0c;
B95ab:
$userName = $request->get("\165\163\x65\x72\116\x61\155\145");
goto Ebf47;
E34c3:
$sshUserEntity = $this->sshUserEntityManager->findOneByUserName($userName);
goto Ff1ab;
Bfd39:
$siteEntity = $this->getSiteEntity($domainName);
goto E34c3;
d7f3b:
if (!($siteEntity->getDomainName() == $sshUserSiteEntity->getDomainName())) {
goto F9670;
}
goto fb4f9;
Ff1ab:
if (!(false === is_null($siteEntity) && false === empty($userName) && false === is_null($sshUserEntity))) {
goto f8eab;
}
goto febef;
e2877:
$this->siteEntityManager->updateEntity($siteEntity);
goto A0910;
d869d:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\x64\x61\156\147\145\162", $this->translator->trans("\101\156\x20\x65\162\162\157\x72\40\150\x61\x73\40\157\143\143\x75\x72\x72\145\x64\x2c\40\x65\x72\162\157\162\x20\x6d\x65\x73\163\x61\x67\x65\72\40\45\145\162\x72\157\162\115\x65\163\163\141\147\x65\45", ["\x25\x65\162\162\157\x72\x4d\145\x73\163\x61\147\x65\45" => $e->getMessage()]));
}
goto db511;
d1722:
$response = $this->redirect($this->generateUrl("\143\x6c\160\137\x73\151\164\x65\x73"));
goto f4d90;
db511: Cb939:
goto d1722;
bcc11:
$site = $this->getSite($request);
goto bdffc;
f4d90:
return $response;
goto d6b53;
d6b53:
}
public function security(Request $request): Response
{
goto f1f0a;
dcac3:
$basicAuthForm = $this->createBasicAuthForm($basicAuthEntity);
goto d1957;
b95e0:
return $response;
goto a139c;
A5523:
$response = $this->handleCloudflareForm($request, $cloudflareForm, $site);
goto A6de3;
E94a4:
$response = $this->render("\106\162\x6f\156\x74\145\x6e\144\57\x53\151\x74\145\x2f\163\x65\x63\165\x72\x69\x74\x79\56\150\x74\155\154\56\164\x77\151\147", ["\x73\x69\x74\x65" => $site, "\142\x6c\157\x63\x6b\145\144\x49\160\163" => $blockedIps, "\142\x6c\x6f\x63\153\145\144\x42\x6f\x74\163" => $blockedBots, "\x62\141\x73\x69\143\101\x75\164\x68\x46\x6f\x72\x6d" => $basicAuthForm->createView(), "\143\x6c\x6f\165\144\146\x6c\141\162\145\x46\157\x72\155" => $cloudflareForm->createView(), "\146\x6f\162\155\105\162\x72\157\162\x73" => $this->formErrors]);
goto be257;
Cbd2e: ba1a8:
goto efe40;
fc078:
if (!(false === is_null($response))) {
goto f02e6;
}
goto A2343;
E849b:
goto d4d46;
goto A5f87;
efe40:
if (!(true === $cloudflareForm->isSubmitted())) {
goto ac486;
}
goto A5523;
A5f87: a2b98:
goto f6e29;
ae675:
$response = $this->handleBasicAuthForm($request, $basicAuthForm, $site);
goto fc078;
B41c5:
if (!(true === $request->isMethod("\120\117\123\124"))) {
goto Dd450;
}
goto e2a34;
A6de3:
if (!(false === is_null($response))) {
goto ccc0d;
}
goto b95e0;
A23c1:
$cloudflareForm->handleRequest($request);
goto Bbfb1;
d1957:
$cloudflareForm = $this->createCloudflareForm($siteEntity, $cloudflareData);
goto B41c5;
a29f9:
$cloudflareData = ["\x61\154\154\x6f\x77\124\x72\x61\146\146\151\143\106\162\157\155\103\154\157\x75\144\x66\x6c\x61\x72\145\x4f\x6e\x6c\x79" => $siteEntity->allowTrafficFromCloudflareOnly()];
goto e271b;
e2a34:
$basicAuthForm->handleRequest($request);
goto A23c1;
Ecb45: f02e6:
goto Cbd2e;
be257: d4d46:
goto f7d84;
B96ef:
$blockedIps = $site->getBlockedIps();
goto d3892;
bc3f7:
if (false === is_null($site)) {
goto a2b98;
}
goto C0c7a;
D222e:
if (!(true === is_null($basicAuthEntity))) {
goto cd73d;
}
goto C9d8a;
a139c: ccc0d:
goto a5dbf;
f7d84:
return $response;
goto c626c;
d3892:
$basicAuthEntity = $site->getBasicAuth();
goto D222e;
A2343:
return $response;
goto Ecb45;
d475b: Dd450:
goto E94a4;
c02c2: cd73d:
goto cd0c9;
cd0c9:
$basicAuthEntity->setSite($siteEntity);
goto dcac3;
e271b:
$blockedBots = $site->getBlockedBots();
goto B96ef;
C9d8a:
$basicAuthEntity = $this->basicAuthEntityManager->createEntity();
goto c02c2;
f6e29:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto a29f9;
f1f0a:
$site = $this->getSite($request);
goto bc3f7;
Bbfb1:
if (!(true === $basicAuthForm->isSubmitted())) {
goto ba1a8;
}
goto ae675;
C0c7a:
$response = $this->redirect($this->generateUrl("\143\154\x70\137\x73\x69\164\145\x73"));
goto E849b;
a5dbf: ac486:
goto d475b;
c626c:
}
private function createCloudflareForm(SiteEntity $siteEntity, array $data): Form
{
goto Acfc9;
b150b:
$form->add("\163\x75\142\x6d\x69\164", SubmitType::class, ["\141\x74\x74\x72" => ["\143\154\x61\163\163" => "\x62\x74\x6e\x20\x62\x74\156\55\x62\154\x75\145\40\x62\164\156\x2d\x6c\147"], "\x6c\141\142\x65\154" => "\123\141\x76\145"]);
goto D59da;
D59da:
return $form;
goto De5ff;
Acfc9:
$form = $this->createForm("\x41\x70\x70\x5c\x46\157\162\155\134\x53\151\x74\x65\x43\x6c\157\165\x64\146\x6c\141\162\x65\x54\x79\x70\x65", $data, ["\141\143\x74\151\x6f\x6e" => $this->generateUrl("\143\154\x70\137\163\151\x74\x65\x5f\163\x65\x63\x75\x72\151\164\171", ["\144\157\155\141\x69\156\x4e\x61\x6d\x65" => $siteEntity->getDomainName()]), "\x6d\145\x74\x68\157\x64" => "\x50\117\x53\124", "\141\x74\x74\162" => []]);
goto b150b;
De5ff:
}
private function createBasicAuthForm(BasicAuthEntity $basicAuthEntity): Form
{
goto Aae55;
F3e78:
$form = $this->createForm("\101\160\160\134\106\x6f\162\155\134\123\x69\164\145\102\x61\163\x69\x63\101\165\164\150\x54\171\160\x65", $basicAuthEntity, ["\141\x63\x74\x69\x6f\x6e" => $this->generateUrl("\x63\x6c\160\137\163\151\x74\145\x5f\163\x65\x63\x75\x72\151\x74\171", ["\144\x6f\155\141\x69\156\x4e\x61\x6d\x65" => $siteEntity->getDomainName()]), "\155\145\164\x68\x6f\x64" => "\120\117\123\x54", "\141\x74\164\162" => []]);
goto Bb3e9;
ae554:
return $form;
goto B27fc;
Aae55:
$siteEntity = $basicAuthEntity->getSite();
goto F3e78;
Bb3e9:
$form->add("\163\165\x62\x6d\x69\164", SubmitType::class, ["\141\x74\164\162" => ["\x63\x6c\141\163\163" => "\x62\x74\x6e\40\142\164\x6e\55\x62\154\165\x65\x20\142\x74\156\x2d\154\147"], "\154\141\142\145\154" => "\x53\x61\x76\145"]);
goto ae554;
B27fc:
}
private function handleBasicAuthForm(Request $request, Form $form, Site $site)
{
goto C375e;
a9157:
$this->formErrors = $this->getErrorMessages($form);
goto a0143;
B5846: a3282:
goto Bbf48;
C375e:
if (true === $form->isValid()) {
goto C8425;
}
goto a9157;
C9172:
try {
goto D39f1;
b60c3:
$siteUpdater->reloadNginxService();
goto de52e;
e502d:
$response = $this->redirect($this->generateUrl("\143\154\x70\137\x73\151\x74\145\x5f\x73\x65\143\165\x72\x69\x74\171", ["\144\x6f\155\141\x69\156\x4e\x61\155\145" => $site->getDomainName()]));
goto Bd0b0;
Fb982: c3258:
goto A1d62;
fa8e3:
$siteEntity = $this->getSiteEntity($domainName);
goto bf381;
C9cdb:
goto b79fe;
goto Fb982;
Cada8:
$siteUpdater->createBasicAuthFile($basicAuthEntity);
goto B7f00;
de52e:
$eventData = ["\x73\151\164\x65" => $domainName, "\x61\143\164\151\x76\x65" => true === $basicAuthEntity->getIsActive() ? "\x31" : "\x30", "\x75\x73\145\162\x4e\141\x6d\145" => $basicAuthEntity->getUserName(), "\167\x68\151\x74\x65\154\151\163\x74\145\144\x49\x70\x73" => $basicAuthEntity->getWhitelistedIps()];
goto e67c7;
b8b9d:
$domainName = $site->getDomainName();
goto fa8e3;
b0019:
$siteEntity->setBasicAuth($basicAuthEntity);
goto C3da1;
C3da1:
$site->setBasicAuth($basicAuthEntity);
goto A0d04;
A1d62:
$user = $this->getUser();
goto a80d1;
a80d1:
$basicAuthEntity = $form->getData();
goto b0019;
A0d04:
$this->siteEntityManager->updateEntity($siteEntity);
goto C7aca;
e67c7:
EventQueue::addEvent(EventQueue::EVENT_SITE_BASIC_AUTHENTIFICATION_SETTINGS, $user, $eventData, $request);
goto C867b;
Bd0b0: b79fe:
goto de82a;
bf381:
if (false === is_null($siteEntity)) {
goto c3258;
}
goto c7680;
D39f1:
$session = $request->getSession();
goto b8b9d;
de82a:
return $response;
goto Ec61c;
C7aca:
$siteUpdater = $this->getSiteUpdater($site);
goto Cada8;
C867b:
$session->getFlashBag()->set("\x73\165\x63\x63\145\163\163", $this->translator->trans("\x42\141\163\x69\143\40\x41\x75\164\150\x65\x6e\164\151\x63\x61\x74\x69\157\x6e\x20\163\145\164\164\x69\x6e\x67\163\40\x68\141\x76\145\x20\142\145\145\156\40\x73\141\166\x65\x64\56"));
goto e502d;
B7f00:
$siteUpdater->updateNginxVhost();
goto b60c3;
c7680:
$response = $this->redirect($this->generateUrl("\x63\154\x70\137\163\151\x74\145\163"));
goto C9cdb;
Ec61c:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\141\x6e\147\145\162", $this->translator->trans("\101\x6e\40\145\x72\162\x6f\162\40\x68\141\x73\40\x6f\143\x63\165\162\x72\145\x64\54\40\145\162\x72\x6f\162\40\x6d\145\163\163\141\x67\145\72\40\45\145\162\x72\157\x72\x4d\x65\163\163\x61\147\145\45", ["\45\145\162\x72\x6f\x72\115\x65\163\x73\141\x67\x65\x25" => $e->getMessage()]));
}
goto B5846;
a0143:
goto a3282;
goto Ffda3;
Ffda3: C8425:
goto C9172;
Bbf48:
}
private function handleCloudflareForm(Request $request, Form $form, Site $site)
{
goto C10f9;
C10f9:
if (true === $form->isValid()) {
goto f9a89;
}
goto de271;
C9e21:
try {
goto ca90f;
Afe2d:
$eventData = ["\x73\x69\x74\x65" => $domainName, "\x61\154\x6c\x6f\167\x54\x72\x61\146\146\x69\143\106\162\x6f\x6d\x43\154\x6f\165\144\146\x6c\x61\x72\x65\x4f\x6e\x6c\171" => true === $allowTrafficFromCloudflareOnly ? "\61" : "\x30"];
goto dcb09;
ac1c9:
$domainName = $site->getDomainName();
goto b8d9e;
B4b71:
$response = $this->redirect($this->generateUrl("\x63\154\160\x5f\x73\151\164\145\x73"));
goto Db8f6;
c63bb:
return $response;
goto ec36c;
cea07:
$siteUpdater->updateNginxVhost();
goto C0cbb;
b8d9e:
$siteEntity = $this->getSiteEntity($domainName);
goto a32e4;
Ccac9:
$user = $this->getUser();
goto cedc4;
Ab77c:
$response = $this->redirect($this->generateUrl("\143\x6c\160\137\163\x69\164\145\x5f\163\145\x63\x75\x72\x69\x74\x79", ["\x64\x6f\x6d\141\x69\156\x4e\x61\155\x65" => $site->getDomainName()]));
goto Fe509;
Db8f6:
goto caf7a;
goto c7695;
ca90f:
$session = $request->getSession();
goto ac1c9;
C0cbb:
$siteUpdater->reloadNginxService();
goto Afe2d;
a0ac5:
$session->getFlashBag()->set("\x73\165\143\x63\x65\163\163", $this->translator->trans("\103\x6c\x6f\x75\x64\x66\x6c\x61\162\x65\40\163\145\164\164\x69\x6e\147\163\40\150\141\x76\x65\x20\142\145\145\x6e\40\163\141\166\145\x64\x2e"));
goto Ab77c;
D408b:
$this->siteEntityManager->updateEntity($siteEntity);
goto A14be;
d6d2a:
$siteEntity->setAllowTrafficFromCloudflareOnly($allowTrafficFromCloudflareOnly);
goto B6c2b;
B6c2b:
$site->setAllowTrafficFromCloudflareOnly($allowTrafficFromCloudflareOnly);
goto D408b;
dcb09:
EventQueue::addEvent(EventQueue::EVENT_SITE_CLOUDFLARE_SETTINGS, $user, $eventData, $request);
goto a0ac5;
a32e4:
if (false === is_null($siteEntity)) {
goto B4e77;
}
goto B4b71;
c7695: B4e77:
goto Ccac9;
Fe509: caf7a:
goto c63bb;
A14be:
$siteUpdater = $this->getSiteUpdater($site);
goto cea07;
cedc4:
$allowTrafficFromCloudflareOnly = $form->get("\x61\154\154\157\167\x54\x72\141\x66\146\x69\143\x46\162\157\155\x43\x6c\157\x75\x64\x66\x6c\x61\162\x65\117\156\154\x79")->getData();
goto d6d2a;
ec36c:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\141\156\147\145\x72", $this->translator->trans("\101\156\x20\145\162\162\x6f\162\x20\150\141\x73\x20\x6f\143\x63\x75\162\x72\145\x64\54\x20\x65\162\162\x6f\x72\40\155\145\163\x73\x61\147\145\x3a\40\45\x65\162\x72\157\162\115\145\x73\x73\x61\x67\145\x25", ["\45\145\162\162\x6f\162\x4d\x65\163\x73\141\x67\x65\45" => $e->getMessage()]));
}
goto B6e7e;
de271:
$this->formErrors = $this->getErrorMessages($form);
goto C5364;
B6e7e: d1482:
goto de7a0;
C5364:
goto d1482;
goto Ecf26;
Ecf26: f9a89:
goto C9e21;
de7a0:
}
public function newBlockedIp(Request $request): Response
{
goto D09b1;
D33e9: Ad67c:
goto bdab8;
Cb0e0:
if (false === is_null($site)) {
goto C4f77;
}
goto A8654;
Eed83:
goto d9437;
goto feeec;
b6319:
$blockedIpEntity = $this->blockedIpEntityManager->createEntity();
goto fcc14;
d254a: d9437:
goto F7cc7;
fcc14:
$blockedIpEntity->setSite($siteEntity);
goto E0ce4;
efb5d: A4c03:
goto D33e9;
Ef8c5:
if (!(true === $form->isSubmitted())) {
goto A4c03;
}
goto D2f3c;
Ece3f:
if (!(false === is_null($response))) {
goto F8e59;
}
goto ca3ad;
A8654:
$response = $this->redirect($this->generateUrl("\143\x6c\x70\x5f\x73\151\x74\x65\163"));
goto Eed83;
F7cc7:
return $response;
goto e59b7;
Aea75: F8e59:
goto efb5d;
feeec: C4f77:
goto D9942;
D2f3c:
$response = $this->handleBlockedIpForm($request, $form, $site);
goto Ece3f;
B0ead:
$form->handleRequest($request);
goto Ef8c5;
E0ce4:
$form = $this->createBlockedIpForm($blockedIpEntity);
goto Ce991;
bdab8:
$response = $this->render("\x46\x72\x6f\156\x74\x65\156\144\x2f\123\151\x74\145\x2f\x6e\x65\167\x2d\142\x6c\x6f\x63\153\x65\144\55\151\160\x2e\x68\x74\x6d\x6c\56\164\x77\151\x67", ["\163\151\x74\145" => $site, "\x66\157\x72\x6d" => $form->createView(), "\146\157\x72\x6d\x45\x72\x72\157\162\163" => $this->formErrors]);
goto d254a;
D09b1:
$site = $this->getSite($request);
goto Cb0e0;
Ce991:
if (!(true === $request->isMethod("\120\x4f\123\124"))) {
goto Ad67c;
}
goto B0ead;
D9942:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto b6319;
ca3ad:
return $response;
goto Aea75;
e59b7:
}
private function createBlockedIpForm(BlockedIpEntity $blockedIpEntity): Form
{
goto F6066;
F6066:
$siteEntity = $blockedIpEntity->getSite();
goto F8b37;
F8b37:
$form = $this->createForm("\101\x70\x70\134\x46\x6f\x72\x6d\x5c\x53\151\x74\x65\102\x6c\157\143\153\145\144\x49\x50\x54\171\x70\145", $blockedIpEntity, ["\141\x63\164\x69\x6f\x6e" => $this->generateUrl("\x63\154\160\137\x73\151\164\145\x5f\163\x65\x63\165\162\151\x74\171\x5f\142\x6c\157\x63\153\145\144\x5f\151\160\x5f\x6e\x65\x77", ["\x64\157\155\141\151\156\x4e\x61\155\145" => $siteEntity->getDomainName()]), "\x6d\145\x74\150\x6f\x64" => "\120\117\x53\x54", "\x61\x74\x74\162" => []]);
goto e64a8;
e64a8:
$form->add("\163\165\x62\x6d\151\x74", SubmitType::class, ["\141\x74\164\162" => ["\143\x6c\x61\x73\x73" => "\x62\164\x6e\40\142\x74\x6e\55\142\154\x75\145\40\x62\x74\156\x2d\x6c\147"], "\154\141\x62\x65\x6c" => "\101\144\144\x20\111\x50"]);
goto d867f;
d867f:
return $form;
goto b8af1;
b8af1:
}
private function handleBlockedIpForm(Request $request, Form $form, Site $site)
{
goto ab21f;
Ba2df:
try {
goto a101b;
a101b:
$session = $request->getSession();
goto b5835;
d4b00:
EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_IP_ADD, $user, $eventData, $request);
goto B4f18;
b01ac:
$siteEntity->addBlockedIp($blockedIp);
goto Bdf23;
D2e1a:
goto c9961;
goto b6adb;
d27c7:
$response = $this->redirect($this->generateUrl("\143\x6c\x70\137\x73\151\x74\145\x73"));
goto D2e1a;
b0921:
$response = $this->redirect($this->generateUrl("\x63\154\x70\137\163\151\164\x65\x5f\163\x65\x63\165\x72\x69\164\x79", ["\144\157\x6d\141\x69\x6e\x4e\x61\x6d\145" => $site->getDomainName()]));
goto fc275;
A646d:
$eventData = ["\x73\151\164\145" => $domainName, "\x69\x70" => $blockedIp->getIp()];
goto d4b00;
fc275: c9961:
goto c175e;
F5e92:
$user = $this->getUser();
goto f1ae2;
ede92:
$siteUpdater->updateNginxVhost();
goto F24c9;
b6adb: a750b:
goto F5e92;
F24c9:
$siteUpdater->reloadNginxService();
goto A646d;
B4f18:
$session->getFlashBag()->set("\x73\x75\143\x63\145\163\x73", $this->translator->trans("\111\x50\x20\x68\x61\x73\40\x62\x65\x65\156\x20\x61\x64\x64\145\144\x2e"));
goto b0921;
f1ae2:
$blockedIp = $form->getData();
goto b01ac;
a240a:
$siteEntity = $this->getSiteEntity($domainName);
goto Df7c4;
Ea901:
$siteUpdater = $this->getSiteUpdater($site);
goto ede92;
Df7c4:
if (false === is_null($siteEntity)) {
goto a750b;
}
goto d27c7;
c175e:
return $response;
goto f8f78;
Bdf23:
$this->siteEntityManager->updateEntity($siteEntity);
goto Ea901;
b5835:
$domainName = $site->getDomainName();
goto a240a;
f8f78:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\141\x6e\x67\x65\162", $this->translator->trans("\101\156\40\x65\x72\x72\157\x72\40\150\x61\163\40\x6f\x63\143\x75\162\x72\x65\x64\54\x20\x65\x72\x72\x6f\x72\40\x6d\145\163\163\x61\147\x65\72\40\x25\145\162\x72\x6f\162\x4d\145\163\163\x61\147\145\x25", ["\x25\145\x72\x72\x6f\x72\115\145\163\x73\141\147\x65\45" => $e->getMessage()]));
}
goto Aa659;
a811b:
goto E56e3;
goto ea9bf;
bf487:
$this->formErrors = $this->getErrorMessages($form);
goto a811b;
Aa659: E56e3:
goto A4b86;
ea9bf: Df024:
goto Ba2df;
ab21f:
if (true === $form->isValid()) {
goto Df024;
}
goto bf487;
A4b86:
}
public function deleteBlockedIp(Request $request): Response
{
goto e8f89;
F2c0d:
$this->checkCsrfToken($request, "\151\x70\55\144\x65\x6c\145\164\x65");
goto Df4db;
D0765:
try {
goto Ae3b7;
c7b1f:
$eventData = ["\163\151\164\x65" => $domainName, "\x69\160" => $blockedIpEntity->getIp()];
goto a1c27;
Ae3b7:
$session = $request->getSession();
goto d9377;
a1c27:
EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_IP_DELETE, $user, $eventData, $request);
goto b5109;
C775d:
$siteUpdater->updateNginxVhost();
goto A42ae;
b5109:
$session->getFlashBag()->set("\163\x75\x63\143\145\x73\163", $this->translator->trans("\111\x50\40\x68\141\x73\x20\142\x65\x65\x6e\x20\144\x65\154\x65\164\x65\x64\56"));
goto dee25;
ef4b0:
$siteUpdater = $this->getSiteUpdater($site);
goto C775d;
d9377:
$id = (int)$request->get("\x69\x64");
goto Edf08;
f3a24:
return $response;
goto Fc5ed;
f3b7c:
$this->siteEntityManager->updateEntity($siteEntity);
goto ef4b0;
Ee60a:
$siteEntity = $this->getSiteEntity($domainName);
goto d4bca;
Edf08:
$domainName = $site->getDomainName();
goto Ee60a;
d4bca:
$blockedIpEntity = $this->blockedIpEntityManager->findOneById($id);
goto D70b3;
D70b3:
if (!(false === is_null($siteEntity) && false === empty($id) && false === is_null($blockedIpEntity) && $siteEntity == $blockedIpEntity->getSite())) {
goto ad09f;
}
goto E2524;
A49bc:
$siteEntity->removeBlockedIp($blockedIpEntity);
goto f3b7c;
dee25:
$response = $this->redirect($this->generateUrl("\143\x6c\x70\137\x73\151\164\x65\137\163\145\x63\x75\x72\151\x74\171", ["\144\x6f\155\141\151\156\x4e\x61\155\145" => $site->getDomainName()]));
goto f3a24;
E2524:
$user = $this->getUser();
goto A49bc;
Fc5ed: ad09f:
goto D2dfd;
A42ae:
$siteUpdater->reloadNginxService();
goto c7b1f;
D2dfd:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\x61\x6e\x67\145\162", $this->translator->trans("\101\x6e\x20\145\x72\x72\157\162\40\150\x61\163\x20\157\143\143\x75\162\x72\x65\x64\x2c\x20\145\x72\x72\157\x72\40\x6d\145\163\163\x61\147\145\x3a\x20\45\145\x72\162\157\162\115\145\163\163\x61\x67\145\45", ["\x25\x65\x72\x72\x6f\162\115\x65\x73\x73\141\x67\x65\45" => $e->getMessage()]));
}
goto A3c32;
A3c32: F8e14:
goto b56c6;
b56c6:
$response = $this->redirect($this->generateUrl("\143\154\160\x5f\163\x69\x74\x65\163"));
goto d98fb;
e8f89:
$site = $this->getSite($request);
goto F2c0d;
Df4db:
if (!(false === is_null($site))) {
goto F8e14;
}
goto D0765;
d98fb:
return $response;
goto C24e5;
C24e5:
}
public function newBlockedBot(Request $request): Response
{
goto C0bed;
Cccb4:
$response = $this->redirect($this->generateUrl("\x63\154\x70\x5f\x73\151\164\145\x73"));
goto c6488;
C5dd5:
$form->handleRequest($request);
goto aa948;
cc024: f8915:
goto A19ee;
F30c5:
return $response;
goto Fa7fd;
F85b9:
$form = $this->createBlockedBotForm($blockedBotEntity);
goto A015a;
E77ad: Ecc18:
goto F87c7;
A015a:
if (!(true === $request->isMethod("\x50\117\123\x54"))) {
goto B3b02;
}
goto C5dd5;
F7f3e:
if (!(false === is_null($response))) {
goto f8915;
}
goto b4b67;
b4b67:
return $response;
goto cc024;
C0bed:
$site = $this->getSite($request);
goto D26e1;
aa948:
if (!(true === $form->isSubmitted())) {
goto ee395;
}
goto e41a0;
F87c7:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto a5508;
c55d6:
$blockedBotEntity->setSite($siteEntity);
goto F85b9;
Fa84c: Fb8e6:
goto F30c5;
A0f33:
$response = $this->render("\106\162\x6f\x6e\164\x65\156\144\57\123\151\164\x65\x2f\156\145\x77\x2d\x62\x6c\157\x63\153\145\x64\x2d\142\x6f\x74\56\150\164\x6d\154\56\164\167\151\x67", ["\x73\151\x74\x65" => $site, "\x66\157\162\155" => $form->createView(), "\146\157\162\155\105\162\x72\x6f\x72\x73" => $this->formErrors]);
goto Fa84c;
E4d0b: B3b02:
goto A0f33;
D26e1:
if (false === is_null($site)) {
goto Ecc18;
}
goto Cccb4;
c6488:
goto Fb8e6;
goto E77ad;
e41a0:
$response = $this->handleBlockedBotForm($request, $form, $site);
goto F7f3e;
A19ee: ee395:
goto E4d0b;
a5508:
$blockedBotEntity = $this->blockedBotEntityManager->createEntity();
goto c55d6;
Fa7fd:
}
private function createBlockedBotForm(BlockedBotEntity $blockedBotEntity): Form
{
goto Ecd7a;
E1fcb:
return $form;
goto D8ae5;
Ecd7a:
$siteEntity = $blockedBotEntity->getSite();
goto F8098;
Abaa4:
$form->add("\163\165\142\155\x69\x74", SubmitType::class, ["\141\x74\x74\162" => ["\x63\154\141\163\163" => "\x62\x74\156\40\x62\x74\x6e\x2d\x62\x6c\x75\145\x20\142\164\x6e\55\x6c\x67"], "\154\141\142\x65\x6c" => "\101\144\144\x20\102\x6f\164"]);
goto E1fcb;
F8098:
$form = $this->createForm("\101\x70\x70\x5c\106\157\162\x6d\134\x53\x69\164\x65\102\154\x6f\x63\153\x65\x64\102\157\x74\124\x79\x70\x65", $blockedBotEntity, ["\141\x63\164\x69\x6f\x6e" => $this->generateUrl("\x63\x6c\x70\137\163\x69\x74\145\x5f\163\145\x63\x75\162\x69\164\171\x5f\142\x6c\157\143\x6b\x65\x64\137\142\x6f\x74\137\156\145\x77", ["\x64\x6f\155\141\x69\156\x4e\x61\x6d\x65" => $siteEntity->getDomainName()]), "\155\145\x74\x68\157\144" => "\x50\117\x53\124", "\x61\x74\x74\162" => []]);
goto Abaa4;
D8ae5:
}
private function handleBlockedBotForm(Request $request, Form $form, Site $site)
{
goto d3277;
c6262:
try {
goto F87ac;
c1d26:
$blockedBot = $form->getData();
goto f3462;
E91e9:
EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_BOT_ADD, $user, $eventData, $request);
goto Bdf1e;
De9ab:
if (false === is_null($siteEntity)) {
goto f9144;
}
goto Dba7c;
d97c5:
$this->siteEntityManager->updateEntity($siteEntity);
goto ed329;
A19c2:
$user = $this->getUser();
goto c1d26;
Dba7c:
$response = $this->redirect($this->generateUrl("\x63\x6c\x70\137\x73\151\x74\145\x73"));
goto bfcb5;
e67c6: f9144:
goto A19c2;
Bdf1e:
$session->getFlashBag()->set("\x73\x75\143\x63\x65\163\x73", $this->translator->trans("\x42\157\164\40\x68\141\163\x20\x62\x65\145\156\40\141\144\x64\145\x64\56"));
goto F7b72;
F7b72:
$response = $this->redirect($this->generateUrl("\x63\154\x70\x5f\x73\151\x74\145\x5f\x73\145\x63\165\x72\x69\164\171", ["\x64\x6f\155\x61\151\156\116\x61\x6d\145" => $site->getDomainName()]));
goto b546b;
D0f14:
$siteUpdater->reloadNginxService();
goto fa769;
b546b: fd1cd:
goto A3fda;
Db2d0:
$siteEntity = $this->getSiteEntity($domainName);
goto De9ab;
ed329:
$siteUpdater = $this->getSiteUpdater($site);
goto Cdcef;
bfcb5:
goto fd1cd;
goto e67c6;
fa769:
$eventData = ["\x73\151\164\145" => $domainName, "\156\141\155\145" => $blockedBot->getName()];
goto E91e9;
Cdcef:
$siteUpdater->updateNginxVhost();
goto D0f14;
f3462:
$siteEntity->addBlockedBot($blockedBot);
goto d97c5;
D8269:
$domainName = $site->getDomainName();
goto Db2d0;
A3fda:
return $response;
goto Ded03;
F87ac:
$session = $request->getSession();
goto D8269;
Ded03:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\141\x6e\147\145\x72", $this->translator->trans("\101\156\x20\145\162\x72\x6f\x72\x20\x68\141\163\x20\x6f\143\143\165\x72\x72\x65\144\54\x20\145\x72\x72\157\162\x20\x6d\x65\163\x73\141\x67\x65\x3a\x20\x25\145\162\162\157\x72\x4d\145\x73\163\x61\x67\x65\x25", ["\x25\x65\162\x72\157\x72\115\145\163\163\141\147\x65\45" => $e->getMessage()]));
}
goto b8d85;
C2249:
$this->formErrors = $this->getErrorMessages($form);
goto a1d13;
a1d13:
goto Bef5b;
goto a1a91;
d3277:
if (true === $form->isValid()) {
goto Ce759;
}
goto C2249;
a1a91: Ce759:
goto c6262;
b8d85: Bef5b:
goto A72b9;
A72b9:
}
public function deleteBlockedBot(Request $request): Response
{
goto d6341;
eb30b:
$this->checkCsrfToken($request, "\142\157\x74\x2d\x64\145\x6c\145\164\x65");
goto f8095;
cb719:
return $response;
goto f02f9;
D60fc:
try {
goto bddde;
a2ccc:
$eventData = ["\x73\151\164\145" => $domainName, "\x6e\141\x6d\x65" => $blockedBotEntity->getName()];
goto ab718;
bddde:
$session = $request->getSession();
goto A5581;
Ebc3a:
$blockedBotEntity = $this->blockedBotEntityManager->findOneById($id);
goto B2562;
e3838:
$siteEntity->removeBlockedBot($blockedBotEntity);
goto E984d;
ab718:
EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_BOT_DELETE, $user, $eventData, $request);
goto A96c2;
D781c: f1546:
goto ede56;
B2562:
if (!(false === is_null($siteEntity) && false === empty($id) && false === is_null($blockedBotEntity) && $siteEntity == $blockedBotEntity->getSite())) {
goto f1546;
}
goto b9cf5;
Fe6c0:
$siteUpdater = $this->getSiteUpdater($site);
goto B7214;
A5581:
$id = (int)$request->get("\x69\144");
goto E4ae0;
B7214:
$siteUpdater->updateNginxVhost();
goto ec261;
A6429:
$response = $this->redirect($this->generateUrl("\143\x6c\160\137\163\151\x74\145\x5f\163\145\x63\x75\x72\151\164\x79", ["\144\157\x6d\141\x69\156\x4e\x61\155\145" => $site->getDomainName()]));
goto Aee6c;
Aa3c3:
$siteEntity = $this->getSiteEntity($domainName);
goto Ebc3a;
A96c2:
$session->getFlashBag()->set("\163\x75\x63\143\x65\x73\x73", $this->translator->trans("\x42\157\164\40\x68\x61\x73\x20\x62\x65\x65\156\x20\x64\x65\154\x65\x74\x65\144\x2e"));
goto A6429;
Aee6c:
return $response;
goto D781c;
E984d:
$this->siteEntityManager->updateEntity($siteEntity);
goto Fe6c0;
E4ae0:
$domainName = $site->getDomainName();
goto Aa3c3;
b9cf5:
$user = $this->getUser();
goto e3838;
ec261:
$siteUpdater->reloadNginxService();
goto a2ccc;
ede56:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\x61\x6e\147\145\162", $this->translator->trans("\x41\x6e\x20\x65\162\162\x6f\162\40\x68\x61\163\x20\x6f\143\143\x75\x72\x72\x65\144\54\40\145\x72\162\157\x72\40\155\145\x73\163\141\x67\x65\x3a\x20\45\x65\x72\x72\x6f\x72\115\x65\163\163\141\x67\145\45", ["\45\145\162\162\157\x72\115\145\163\x73\141\147\x65\x25" => $e->getMessage()]));
}
goto e2f40;
C794b:
$response = $this->redirect($this->generateUrl("\x63\x6c\160\x5f\163\151\x74\x65\163"));
goto cb719;
e2f40: e5edc:
goto C794b;
f8095:
if (!(false === is_null($site))) {
goto e5edc;
}
goto D60fc;
d6341:
$site = $this->getSite($request);
goto eb30b;
f02f9:
}
public function certificates(Request $request): Response
{
goto a6758;
C05ae:
if (false === is_null($site)) {
goto Bae56;
}
goto a87cb;
A86c6:
goto e3327;
goto B3259;
B13da:
$response = $this->render("\106\162\157\156\x74\145\156\144\x2f\x53\x69\164\x65\x2f\143\145\162\x74\151\x66\x69\143\x61\164\145\x73\56\x68\164\155\x6c\56\x74\x77\151\147", ["\163\x69\164\x65" => $site, "\151\156\163\164\141\x6c\x6c\x65\x64\x43\145\x72\164\151\x66\151\x63\141\x74\x65" => $installedCertificate, "\143\145\x72\164\151\146\x69\143\x61\x74\145\163" => $certificates]);
goto A6427;
c3533:
$installedCertificate = $site->getCertificate();
goto f8dc8;
f8dc8:
$certificates = $site->getCertificates();
goto B13da;
A6427: e3327:
goto eab56;
a6758:
$site = $this->getSite($request);
goto C05ae;
eab56:
return $response;
goto cc9c2;
B3259: Bae56:
goto c3533;
a87cb:
$response = $this->redirect($this->generateUrl("\143\154\160\137\x73\151\x74\145\x73"));
goto A86c6;
cc9c2:
}
public function importCertificate(Request $request): Response
{
goto eaf24;
Ff5df:
$certificateEntity->setType(CertificateEntity::TYPE_IMPORTED);
goto B8d9d;
f43cc:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto Ccac2;
Ec40c:
$response = $this->redirect($this->generateUrl("\x63\x6c\160\137\163\x69\x74\145\163"));
goto a8101;
Cc181:
$form = $this->createImportCertificateForm($certificateEntity);
goto c4e48;
fc646: c8db7:
goto e3172;
a8101:
goto a8a8c;
goto Dc07a;
dfe1a:
$response = $this->handleImportCertificateForm($request, $form, $site);
goto Ead7f;
Dad1e:
return $response;
goto d5f7f;
F3325: cc09a:
goto fc646;
F452e: a8a8c:
goto Dad1e;
Ead7f:
if (!(false === is_null($response))) {
goto c86c4;
}
goto c0df8;
d9aa4:
if (!(true === $form->isSubmitted())) {
goto cc09a;
}
goto dfe1a;
Ccac2:
$certificateEntity = $this->certificateEntityManager->createEntity();
goto Ff5df;
eaf24:
$site = $this->getSite($request);
goto b93d9;
c4e48:
if (!(true === $request->isMethod("\120\117\x53\x54"))) {
goto c8db7;
}
goto C36ab;
b93d9:
if (false === is_null($site)) {
goto Af2fe;
}
goto Ec40c;
c0df8:
return $response;
goto Dbe95;
B8d9d:
$certificateEntity->setSite($siteEntity);
goto Cc181;
C36ab:
$form->handleRequest($request);
goto d9aa4;
Dbe95: c86c4:
goto F3325;
e3172:
$response = $this->render("\x46\x72\157\x6e\x74\x65\x6e\x64\57\x53\x69\164\145\x2f\151\155\x70\157\162\164\x2d\x63\x65\x72\164\x69\146\151\143\x61\x74\x65\56\x68\164\x6d\154\56\164\x77\x69\x67", ["\x73\x69\x74\x65" => $site, "\146\x6f\x72\155" => $form->createView(), "\x66\157\162\155\105\x72\162\157\162\x73" => $this->formErrors]);
goto F452e;
Dc07a: Af2fe:
goto f43cc;
d5f7f:
}
private function createImportCertificateForm(CertificateEntity $certificateEntity): Form
{
goto d81ee;
d3aea:
$form = $this->createForm("\x41\x70\x70\134\x46\x6f\162\155\134\123\x69\x74\145\111\155\x70\157\162\164\103\x65\162\x74\151\x66\x69\x63\x61\164\145\x54\171\160\x65", $certificateEntity, ["\x61\x63\164\151\157\156" => $this->generateUrl("\143\154\x70\137\163\x69\x74\x65\x5f\143\x65\162\164\151\146\x69\x63\141\164\x65\x5f\151\x6d\x70\x6f\162\x74", ["\x64\157\155\141\x69\x6e\116\x61\x6d\145" => $siteEntity->getDomainName()]), "\x6d\x65\x74\x68\157\144" => "\x50\x4f\123\x54", "\x61\164\x74\x72" => []]);
goto ee27f;
d81ee:
$siteEntity = $certificateEntity->getSite();
goto d3aea;
C113c:
return $form;
goto Ed1cc;
ee27f:
$form->add("\163\165\142\155\x69\164", SubmitType::class, ["\141\164\164\x72" => ["\x63\x6c\x61\x73\x73" => "\142\164\x6e\x20\x62\x74\x6e\x2d\142\x6c\165\145\x20\142\x74\156\55\x6c\x67"], "\154\x61\142\145\154" => "\111\155\160\157\162\x74\x20\141\x6e\144\40\x49\x6e\x73\x74\x61\154\x6c"]);
goto C113c;
Ed1cc:
}
private function handleImportCertificateForm(Request $request, Form $form, Site $site)
{
goto De5c8;
c0317:
goto e2f33;
goto E182a;
De5c8:
if (true === $form->isValid()) {
goto B84df;
}
goto Cd864;
D5bb6:
try {
goto ee42c;
da343: C10cf:
goto Cf152;
c2cff:
if (false === is_null($siteEntity)) {
goto C10cf;
}
goto f467b;
c9f0a: f5db9:
goto D3efd;
f467b:
$response = $this->redirect($this->generateUrl("\x63\154\160\137\x73\x69\164\145\x73"));
goto E27c8;
C4f62:
$siteEntity->addCertificate($certificateEntity);
goto c0f62;
E27c8:
goto f5db9;
goto da343;
Be0d5:
$siteUpdater = $this->getSiteUpdater($site);
goto Cdeef;
b227d:
$siteEntity = $this->getSiteEntity($domainName);
goto c2cff;
b7b4d:
$evenData = ["\163\x69\x74\x65" => $domainName];
goto B20c0;
c3e54:
$certificateEntity = $form->getData();
goto Be0d5;
Cf152:
$user = $this->getUser();
goto c3e54;
Cdeef:
$siteUpdater->installCertificate($certificateEntity);
goto C78f0;
b3d31:
$domainName = $site->getDomainName();
goto b227d;
ee42c:
$session = $request->getSession();
goto b3d31;
c0f62:
$this->siteEntityManager->updateEntity($siteEntity);
goto b7b4d;
Bbeec:
$session->getFlashBag()->set("\x73\x75\143\x63\x65\163\x73", $this->translator->trans("\x43\145\162\164\x69\x66\151\x63\141\x74\145\x20\x68\141\x73\x20\x62\x65\145\156\x20\x69\x6e\x73\164\x61\x6c\x6c\x65\144\56"));
goto Bc184;
D3efd:
return $response;
goto c48b9;
C78f0:
$siteEntity->setCertificate($certificateEntity);
goto C4f62;
B20c0:
EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_INSTALL, $user, $evenData, $request);
goto Bbeec;
Bc184:
$response = $this->redirect($this->generateUrl("\143\154\x70\x5f\163\151\x74\x65\137\143\145\162\164\x69\146\x69\x63\x61\x74\145\163", ["\144\157\155\141\151\x6e\116\141\x6d\x65" => $site->getDomainName()]));
goto c9f0a;
c48b9:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\141\x6e\x67\x65\x72", $this->translator->trans("\101\x6e\40\x65\x72\162\157\x72\x20\x68\x61\163\x20\x6f\143\143\165\x72\162\145\x64\54\40\x65\162\x72\x6f\162\40\x6d\x65\163\x73\x61\x67\145\72\40\45\x65\x72\162\x6f\162\115\145\163\x73\141\x67\145\45", ["\45\145\162\162\157\x72\x4d\x65\x73\163\x61\x67\x65\45" => $e->getMessage()]));
}
goto Ded78;
Cd864:
$this->formErrors = $this->getErrorMessages($form);
goto c0317;
E182a: B84df:
goto D5bb6;
Ded78: e2f33:
goto B9b74;
B9b74:
}
public function newLetsEncryptCertificate(Request $request): Response
{
goto B39ea;
Ad7b6: D6477:
goto Abcc0;
A3d69: F1396:
goto cafde;
d1234: ca389:
goto A957f;
Fe8fb: Fdab2:
goto Dda69;
b1398:
$form = $this->createLetsEncryptCertificateForm($domainName);
goto B1b9b;
E8d49:
$domains = [$domainName];
goto ead5a;
Bce2e:
goto Fdab2;
goto Ad7b6;
ead5a:
goto Fc0ab;
goto D6715;
fb1bd:
if (!(false === is_null($response))) {
goto Fa57c;
}
goto F59ed;
f3fa9:
$resolvedDomainName = $this->domainNameParser->resolveDomainName($domainName);
goto A58f6;
D2df0: Fa57c:
goto d1234;
eab50:
if (false === is_null($site)) {
goto D6477;
}
goto d627d;
C8a69:
$domains = [$registrableDomain, sprintf("\x77\x77\x77\56\x25\163", $registrableDomain)];
goto ca096;
E1c36:
$domains = (array)$request->get("\144\157\155\x61\151\156\x73");
goto b8b7d;
B1b9b:
$domains = [];
goto E4b7f;
F59ed:
return $response;
goto D2df0;
E4b7f:
if (true === $request->isMethod("\120\x4f\x53\124")) {
goto F1396;
}
goto f3fa9;
Dda69:
return $response;
goto bd26f;
A58f6:
$registrableDomain = $resolvedDomainName->registrableDomain()->toString();
goto D38c5;
A957f: E7b5b:
goto e6844;
a62ca:
$domains = array_unique($domains);
goto abb42;
Ad8af:
if (!(true === $form->isSubmitted())) {
goto ca389;
}
goto E1c36;
B8921:
if (true === is_null($subdomain) || "\x77\167\x77" == $subdomain) {
goto bd2bf;
}
goto E8d49;
abb42:
$response = $this->handleLetsEncryptCertificateForm($request, $form, $site, $domains);
goto fb1bd;
D6715: bd2bf:
goto C8a69;
e6844:
$response = $this->render("\x46\x72\157\x6e\164\x65\x6e\144\x2f\x53\x69\164\145\x2f\156\145\167\x2d\154\x65\164\x73\55\x65\156\143\x72\171\x70\x74\x2d\x63\x65\162\x74\x69\146\x69\x63\x61\x74\x65\x2e\150\164\155\x6c\x2e\x74\x77\151\x67", ["\163\x69\164\x65" => $site, "\x64\x6f\155\x61\x69\x6e\x73" => $domains, "\x66\157\x72\x6d" => $form->createView(), "\146\157\x72\x6d\x45\x72\162\157\162\163" => $this->formErrors]);
goto Fe8fb;
cafde:
$form->handleRequest($request);
goto Ad8af;
ca096: Fc0ab:
goto ae35e;
B39ea:
$site = $this->getSite($request);
goto eab50;
d627d:
$response = $this->redirect($this->generateUrl("\143\154\160\137\x73\x69\x74\x65\x73"));
goto Bce2e;
ae35e:
goto E7b5b;
goto A3d69;
b8b7d:
$domains = array_filter($domains, function ($value) {
return false === empty(trim($value));
});
goto F79d1;
F79d1:
$domains = array_map("\x74\162\x69\155", $domains);
goto a62ca;
a9d5c:
$subdomain = false === empty($subdomain) ? $subdomain : null;
goto B8921;
D38c5:
$subdomain = $resolvedDomainName->subDomain()->toString();
goto a9d5c;
Abcc0:
$domainName = $site->getDomainName();
goto b1398;
bd26f:
}
private function createLetsEncryptCertificateForm(string $domainName): Form
{
goto A0bd2;
dab6c:
$form->add("\163\x75\142\155\x69\x74", SubmitType::class, ["\141\x74\164\x72" => ["\x63\154\x61\163\163" => "\x62\164\x6e\40\142\x74\156\55\x62\x6c\165\145\x20\142\164\x6e\55\x6c\x67"], "\154\141\x62\145\154" => "\x43\162\x65\141\164\x65\40\x61\x6e\144\x20\111\x6e\x73\164\x61\154\154"]);
goto E54ad;
E54ad:
return $form;
goto C2593;
A0bd2:
$form = $this->createForm("\x41\160\x70\x5c\106\157\x72\155\134\123\x69\x74\145\114\145\164\163\105\156\143\162\171\x70\x74\x43\x65\x72\164\151\146\151\x63\141\164\145\124\171\160\145", [], ["\141\143\164\151\x6f\156" => $this->generateUrl("\143\154\x70\x5f\163\x69\x74\145\x5f\154\145\x74\x73\137\x65\x6e\143\162\x79\x70\164\137\143\x65\162\x74\x69\x66\151\x63\141\164\x65\137\156\x65\x77", ["\144\x6f\x6d\x61\x69\x6e\116\141\x6d\145" => $domainName]), "\x6d\145\x74\150\x6f\x64" => "\120\117\123\x54", "\x61\x74\164\x72" => ["\x69\x64" => "\143\x72\x65\141\x74\145\55\x6c\x65\x74\163\55\x65\x6e\x63\x72\x79\160\164\55\143\145\x72\164\151\146\x69\143\x61\x74\145\x2d\146\x6f\x72\155"]]);
goto dab6c;
C2593:
}
private function handleLetsEncryptCertificateForm(Request $request, Form $form, Site $site, array $domains)
{
goto f9a24;
f9a24:
if (!(true === $form->isValid())) {
goto f510e;
}
goto ed3d6;
B3d10:
$this->formErrors = $this->getErrorMessages($form);
goto A93d1;
ed3d6:
try {
goto B3ec7;
a2cf6:
$privateKey = new PrivateKey($letsEncryptPrivateKey);
goto Ecfaa;
C2395:
$user = $this->getUser();
goto F4145;
B4a12:
$certificateEntity->setSite($siteEntity);
goto E852d;
Ec06c:
$certificateEntity->setCertificateChain($certificate->getCertificateChain());
goto D86a3;
c7a0e:
return $response;
goto d6261;
dcd1c:
$response = $this->redirect($this->generateUrl("\x63\x6c\x70\137\163\x69\x74\x65\x5f\143\x65\x72\x74\x69\146\x69\143\141\164\x65\163", ["\144\157\155\x61\x69\x6e\x4e\141\x6d\x65" => $site->getDomainName()]));
goto D7045;
F1619:
foreach ($validationErrors as $domain => $validationErrorMessage) {
$form->addError(new FormError(sprintf("\x25\163\x3a\x20\x25\x73", $domain, $validationErrorMessage)));
B9853:
}
goto Efa83;
e2c78: a1b5e:
goto F70ba;
edb8e:
if (true === empty($validationErrors)) {
goto Bd1fa;
}
goto F1619;
D7045:
return $response;
goto ffbc3;
d6261:
goto a1b5e;
goto d5873;
E1e66:
$csrGenerator = new CsrGenerator($privateKey, $distinguishedName);
goto A6547;
a45c5:
$evenData = ["\x73\x69\x74\145" => $domainName];
goto ab2e8;
E1198:
$commonName = array_shift($distinguishedNameDomains);
goto c5df3;
C64fe:
$certificateEntity->setCertificate($certificate->getCertificate());
goto Ec06c;
D27a2:
$siteUpdater->createLetsEncryptChallengeFiles($certificateOrder);
goto Ecb59;
bce79:
$certificate = $letsEncryptClient->finalizeOrder($certificateOrder, $privateKey, $csr);
goto A9e75;
A6547:
$csr = $csrGenerator->generate();
goto bce79;
Abf6a:
$response = $this->redirect($this->generateUrl("\x63\154\160\x5f\x73\x69\164\x65\x73"));
goto c7a0e;
c5df3:
$distinguishedName = new DistinguishedName($commonName, $distinguishedNameDomains);
goto A7e63;
ab2e8:
EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_INSTALL, $user, $evenData, $request);
goto a7c4b;
D8da8:
$siteUpdater->installCertificate($certificateEntity);
goto a5eb2;
ae090:
$siteUpdater = $this->getSiteUpdater($site);
goto f3163;
bc1a4: Bd1fa:
goto b3f01;
Ecfaa:
$letsEncryptClient = new LetsEncryptClient($privateKey);
goto D4b53;
b3f01:
$distinguishedNameDomains = $domains;
goto E1198;
D4b53:
$letsEncryptClient->registerAccount();
goto A82b0;
D2718:
$siteEntity->addCertificate($certificateEntity);
goto f869c;
ffbc3: fd31e:
goto e2c78;
A7e63:
$rsaKeyGenerator = new RsaKeyGenerator();
goto e9204;
B3ec7:
$session = $request->getSession();
goto faebc;
d5873: f8e7e:
goto C2395;
Bd25f:
$siteEntity = $this->getSiteEntity($domainName);
goto D3718;
A82b0:
$certificateOrder = $letsEncryptClient->requestOrder($domains);
goto ae090;
e9204:
$privateKey = $rsaKeyGenerator->generatePrivateKey();
goto E1e66;
f3163:
$siteUpdater->deleteLetsEncryptChallengeDirectory();
goto D27a2;
D86a3:
$siteUpdater = $this->getSiteUpdater($site);
goto D8da8;
a5eb2:
$siteEntity->setCertificate($certificateEntity);
goto D2718;
Bde28:
$certificateEntity->setPrivateKey($certificate->getPrivateKey());
goto C64fe;
faebc:
$domainName = $site->getDomainName();
goto Bd25f;
E852d:
$certificateEntity->setCsr($certificate->getCsr());
goto Bde28;
D3718:
if (false === is_null($siteEntity)) {
goto f8e7e;
}
goto Abf6a;
F4145:
$letsEncryptPrivateKey = $this->configManager->get("\154\145\x5f\160\x72\151\x76\141\164\145\137\153\145\171");
goto a2cf6;
A9e75:
$certificateEntity = $this->certificateEntityManager->createEntity();
goto c50af;
c50af:
$certificateEntity->setType(CertificateEntity::TYPE_LETS_ENCRYPT);
goto B4a12;
a7c4b:
$session->getFlashBag()->set("\163\165\143\x63\x65\163\163", $this->translator->trans("\103\x65\x72\x74\151\146\x69\143\x61\164\x65\40\x68\x61\x73\40\x62\x65\x65\x6e\40\x69\x6e\163\x74\141\154\x6c\x65\144\x2e"));
goto dcd1c;
f869c:
$this->siteEntityManager->updateEntity($siteEntity);
goto a45c5;
Efa83: A5d8f:
goto A507f;
A507f:
goto fd31e;
goto bc1a4;
Ecb59:
$validationErrors = $letsEncryptClient->validateDomains($certificateOrder);
goto edb8e;
F70ba:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\141\x6e\147\145\x72", $this->translator->trans("\x41\156\40\x65\162\x72\x6f\162\x20\x68\141\x73\40\x6f\x63\x63\165\162\x72\x65\144\x2c\x20\145\162\162\x6f\x72\40\155\x65\x73\163\141\x67\145\72\40\x25\145\x72\x72\x6f\x72\x4d\145\163\163\141\147\x65\45", ["\45\x65\x72\x72\157\162\x4d\x65\x73\x73\x61\x67\x65\x25" => $e->getMessage()]));
} finally {
if (!(true === isset($siteUpdater))) {
goto Cb884;
}
$siteUpdater->deleteLetsEncryptChallengeDirectory();
Cb884:
}
goto da3e4;
da3e4: f510e:
goto B3d10;
A93d1:
}
public function installCertificate(Request $request): Response
{
goto C8ccc;
C8ccc:
$site = $this->getSite($request);
goto E8ec0;
e1f6a: ba7e0:
goto Cdce2;
Ef00e:
try {
goto f19f5;
A938e:
$certificateSiteEntity = $certificateEntity->getSite();
goto Cbb5a;
A532f:
return $response;
goto d15c3;
cb476:
$certificateEntity = $this->certificateEntityManager->findOneByUid($uid);
goto e318e;
e318e:
if (!(false === is_null($siteEntity) && false === empty($uid) && false === is_null($certificateEntity))) {
goto fbe7d;
}
goto A938e;
Eb6d1: fbe7d:
goto Ed354;
cd2f4:
$user = $this->getUser();
goto A1a4b;
Cf55b:
$session->getFlashBag()->set("\x73\x75\x63\x63\x65\x73\163", $this->translator->trans("\x43\145\x72\164\151\146\x69\143\141\164\x65\x20\150\141\x73\40\x62\145\x65\156\40\x69\x6e\x73\164\x61\154\x6c\145\x64\56"));
goto f5859;
D06b3:
$siteEntity->setCertificate($certificateEntity);
goto E69ec;
Fdda5:
EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_INSTALL, $user, $evenData, $request);
goto Cf55b;
b8afa:
$siteUpdater->installCertificate($certificateEntity);
goto D06b3;
A1a4b:
$siteUpdater = $this->getSiteUpdater($site);
goto b8afa;
E69ec:
$this->siteEntityManager->updateEntity($siteEntity);
goto ab133;
f591e:
$siteEntity = $this->getSiteEntity($domainName);
goto cb476;
ab133:
$evenData = ["\x73\151\x74\x65" => $domainName];
goto Fdda5;
d15c3: A7847:
goto Eb6d1;
a5493:
$domainName = $site->getDomainName();
goto f591e;
Cbb5a:
if (!($siteEntity->getDomainName() == $certificateSiteEntity->getDomainName() && $siteEntity->getCertificate() != $certificateSiteEntity)) {
goto A7847;
}
goto cd2f4;
f5859:
$response = $this->redirect($this->generateUrl("\143\x6c\x70\137\x73\x69\164\x65\137\143\145\162\164\x69\x66\x69\143\141\x74\145\163", ["\x64\157\155\x61\151\x6e\116\x61\155\x65" => $site->getDomainName()]));
goto A532f;
C3fa2:
$uid = $request->get("\x75\151\x64");
goto a5493;
f19f5:
$session = $request->getSession();
goto C3fa2;
Ed354:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\x61\x6e\147\145\162", $this->translator->trans("\101\156\40\145\x72\x72\x6f\x72\x20\x68\x61\x73\40\x6f\143\143\x75\162\x72\145\x64\54\x20\x65\x72\162\x6f\x72\x20\x6d\145\163\x73\141\147\145\72\x20\45\145\162\x72\x6f\162\x4d\145\x73\163\141\x67\x65\45", ["\45\x65\x72\162\157\162\115\x65\x73\x73\x61\x67\145\45" => $e->getMessage()]));
}
goto e1f6a;
fe24f:
return $response;
goto Aa428;
Cdce2:
$response = $this->redirect($this->generateUrl("\x63\x6c\x70\x5f\x73\151\164\145\x73"));
goto fe24f;
E8ec0:
if (!(false === is_null($site))) {
goto ba7e0;
}
goto Ef00e;
Aa428:
}
public function deleteCertificate(Request $request): Response
{
goto Ae472;
Ae472:
$site = $this->getSite($request);
goto F5e60;
E605c:
if (!(false === is_null($site))) {
goto B9230;
}
goto a4afd;
b7e35: B9230:
goto C5c29;
F5e60:
$this->checkCsrfToken($request, "\x63\145\x72\164\151\x66\151\143\x61\164\145\x2d\x64\x65\x6c\x65\164\145");
goto E605c;
a4afd:
try {
goto Aad1a;
C3a27:
$domainName = $site->getDomainName();
goto Ce77a;
eca27:
$session->getFlashBag()->set("\x73\165\x63\143\x65\x73\163", $this->translator->trans("\x43\145\162\164\x69\146\x69\x63\141\164\145\40\x68\141\x73\40\142\145\145\x6e\40\x64\x65\x6c\145\164\x65\x64\56"));
goto cfa77;
B9fd5:
if (!(false === is_null($siteEntity) && false === empty($uid) && false === is_null($certificateEntity) && false === $certificateEntity->getDefaultCertificate())) {
goto e6426;
}
goto Bc8f1;
f2adf: a02ae:
goto Ca626;
Bba97:
$uid = $request->get("\165\151\144");
goto C3a27;
f50d9:
$this->siteEntityManager->updateEntity($siteEntity);
goto Fdc16;
Aad1a:
$session = $request->getSession();
goto Bba97;
d33fa:
$certificateEntity = $this->certificateEntityManager->findOneByUid($uid);
goto B9fd5;
Fdc16:
$evenData = ["\163\x69\164\145" => $domainName];
goto ef987;
cfa77:
$response = $this->redirect($this->generateUrl("\143\154\160\137\x73\x69\164\145\137\143\x65\x72\164\x69\x66\151\x63\141\164\145\x73", ["\x64\x6f\155\141\151\156\116\141\x6d\x65" => $site->getDomainName()]));
goto C6b73;
E9da5:
$siteEntity->removeCertificate($certificateEntity);
goto f50d9;
ef987:
EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_DELETE, $user, $evenData, $request);
goto eca27;
Bc8f1:
$certificateSiteEntity = $certificateEntity->getSite();
goto Ec923;
D883f:
$user = $this->getUser();
goto E9da5;
C6b73:
return $response;
goto f2adf;
Ec923:
if (!($siteEntity->getDomainName() == $certificateSiteEntity->getDomainName() && $siteEntity->getCertificate() != $certificateSiteEntity)) {
goto a02ae;
}
goto D883f;
Ce77a:
$siteEntity = $this->getSiteEntity($domainName);
goto d33fa;
Ca626: e6426:
goto D00ed;
D00ed:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\141\x6e\x67\145\162", $this->translator->trans("\101\156\40\x65\162\162\x6f\x72\x20\x68\x61\163\x20\x6f\143\143\x75\x72\162\145\144\x2c\x20\145\162\162\x6f\162\40\x6d\145\x73\x73\141\147\145\x3a\40\x25\x65\x72\x72\157\162\115\x65\x73\x73\x61\147\145\x25", ["\x25\145\x72\162\157\162\x4d\x65\163\x73\x61\147\x65\x25" => $e->getMessage()]));
}
goto b7e35;
dad4c:
return $response;
goto Ef059;
C5c29:
$response = $this->redirect($this->generateUrl("\x63\154\160\x5f\163\151\x74\145\x73"));
goto dad4c;
Ef059:
}
public function databases(Request $request): Response
{
goto e8d34;
F3512:
goto F4e10;
goto d2954;
e8d34:
$site = $this->getSite($request);
goto E27bd;
Eb990:
return $response;
goto Dfd10;
d2954: d2a91:
goto D1fa9;
E27bd:
if (false === is_null($site)) {
goto d2a91;
}
goto Caf72;
F1276: da399:
goto C402c;
A4435:
$numberOfDatabaseUsers = 0;
goto C988a;
d1784: F4e10:
goto Eb990;
D1fa9:
$databases = $site->getDatabases();
goto Fadb1;
Caf72:
$response = $this->redirect($this->generateUrl("\143\154\x70\x5f\163\x69\164\145\163"));
goto F3512;
C988a:
foreach ($databases as $database) {
$numberOfDatabaseUsers += count($database->getUsers());
e7499:
}
goto F1276;
Fadb1:
$databaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto A4435;
C402c:
$response = $this->render("\x46\x72\157\156\164\x65\156\144\x2f\x53\x69\164\x65\x2f\144\141\x74\141\x62\141\x73\x65\163\x2e\x68\x74\x6d\154\56\x74\x77\151\x67", ["\x73\x69\164\145" => $site, "\x64\x61\x74\141\142\x61\163\145\x73" => $databases, "\156\165\x6d\142\145\162\x4f\146\x44\141\x74\141\142\x61\163\x65\x55\163\x65\162\163" => $numberOfDatabaseUsers, "\x64\141\164\141\x62\x61\163\145\123\145\x72\166\145\162" => $databaseServerEntity]);
goto d1784;
Dfd10:
}
public function newDatabase(Request $request): Response
{
goto d6b4f;
E1499:
if (!(true === $request->isMethod("\120\117\x53\x54"))) {
goto C9ad2;
}
goto Acaca;
d6b4f:
$site = $this->getSite($request);
goto A9b1b;
f90d7:
$response = $this->handleDatabaseForm($request, $form, $site);
goto Ca970;
d8663:
$databaseEntity = $this->databaseEntityManager->createEntity();
goto D7d86;
Ca970:
if (!(false === is_null($response))) {
goto E1f29;
}
goto B930f;
d94e0:
$form = $this->createDatabaseForm($site, $databaseEntity);
goto E1499;
Cf75a: c9123:
goto a3bb8;
B930f:
return $response;
goto b4bf8;
Ffcf0: C954e:
goto D23f0;
F655e: d492b:
goto D34dc;
D7d86:
$databaseEntity->setSite($siteEntity);
goto d94e0;
fdcb5:
$response = $this->redirect($this->generateUrl("\x63\x6c\x70\x5f\163\151\164\x65\x73"));
goto Ae5cf;
D23f0:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto d8663;
Ae5cf:
goto c9123;
goto Ffcf0;
a3bb8:
return $response;
goto C9391;
A9b1b:
if (false === is_null($site)) {
goto C954e;
}
goto fdcb5;
b4bf8: E1f29:
goto F655e;
bcabd:
if (!(true === $form->isSubmitted())) {
goto d492b;
}
goto f90d7;
D34dc: C9ad2:
goto Db1b4;
Db1b4:
$response = $this->render("\x46\x72\x6f\156\x74\x65\156\x64\x2f\x53\x69\x74\145\x2f\x6e\x65\167\55\144\x61\x74\141\142\x61\x73\x65\56\x68\x74\x6d\x6c\56\164\167\151\x67", ["\163\151\164\145" => $site, "\x66\x6f\162\x6d" => $form->createView(), "\x66\157\162\155\x45\x72\x72\157\162\163" => $this->formErrors]);
goto Cf75a;
Acaca:
$form->handleRequest($request);
goto bcabd;
C9391:
}
private function createDatabaseForm(Site $site, DatabaseEntity $databaseEntity): Form
{
goto Ac9ca;
C5002:
$form->add("\x73\165\x62\x6d\151\164", SubmitType::class, ["\x61\164\x74\x72" => ["\143\x6c\x61\x73\163" => "\x62\164\x6e\x20\142\x74\156\x2d\142\154\165\145\40\x62\x74\156\x2d\154\x67"], "\x6c\141\142\x65\154" => "\101\144\144\40\x44\141\x74\x61\142\141\163\x65"]);
goto Ba203;
Ac9ca:
$form = $this->createForm("\x41\x70\x70\134\x46\x6f\x72\x6d\134\123\151\164\145\x44\x61\x74\x61\142\141\x73\x65\124\171\x70\145", $databaseEntity, ["\x61\143\164\151\x6f\x6e" => $this->generateUrl("\x63\154\x70\137\163\x69\x74\x65\137\x64\x61\x74\141\142\141\163\145\137\x6e\x65\167", ["\x64\157\x6d\x61\x69\156\x4e\x61\x6d\145" => $site->getDomainName()]), "\155\x65\164\x68\x6f\x64" => "\120\117\x53\x54", "\141\164\x74\x72" => []]);
goto C5002;
Ba203:
return $form;
goto C0d87;
C0d87:
}
private function handleDatabaseForm(Request $request, Form $form, Site $site)
{
goto a6eb2;
c79da: D4c55:
goto Db5ce;
dda39: ef037:
goto E68ff;
E68ff:
try {
goto a6dc8;
f7eb0: Cc037:
goto Fb2dc;
D9add:
$databaseUserName = $form->get("\x75\x73\145\x72\x4e\x61\x6d\x65")->getData();
goto D9ab1;
A94d1:
$response = $this->redirect($this->generateUrl("\143\154\x70\x5f\163\151\164\145\x5f\144\x61\x74\141\142\141\x73\x65\137\156\x65\x77", ["\144\x6f\x6d\141\x69\156\x4e\x61\155\x65" => $site->getDomainName()]));
goto Fca19;
C9eb0:
$databaseManager = new DatabaseManager($activeDatabaseServerEntity);
goto d1dc8;
Fb2dc:
$databaseEntity = $form->getData();
goto A8cf4;
adfe9:
$response = $this->redirect($this->generateUrl("\x63\x6c\160\x5f\163\151\x74\145\137\x64\141\x74\141\142\141\x73\145\163", ["\144\x6f\155\141\151\x6e\116\141\x6d\145" => $site->getDomainName()]));
goto D489b;
ff55e:
return $response;
goto C3398;
D489b: aaf2d:
goto ff55e;
d1dc8:
$databaseEntity->setDatabaseServer($activeDatabaseServerEntity);
goto Ebfcd;
A8cf4:
$activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto C9eb0;
Eea07:
$databaseManager->createUser($databaseUserEntity);
goto Aea68;
af87d:
if (false === is_null($siteEntity)) {
goto Cc037;
}
goto A94d1;
D9a14:
$siteEntity = $this->getSiteEntity($domainName);
goto af87d;
d34cd:
$databaseUserEntity->setDatabase($databaseEntity);
goto Cbd42;
Ae0dd:
$databaseUserEntity->setPassword(Crypto::encrypt($databaseUserPassword));
goto C20dc;
B0d82:
$databaseUserEntity->setUserName($databaseUserName);
goto Ae0dd;
C20dc:
$databaseUserEntity->setPermissions(DatabaseUserEntity::PERMISSIONS_READ_WRITE);
goto d34cd;
C3fb8:
$session->getFlashBag()->set("\x73\165\143\x63\145\163\x73", $this->translator->trans("\104\141\x74\141\142\141\163\x65\x20\x68\141\x73\x20\142\x65\145\156\x20\141\144\144\x65\144\x2e"));
goto adfe9;
C33c1:
$eventData = ["\163\151\x74\x65" => $domainName, "\144\x61\164\141\142\x61\x73\x65" => $databaseEntity->getName(), "\x64\141\x74\x61\142\x61\163\x65\x55\x73\145\x72\116\141\x6d\145" => $databaseUserEntity->getUserName()];
goto cf76b;
Aea68:
$this->siteEntityManager->updateEntity($siteEntity);
goto C33c1;
ac089:
$databaseManager->createDatabase($databaseEntity);
goto Eea07;
cf76b:
EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_ADD, $user, $eventData, $request);
goto C3fb8;
Db115:
$databaseUserEntity = $this->databaseUserEntityManager->createEntity();
goto B0d82;
Cbd42:
$databaseEntity->addUser($databaseUserEntity);
goto d62d4;
d62d4:
$siteEntity->addDatabase($databaseEntity);
goto ac089;
Fca19:
goto aaf2d;
goto f7eb0;
D6fc0:
$domainName = $site->getDomainName();
goto D9a14;
a6dc8:
$user = $this->getUser();
goto c2157;
D9ab1:
$databaseUserPassword = $form->get("\165\163\145\x72\120\x61\163\x73\167\157\x72\x64")->getData();
goto Db115;
c2157:
$session = $request->getSession();
goto D6fc0;
Ebfcd:
$databaseEntity->setSite($siteEntity);
goto D9add;
C3398:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\141\x6e\147\x65\162", $this->translator->trans("\101\x6e\x20\x65\162\162\x6f\162\40\x68\x61\163\40\157\143\x63\165\162\162\x65\144\54\x20\x65\162\x72\157\x72\40\155\145\x73\163\141\x67\145\x3a\x20\45\x65\162\x72\157\162\115\145\x73\x73\141\x67\145\x25", ["\x25\x65\x72\x72\x6f\x72\115\x65\163\x73\141\147\145\x25" => $e->getMessage()]));
}
goto c79da;
a6eb2:
if (true === $form->isValid()) {
goto ef037;
}
goto A37ab;
A37ab:
$this->formErrors = $this->getErrorMessages($form);
goto cbb2d;
cbb2d:
goto D4c55;
goto dda39;
Db5ce:
}
public function deleteDatabase(Request $request): Response
{
goto D9cd1;
D7568:
$databaseEntity = $this->databaseEntityManager->findOneByName($databaseName);
goto fabae;
B5e53:
return $response;
goto e13c6;
B53f9:
$response = $this->redirect($this->generateUrl("\143\x6c\160\x5f\x73\151\x74\145\163"));
goto B5e53;
Ca627: C6acf:
goto B53f9;
B1984:
$response = $this->redirect($this->generateUrl("\143\x6c\x70\x5f\x73\x69\x74\x65\137\144\141\x74\x61\142\x61\163\x65\x73", ["\144\x6f\155\x61\151\156\116\x61\155\x65" => $site->getDomainName()]));
goto B66ab;
f3605:
$databaseName = $request->get("\x64\x61\x74\x61\142\141\163\x65\x4e\x61\155\x65");
goto D7568;
fabae:
$siteEntity = $this->getSiteEntity($site->getDomainName());
goto Aff7c;
D9cd1:
$site = $this->getSite($request);
goto Ded5d;
d2680: cef8f:
goto Ca627;
A84a0:
try {
goto A7b1b;
A1dea:
$databaseManager->deleteDatabase($databaseEntity, true);
goto D40c3;
De56e:
EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_DELETE, $user, $eventData, $request);
goto F7426;
D35e5:
$session = $request->getSession();
goto A3fdd;
A3fdd:
$domainName = $site->getDomainName();
goto fe6ab;
Bffc2:
$this->siteEntityManager->updateEntity($siteEntity);
goto A2802;
fe6ab:
$databaseServerEntity = $databaseEntity->getDatabaseServer();
goto Dd998;
F7426:
$session->getFlashBag()->set("\163\165\143\x63\145\x73\x73", $this->translator->trans("\x44\x61\x74\141\142\x61\x73\145\x20\x68\141\163\40\x62\145\145\156\x20\x64\x65\x6c\x65\164\x65\x64\x2e"));
goto E45c4;
A7b1b:
$user = $this->getUser();
goto D35e5;
Dd998:
$databaseManager = new DatabaseManager($databaseServerEntity);
goto A1dea;
A2802:
$eventData = ["\x73\x69\164\x65" => $domainName, "\144\141\x74\x61\x62\141\x73\145" => $databaseEntity->getName()];
goto De56e;
D40c3:
$siteEntity->removeDatabase($databaseEntity);
goto Bffc2;
E45c4:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\x61\x6e\147\x65\x72", $this->translator->trans("\x41\156\40\x65\162\x72\x6f\162\x20\150\x61\163\40\x6f\x63\x63\x75\162\x72\145\x64\54\40\145\x72\162\157\162\40\155\145\x73\163\141\x67\x65\72\40\x25\x65\x72\x72\x6f\162\x4d\x65\x73\x73\x61\147\145\45", ["\x25\145\x72\162\157\x72\x4d\145\x73\x73\x61\147\145\45" => $e->getMessage()]));
}
goto B1984;
Af555:
if (!(false === is_null($site))) {
goto C6acf;
}
goto f3605;
B66ab:
return $response;
goto d2680;
Ded5d:
$this->checkCsrfToken($request, "\x64\x61\x74\x61\x62\141\x73\x65\x2d\144\145\154\145\164\x65");
goto Af555;
Aff7c:
if (!(false === is_null($databaseEntity) && $site->getDomainName() == $databaseEntity->getSite()->getDomainName() && false === is_null($siteEntity))) {
goto cef8f;
}
goto A84a0;
e13c6:
}
public function phpMyAdmin(Request $request): Response
{
goto Aa89c;
Eb42a:
$data = ["\x68\157\x73\164" => $activeDatabaseServerEntity->getHost(), "\x75\163\x65\x72\x4e\x61\155\x65" => $databaseUserEntity->getUserName(), "\x70\x61\x73\x73\167\x6f\162\144" => $databaseUserEntity->getDecryptedPassword(), "\160\157\x72\x74" => $activeDatabaseServerEntity->getPort()];
goto Eac22;
b7a82:
$cookie = new Cookie("\x63\x6c\x70\55\x70\x6d\x61", $encryptedData);
goto ab5e4;
D5869:
if (false === is_null($domainName)) {
goto F908f;
}
goto e856f;
f30da: b547e:
goto aa4cb;
E601a:
if (!(false === is_null($activeDatabaseServerEntity))) {
goto B07b4;
}
goto F470c;
ecb6f:
if (!(false === is_null($databaseEntity) && $site->getDomainName() == $databaseEntity->getSite()->getDomainName())) {
goto A9898;
}
goto ea9cb;
Debf4:
goto E0eec;
goto F4690;
c1d94:
$response->headers->clearCookie("\160\155\141\x41\165\164\x68\x2d\x31\x5f\150\x74\164\160\x73");
goto F7ac1;
B504b:
$phpMyAdminUrl = sprintf("\x68\x74\164\160\x73\72\x2f\57\45\x73\x3a\x25\x73\57\x70\150\x70\x6d\x79\x61\x64\x6d\151\156\x2f\154\x6f\147\x69\x6e\x2e\x70\150\160\x3f\x68\x6f\163\x74\75\x25\x73\x26\x70\157\162\164\75\x25\x73", $request->getHost(), $request->getPort(), $databaseServerHost, $databaseServerPort);
goto ab69e;
Ec1ef: A9898:
goto E89e3;
F0743:
$databaseEntity = $databaseUserEntity->getDatabase();
goto ecb6f;
df7c5:
$response->headers->setCookie($cookie);
goto B1726;
e5cd2:
$databaseUserEntity = $this->databaseUserEntityManager->findOneByUserName($databaseUserName);
goto eb2d2;
aa4cb: E0eec:
goto c51f2;
ab5e4:
$response = new RedirectResponse($phpMyAdminUrl);
goto df7c5;
Eac22:
$data = serialize($data);
goto cd32a;
F470c:
$databaseServerHost = urlencode(base64_encode($activeDatabaseServerEntity->getHost()));
goto d5381;
ea9cb:
$databaseServerHost = urlencode(base64_encode($activeDatabaseServerEntity->getHost()));
goto B5a84;
E27b5:
return $response;
goto ac2f4;
F4690: F908f:
goto b43c5;
c51f2:
$response = $this->redirect($this->generateUrl("\x63\x6c\x70\x5f\x73\151\164\145\163"));
goto E27b5;
B1726:
return $response;
goto Ec1ef;
Bd2b2:
$phpMyAdminUrl = sprintf("\150\x74\164\160\163\x3a\57\x2f\45\x73\72\x25\163\x2f\x70\150\160\x6d\x79\141\x64\x6d\x69\156\57\154\157\147\151\156\x2e\x70\150\x70\77\150\x6f\163\x74\75\x25\x73\x26\160\157\162\x74\75\45\163", $request->getHost(), $request->getPort(), $databaseServerHost, $databaseServerPort);
goto Eb42a;
eb2d2:
$activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto Ce4ba;
E89e3: fd994:
goto f30da;
e856f:
$activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto E601a;
B5a84:
$databaseServerPort = $activeDatabaseServerEntity->getPort();
goto Bd2b2;
D5a95:
return $response;
goto a5ee3;
c2242:
$encryptedData = trim(base64_encode($encryptedData));
goto b7a82;
f9a2d:
if (!(false === is_null($site))) {
goto b547e;
}
goto f40c5;
F7ac1:
$response->headers->clearCookie("\123\151\x67\156\157\156\x53\x65\163\163\151\157\156");
goto D5a95;
b43c5:
$site = $this->getSite($request);
goto f9a2d;
a5ee3: B07b4:
goto Debf4;
A029d:
$response->headers->clearCookie("\x63\x6c\160\x2d\160\155\141");
goto ec6bd;
ec6bd:
$response->headers->clearCookie("\x70\x68\160\x4d\171\x41\x64\x6d\151\x6e\x5f\x68\x74\x74\x70\163");
goto c1d94;
ab69e:
$response = new RedirectResponse($phpMyAdminUrl);
goto A029d;
f40c5:
$databaseUserName = $request->get("\144\141\164\141\x62\x61\163\145\125\x73\x65\x72\116\141\155\145");
goto e5cd2;
d5381:
$databaseServerPort = $activeDatabaseServerEntity->getPort();
goto B504b;
cd32a:
$encryptedData = Crypto::encrypt($data);
goto c2242;
Aa89c:
$domainName = $request->get("\144\157\155\x61\x69\x6e\116\141\x6d\x65");
goto D5869;
Ce4ba:
if (!(false === is_null($activeDatabaseServerEntity) && false === is_null($activeDatabaseServerEntity))) {
goto fd994;
}
goto F0743;
ac2f4:
}
public function phpMyAdminLogout(Request $request)
{
goto D3396;
db3d1:
$response->headers->clearCookie("\x70\x68\160\115\x79\x41\144\155\151\156\x5f\x68\x74\x74\160\x73");
goto Ffe44;
D3396:
$response = $this->redirect($this->generateUrl("\x63\154\160\x5f\x73\x69\164\145\163"));
goto C5ccf;
edd24:
return $response;
goto c95f2;
D5ac3:
$response->headers->clearCookie("\x53\x69\x67\156\x6f\156\123\145\x73\x73\151\x6f\x6e");
goto edd24;
Ffe44:
$response->headers->clearCookie("\160\155\x61\101\x75\164\150\x2d\61\137\x68\164\164\x70\163");
goto D5ac3;
C5ccf:
$response->headers->clearCookie("\143\154\160\55\x70\x6d\x61");
goto db3d1;
c95f2:
}
public function newDatabaseUser(Request $request): Response
{
goto A9386;
B71a2:
$session = $request->getSession();
goto Ce9df;
Efc6e: D9fab:
goto afc24;
afc24:
$response = $this->render("\x46\162\157\156\x74\145\x6e\x64\57\123\151\x74\x65\x2f\x6e\x65\x77\55\144\x61\x74\141\x62\141\x73\x65\55\165\x73\145\x72\56\150\164\x6d\154\x2e\x74\x77\x69\147", ["\163\x69\164\145" => $site, "\144\141\x74\x61\142\141\x73\145\x55\x73\x65\x72" => $databaseUserEntity, "\x64\x61\164\141\142\x61\x73\145\163" => $databases, "\x66\157\x72\x6d" => $form->createView(), "\146\x6f\162\x6d\x45\162\162\x6f\x72\x73" => $this->formErrors]);
goto D889e;
c859e: E3def:
goto Efc6e;
Eb1bc:
$databases = $site->getDatabases();
goto b7881;
f64c7: d46f2:
goto Eb1bc;
B6762:
$form->handleRequest($request);
goto fc6bf;
F0783:
$databaseUserEntity = $this->databaseUserEntityManager->createEntity();
goto E3129;
Ce9df:
$session->getFlashBag()->set("\144\x61\156\x67\x65\x72", $this->translator->trans("\x4e\157\40\144\x61\x74\141\142\x61\163\145\40\x66\157\x75\x6e\x64\73\40\x63\162\145\141\x74\x65\x20\x61\40\144\141\x74\141\x62\x61\163\x65\40\x66\151\x72\x73\164\56"));
goto baea8;
b3bd2: A4514:
goto c859e;
E3129:
$databaseUserEntity->setSite($siteEntity);
goto C3f4a;
B0d6d:
if (false === is_null($site)) {
goto d46f2;
}
goto C5833;
A9386:
$site = $this->getSite($request);
goto B0d6d;
Eb1ca:
return $response;
goto b3bd2;
b7881:
$domainName = $site->getDomainName();
goto Ca760;
baea8:
$response = $this->redirect($this->generateUrl("\143\x6c\160\137\163\151\x74\145\x5f\x64\x61\x74\141\142\141\x73\145\x73", ["\x64\157\155\x61\x69\156\x4e\x61\155\x65" => $site->getDomainName()]));
goto De366;
f171e: D9c67:
goto F0783;
B1f28:
if (!(true === $request->isMethod("\x50\x4f\123\x54"))) {
goto D9fab;
}
goto B6762;
A4e06:
$response = $this->handleDatabaseUserForm($request, $form, $site);
goto Afed5;
De366:
goto b7b11;
goto f171e;
c98d5:
if (count($databases) && false === is_null($siteEntity)) {
goto D9c67;
}
goto B71a2;
Ca760:
$siteEntity = $this->getSiteEntity($domainName);
goto c98d5;
D889e: b7b11:
goto C31fc;
fc6bf:
if (!(true === $form->isSubmitted())) {
goto E3def;
}
goto A4e06;
Afed5:
if (!(false === is_null($response))) {
goto A4514;
}
goto Eb1ca;
fd5e7:
goto C3628;
goto f64c7;
C3f4a:
$form = $this->createDatabaseUserForm($site, $databaseUserEntity);
goto B1f28;
C31fc: C3628:
goto F634b;
C5833:
$response = $this->redirect($this->generateUrl("\143\x6c\x70\x5f\163\x69\x74\x65\x73"));
goto fd5e7;
F634b:
return $response;
goto C6d44;
C6d44:
}
private function createDatabaseUserForm(Site $site, DatabaseUserEntity $databaseUserEntity): Form
{
goto Ac8e4;
Ac8e4:
$form = $this->createForm("\101\x70\160\134\106\157\162\x6d\134\x53\x69\164\145\104\141\164\x61\x62\141\163\145\x55\163\x65\x72\124\171\160\145", $databaseUserEntity, ["\141\143\164\151\157\156" => $this->generateUrl("\143\x6c\x70\x5f\x73\151\x74\x65\137\x64\141\x74\x61\x62\141\163\x65\x5f\165\x73\145\x72\x5f\156\145\167", ["\x64\157\155\x61\151\x6e\116\x61\155\x65" => $site->getDomainName()]), "\x6d\x65\x74\150\157\x64" => "\120\117\x53\x54", "\141\164\x74\x72" => []]);
goto fd6f4;
F40a6:
return $form;
goto Fb73e;
fd6f4:
$form->add("\163\165\142\155\151\164", SubmitType::class, ["\141\164\164\162" => ["\143\154\141\x73\x73" => "\142\164\x6e\x20\142\x74\x6e\x2d\142\x6c\165\x65\x20\x62\x74\x6e\x2d\x6c\x67"], "\154\141\142\x65\154" => "\x41\144\x64\40\104\141\164\x61\142\141\163\145\x20\125\x73\x65\x72"]);
goto F40a6;
Fb73e:
}
private function handleDatabaseUserForm(Request $request, Form $form, Site $site)
{
goto A60e9;
A9ad2: F5553:
goto Ccefd;
A60e9:
if (true === $form->isValid()) {
goto F5553;
}
goto ee965;
Ccefd:
try {
goto F211a;
af8ca:
goto E4108;
goto Dd434;
f503b:
$eventData = ["\x73\151\x74\145" => $domainName, "\144\141\x74\x61\142\141\163\x65\125\163\145\x72\x4e\141\x6d\145" => $databaseUserEntity->getUserName(), "\160\145\162\x6d\151\x73\163\x69\x6f\x6e\163" => $databaseUserEntity->getPermissions(), "\x64\x61\164\141\142\x61\163\145" => $databaseName];
goto Ae8f3;
E876e:
$databaseName = $databaseEntity->getName();
goto f503b;
c8fe7:
$siteEntity = $this->getSiteEntity($domainName);
goto ba527;
b0e44:
$response = $this->redirect($this->generateUrl("\x63\154\x70\x5f\x73\151\x74\145\137\144\141\x74\x61\142\141\x73\145\163", ["\144\157\x6d\141\151\156\116\x61\155\x65" => $site->getDomainName()]));
goto F3607;
eb765:
return $response;
goto f2ee5;
ba527:
if (false === is_null($siteEntity)) {
goto d0136;
}
goto B7379;
a476d:
$session = $request->getSession();
goto e52c2;
Dd434: d0136:
goto dc0dc;
Adc98:
$activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto C8ae4;
bd12e:
$encryptedPassword = Crypto::encrypt($databaseUserEntity->getPassword());
goto E0756;
dc0dc:
$databaseUserEntity = $form->getData();
goto bd12e;
F3607: E4108:
goto eb765;
Ae8f3:
EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_USER_ADD, $user, $eventData, $request);
goto f010b;
F211a:
$user = $this->getUser();
goto a476d;
B7379:
$response = $this->redirect($this->generateUrl("\143\154\x70\x5f\x73\151\x74\x65\137\144\x61\164\141\142\x61\163\x65\x5f\165\163\145\x72\x5f\x6e\145\167", ["\x64\x6f\x6d\141\151\156\116\141\x6d\145" => $site->getDomainName()]));
goto af8ca;
db700:
$databaseManager->createUser($databaseUserEntity);
goto E8f2d;
E8f2d:
$this->databaseUserEntityManager->updateEntity($databaseUserEntity);
goto e0ae1;
E0756:
$databaseUserEntity->setPassword($encryptedPassword);
goto Adc98;
e0ae1:
$databaseEntity = $databaseUserEntity->getDatabase();
goto E876e;
f010b:
$session->getFlashBag()->set("\163\x75\x63\143\x65\x73\163", $this->translator->trans("\x44\x61\x74\x61\142\x61\x73\x65\x20\x55\163\x65\162\x20\x68\x61\x73\40\142\145\x65\156\x20\x61\144\144\x65\144\56"));
goto b0e44;
C8ae4:
$databaseManager = new DatabaseManager($activeDatabaseServerEntity);
goto db700;
e52c2:
$domainName = $site->getDomainName();
goto c8fe7;
f2ee5:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\x64\x61\156\147\145\162", $this->translator->trans("\x41\156\40\145\162\x72\157\x72\40\150\141\x73\40\157\143\143\x75\x72\x72\x65\x64\x2c\40\145\x72\x72\157\162\40\155\x65\163\x73\141\x67\145\x3a\x20\x25\x65\x72\162\x6f\x72\115\x65\163\x73\x61\x67\145\45", ["\45\x65\162\x72\x6f\162\x4d\145\163\x73\x61\x67\145\45" => $e->getMessage()]));
}
goto e3183;
ee965:
$this->formErrors = $this->getErrorMessages($form);
goto Ff16c;
Ff16c:
goto D1585;
goto A9ad2;
e3183: D1585:
goto Fd036;
Fd036:
}
public function editDatabaseUser(Request $request): Response
{
goto d41f6;
C802d:
if (count($databases) && false === is_null($siteEntity)) {
goto A7eb5;
}
goto dc814;
c4ecb: d5902:
goto cc460;
E77e3:
$response = $this->handleDatabaseUserEditForm($request, $form, $site);
goto C1893;
Ed616:
$databaseUserEntity = $this->databaseUserEntityManager->findOneByUserName($databaseUserName);
goto c289d;
dc814:
$session = $request->getSession();
goto a94e3;
cf6f9:
$form->handleRequest($request);
goto A774e;
B057a:
return $response;
goto a99b4;
Fcec3: Ac6f2:
goto f9891;
C17e5:
if (!(true === $request->isMethod("\x50\117\x53\124"))) {
goto Cdae7;
}
goto cf6f9;
E8e26:
$databaseUserEntity->setPassword('');
goto a8481;
c6586:
$domainName = $site->getDomainName();
goto f367a;
D9a01: a98a4:
goto da477;
C1457:
$databaseUserName = $request->get("\x64\x61\164\141\142\x61\163\x65\x55\x73\145\162\x4e\x61\x6d\x65");
goto Ed616;
a83e9:
$response = $this->redirect($this->generateUrl("\143\x6c\160\137\x73\151\164\x65\x5f\x64\141\x74\141\x62\x61\x73\x65\x73", ["\x64\157\x6d\x61\151\x6e\116\x61\155\145" => $site->getDomainName()]));
goto bdfce;
C2d2c:
if (false === is_null($site)) {
goto a98a4;
}
goto e770a;
da477:
$databases = $site->getDatabases();
goto c6586;
Bfaf9:
goto Ac6f2;
goto D9a01;
a99b4: D11a3:
goto c4ecb;
a8481:
$form = $this->createDatabaseUserEditForm($site, $databaseUserEntity);
goto C17e5;
cc460: Cdae7:
goto Ed559;
bdfce:
goto F000a;
goto a6b98;
f9891:
return $response;
goto fefe7;
c289d:
if (!(false === is_null($databaseUserEntity))) {
goto Dd7fe;
}
goto E8e26;
Fa243: Dd7fe:
goto a4010;
a6b98: A7eb5:
goto C1457;
A774e:
if (!(true === $form->isSubmitted())) {
goto d5902;
}
goto E77e3;
a4010: F000a:
goto Fcec3;
Ed559:
$response = $this->render("\x46\162\x6f\x6e\164\x65\156\144\x2f\123\x69\x74\145\57\145\144\x69\164\55\x64\x61\x74\x61\x62\141\163\x65\x2d\165\x73\145\x72\56\150\164\x6d\x6c\x2e\x74\167\x69\x67", ["\163\151\164\145" => $site, "\x64\141\164\x61\142\x61\163\x65\125\163\145\x72" => $databaseUserEntity, "\146\157\162\155" => $form->createView(), "\x66\x6f\x72\x6d\105\162\x72\157\162\163" => $this->formErrors]);
goto Fa243;
e770a:
$response = $this->redirect($this->generateUrl("\x63\154\x70\x5f\x73\151\x74\145\163"));
goto Bfaf9;
f367a:
$siteEntity = $this->getSiteEntity($domainName);
goto C802d;
a94e3:
$session->getFlashBag()->set("\x64\x61\156\147\x65\162", $this->translator->trans("\x4e\x6f\40\144\x61\x74\x61\x62\x61\163\x65\x20\146\x6f\x75\156\x64\73\40\143\162\145\x61\x74\x65\40\x61\40\144\x61\164\141\x62\141\x73\145\40\146\x69\162\x73\164\x2e"));
goto a83e9;
d41f6:
$site = $this->getSite($request);
goto C2d2c;
C1893:
if (!(false === is_null($response))) {
goto D11a3;
}
goto B057a;
fefe7:
}
private function createDatabaseUserEditForm(Site $site, DatabaseUserEntity $databaseUserEntity): Form
{
goto b11da;
bf2b4:
$form->add("\163\x75\x62\155\x69\164", SubmitType::class, ["\x61\x74\x74\162" => ["\x63\x6c\x61\163\x73" => "\142\x74\x6e\40\142\164\x6e\x2d\142\x6c\x75\x65\40\x62\164\x6e\x2d\154\147"], "\x6c\x61\142\x65\154" => "\x53\141\166\x65"]);
goto F8e3a;
F8e3a:
return $form;
goto b544b;
b11da:
$form = $this->createForm("\101\x70\160\x5c\106\157\x72\155\134\x53\151\x74\145\x44\141\164\141\142\141\163\x65\125\x73\x65\162\105\144\151\164\x54\171\160\x65", $databaseUserEntity, ["\x61\x63\164\x69\x6f\156" => $this->generateUrl("\x63\154\x70\x5f\x73\x69\164\x65\x5f\144\141\164\x61\142\141\x73\145\x5f\x75\163\x65\162\x5f\145\x64\x69\x74", ["\144\x6f\x6d\141\x69\x6e\x4e\x61\x6d\x65" => $site->getDomainName(), "\x64\141\164\141\142\141\163\x65\x55\x73\x65\162\x4e\141\x6d\x65" => $databaseUserEntity->getUserName()]), "\155\145\x74\x68\157\x64" => "\120\117\123\x54", "\x61\x74\164\162" => []]);
goto bf2b4;
b544b:
}
private function handleDatabaseUserEditForm(Request $request, Form $form, Site $site)
{
goto f925b;
b8e5a:
$this->formErrors = $this->getErrorMessages($form);
goto F0d29;
f925b:
if (true === $form->isValid()) {
goto d0e62;
}
goto b8e5a;
F0d29:
goto a4874;
goto Dbcd6;
C3726: a4874:
goto eb1c1;
D74d7:
try {
goto B050e;
E8175:
$this->databaseUserEntityManager->updateEntity($databaseUserEntity);
goto Ac37c;
Fe144:
if (false === is_null($siteEntity)) {
goto C11b9;
}
goto bad70;
ad277:
$response = $this->redirect($this->generateUrl("\x63\154\x70\137\x73\x69\x74\x65\137\x64\141\x74\x61\142\141\163\x65\163", ["\x64\x6f\x6d\x61\151\x6e\116\141\155\x65" => $site->getDomainName()]));
goto c7a8a;
b39a4:
$databaseManager = new DatabaseManager($activeDatabaseServerEntity);
goto Bb293;
E583b:
$encryptedPassword = Crypto::encrypt($databaseUserEntity->getPassword());
goto C7795;
c21ba:
$session->getFlashBag()->set("\x73\165\143\x63\145\x73\163", $this->translator->trans("\104\x61\164\141\142\x61\163\x65\x20\125\163\x65\x72\x20\150\x61\163\x20\x62\x65\145\x6e\x20\165\x70\x64\x61\164\145\144\56"));
goto ad277;
c7a8a: e5d1f:
goto a3d7c;
C5362:
$activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto b39a4;
b7bbf:
$eventData = ["\163\151\x74\145" => $domainName, "\144\x61\x74\x61\x62\x61\163\x65\x55\x73\x65\x72\x4e\141\155\x65" => $databaseUserEntity->getUserName(), "\160\x65\162\x6d\x69\x73\163\x69\157\156\163" => $databaseUserEntity->getPermissions(), "\x64\141\164\141\x62\141\163\145" => $databaseName];
goto C81d3;
bad70:
$response = $this->redirect($this->generateUrl("\143\154\x70\137\163\x69\x74\145\137\144\x61\x74\141\142\x61\163\x65\137\x75\163\145\162\x5f\156\x65\x77", ["\144\x6f\155\x61\151\156\116\x61\155\145" => $site->getDomainName()]));
goto E56b6;
Bb293:
$databaseManager->createUser($databaseUserEntity);
goto E8175;
D0f40:
$databaseUserEntity = $form->getData();
goto E583b;
fff5c:
$session = $request->getSession();
goto a0fef;
C7795:
$databaseUserEntity->setPassword($encryptedPassword);
goto C5362;
a3d7c:
return $response;
goto Fcab8;
C81d3:
EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_USER_EDIT, $user, $eventData, $request);
goto c21ba;
B050e:
$user = $this->getUser();
goto fff5c;
eb1c0:
$siteEntity = $this->getSiteEntity($domainName);
goto Fe144;
a0fef:
$domainName = $site->getDomainName();
goto eb1c0;
Ac37c:
$databaseEntity = $databaseUserEntity->getDatabase();
goto a9205;
a9205:
$databaseName = $databaseEntity->getName();
goto b7bbf;
E56b6:
goto e5d1f;
goto Abbc0;
Abbc0: C11b9:
goto D0f40;
Fcab8:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\141\x6e\x67\x65\162", $this->translator->trans("\101\x6e\x20\145\x72\162\157\x72\x20\x68\141\163\x20\x6f\143\143\x75\x72\x72\x65\x64\54\40\145\x72\162\x6f\162\x20\x6d\x65\163\163\141\x67\145\72\x20\x25\x65\162\x72\x6f\x72\x4d\x65\163\x73\x61\147\145\x25", ["\x25\x65\162\162\157\162\115\145\x73\x73\x61\147\x65\45" => $e->getMessage()]));
}
goto C3726;
Dbcd6: d0e62:
goto D74d7;
eb1c1:
}
public function deleteDatabaseUser(Request $request): Response
{
goto dc054;
ef5dd:
$databaseUserName = $request->get("\x64\141\164\x61\x62\x61\x73\145\x55\x73\x65\162\116\x61\x6d\145");
goto C7d48;
A1c85:
$response = $this->redirect($this->generateUrl("\143\154\160\x5f\x73\x69\x74\145\x5f\x64\x61\164\141\x62\x61\163\145\163", ["\144\x6f\x6d\141\151\156\116\x61\x6d\145" => $site->getDomainName()]));
goto C897d;
B05c4:
try {
goto fe7b8;
Ccd37:
$databaseManager->deleteUser($databaseUserEntity);
goto ec093;
A8d39:
$domainName = $site->getDomainName();
goto F14bc;
a4e81:
EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_USER_DELETE, $user, $eventData, $request);
goto dc97c;
dde77:
$session->getFlashBag()->set("\163\x75\143\x63\145\163\163", $this->translator->trans("\x44\141\x74\x61\x62\x61\163\145\40\125\x73\x65\162\40\150\x61\x73\40\142\145\145\156\40\x64\x65\154\145\164\145\144\x2e"));
goto C3a24;
C3a24:
$eventData = ["\163\151\164\x65" => $domainName, "\144\x61\164\141\142\141\x73\145\x55\163\145\162\116\x61\155\145" => $databaseUserName];
goto a4e81;
dc97c: d4581:
goto c1a60;
B06a5:
$databaseManager = new DatabaseManager($activeDatabaseServerEntity);
goto Ccd37;
e4dcf:
$activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto B06a5;
b563b:
$user = $this->getUser();
goto A8d39;
ec093:
$this->databaseUserEntityManager->deleteEntity($databaseUserEntity);
goto dde77;
F14bc:
$session = $request->getSession();
goto e4dcf;
Afbd4:
if (!(false === is_null($databaseEntity) && $site->getDomainName() == $databaseEntity->getSite()->getDomainName())) {
goto d4581;
}
goto b563b;
fe7b8:
$databaseEntity = $databaseUserEntity->getDatabase();
goto Afbd4;
c1a60:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\x64\x61\156\147\145\x72", $this->translator->trans("\x41\156\x20\145\162\x72\x6f\x72\x20\150\x61\163\x20\x6f\x63\x63\x75\x72\162\145\x64\54\40\145\162\x72\157\x72\x20\x6d\145\x73\163\141\147\x65\72\40\x25\145\x72\162\157\162\x4d\x65\163\163\141\147\145\x25", ["\45\145\162\162\157\162\115\x65\x73\163\x61\147\145\45" => $e->getMessage()]));
}
goto A1c85;
C897d:
return $response;
goto B54d0;
C7d48:
$databaseUserEntity = $this->databaseUserEntityManager->findOneByUserName($databaseUserName);
goto e099a;
f97b0: aba43:
goto A8b9b;
A8b9b:
$response = $this->redirect($this->generateUrl("\x63\x6c\x70\x5f\x73\151\x74\145\x73"));
goto Ce61f;
dc054:
$site = $this->getSite($request);
goto E3387;
Ce61f:
return $response;
goto e5b9d;
b9a37:
if (!(false === is_null($site))) {
goto aba43;
}
goto ef5dd;
B54d0: b6b87:
goto f97b0;
e099a:
if (!(false === is_null($databaseUserEntity))) {
goto b6b87;
}
goto B05c4;
E3387:
$this->checkCsrfToken($request, "\x64\141\164\141\x62\141\x73\x65\x2d\x75\x73\145\162\55\144\x65\x6c\145\x74\x65");
goto b9a37;
e5b9d:
}
public function varnishCache(Request $request): Response
{
goto Cd06a;
ad964:
if (false === is_null($site) && true === $site->getVarnishCache()) {
goto f39c7;
}
goto e101c;
f69fb: f39c7:
goto Fa34d;
dc8db:
$purgeCacheForm = $this->createVarnishCachePurgeCacheForm($site);
goto e7eb0;
e7eb0:
if (!(true === $request->isMethod("\x50\x4f\x53\124"))) {
goto b9306;
}
goto B24a7;
e07a4: ee3cb:
goto E97b9;
C306a:
return $response;
goto abb53;
d7b01:
goto ee3cb;
goto f69fb;
Bb6e1:
$response = $this->handleVarnishCachePurgeCacheForm($request, $purgeCacheForm, $site);
goto a754f;
E97b9:
return $response;
goto Ae8a3;
A8c2c: c843f:
goto d0d91;
e5986:
return $response;
goto a9570;
e1216:
$response = $this->handleVarnishCacheSettingsForm($request, $settingsForm, $site);
goto D169f;
D169f:
if (!(false === is_null($response))) {
goto f6d1b;
}
goto e5986;
A035f:
if (!(true === $purgeCacheForm->isSubmitted())) {
goto c843f;
}
goto Bb6e1;
c6b63:
$purgeCacheForm->handleRequest($request);
goto Febe8;
Fa34d:
$varnishCacheSettings = $site->getVarnishCacheSettings();
goto E8955;
a754f:
if (!(false === is_null($response))) {
goto fdd8e;
}
goto C306a;
E8955:
$varnishCacheSettingsData = ["\x69\x73\x45\156\x61\x62\154\x65\144" => true === isset($varnishCacheSettings["\145\156\141\x62\x6c\x65\x64"]) && true === $varnishCacheSettings["\145\x6e\141\142\x6c\x65\x64"] ? true : false, "\163\145\x72\x76\145\162" => true === isset($varnishCacheSettings["\x73\x65\162\x76\145\162"]) ? $varnishCacheSettings["\163\145\162\x76\145\162"] : "\61\62\x37\x2e\60\56\60\56\x31\72\66\x30\x38\x31", "\x63\x61\143\150\x65\x54\x61\147\120\162\145\146\x69\170" => true === isset($varnishCacheSettings["\143\141\x63\x68\x65\124\x61\147\120\x72\x65\146\x69\170"]) ? $varnishCacheSettings["\143\x61\143\150\x65\124\141\147\120\x72\x65\x66\x69\170"] : substr(md5(time()), 0, 4), "\143\x61\x63\150\145\114\151\146\145\x74\x69\155\x65" => true === isset($varnishCacheSettings["\x63\x61\x63\150\x65\x4c\151\x66\x65\x74\151\x6d\x65"]) ? $varnishCacheSettings["\143\x61\x63\x68\x65\x4c\151\146\x65\164\x69\155\x65"] : "\66\x30\x34\x38\x30\60", "\145\170\x63\x6c\165\x64\145\x64\x50\141\162\x61\x6d\x73" => true === isset($varnishCacheSettings["\x65\170\x63\x6c\x75\x64\145\x64\x50\141\162\x61\x6d\x73"]) ? implode("\54", $varnishCacheSettings["\145\x78\x63\x6c\165\x64\x65\144\120\x61\162\x61\155\x73"]) : "\137\137\123\x49\x44\54\x6e\157\103\x61\143\150\x65\x2c", "\145\x78\x63\154\165\x64\x65\163" => true === isset($varnishCacheSettings["\145\170\143\154\x75\x64\x65\163"]) ? implode(PHP_EOL, $varnishCacheSettings["\145\x78\143\154\x75\x64\145\x73"]) : ''];
goto Cdf1a;
e101c:
$response = $this->redirect($this->generateUrl("\x63\154\x70\x5f\163\151\164\145\163"));
goto d7b01;
Cdf1a:
$settingsForm = $this->createVarnishCacheSettingsForm($site, $varnishCacheSettingsData);
goto dc8db;
B24a7:
$settingsForm->handleRequest($request);
goto c6b63;
a9570: f6d1b:
goto E455a;
abb53: fdd8e:
goto A8c2c;
E455a: Bc6fa:
goto A035f;
Cd5fb:
$response = $this->render("\x46\x72\157\x6e\x74\x65\x6e\x64\x2f\123\x69\164\145\57\166\x61\162\x6e\x69\x73\x68\x2d\x63\x61\x63\x68\145\x2e\150\x74\155\154\x2e\x74\167\x69\147", ["\x73\151\x74\x65" => $site, "\163\145\164\164\151\156\147\x73\106\157\162\155" => $settingsForm->createView(), "\160\165\162\x67\x65\103\141\143\150\145\106\157\162\155" => $purgeCacheForm->createView(), "\146\x6f\x72\x6d\105\x72\162\157\x72\x73" => $this->formErrors]);
goto e07a4;
Febe8:
if (!(true === $settingsForm->isSubmitted())) {
goto Bc6fa;
}
goto e1216;
d0d91: b9306:
goto Cd5fb;
Cd06a:
$site = $this->getSite($request);
goto ad964;
Ae8a3:
}
private function createVarnishCacheSettingsForm(Site $site, array $data): Form
{
goto e138e;
e138e:
$form = $this->createForm("\x41\160\x70\x5c\106\x6f\162\155\134\x53\x69\x74\145\126\141\162\x6e\151\x73\150\x43\141\143\150\145\x53\x65\164\164\x69\156\x67\x73\x54\x79\x70\x65", $data, ["\x61\143\x74\151\x6f\x6e" => $this->generateUrl("\143\x6c\x70\137\x73\x69\164\x65\137\166\141\162\x6e\151\x73\150\137\143\141\x63\150\145", ["\x64\157\x6d\141\151\156\x4e\141\155\145" => $site->getDomainName()]), "\155\145\x74\x68\x6f\x64" => "\x50\x4f\123\124", "\x61\164\164\162" => []]);
goto b2873;
b2873:
$form->add("\x73\165\142\155\151\x74", SubmitType::class, ["\x61\164\x74\x72" => ["\x63\154\x61\x73\x73" => "\x62\x74\156\40\x62\164\156\55\142\154\x75\145\40\x62\164\x6e\x2d\x6c\147"], "\154\141\x62\145\154" => "\123\x61\x76\x65"]);
goto f35c0;
f35c0:
return $form;
goto d4d87;
d4d87:
}
private function createVarnishCachePurgeCacheForm(Site $site): Form
{
goto ccbf7;
d8651:
$form->add("\x73\x75\x62\155\x69\x74", SubmitType::class, ["\141\x74\164\162" => ["\143\154\141\x73\163" => "\142\x74\x6e\40\x62\164\x6e\55\x62\x6c\165\145\x20\142\164\x6e\55\154\147"], "\x6c\141\142\145\154" => "\120\x75\162\147\145\40\103\141\x63\150\145"]);
goto bf72c;
ccbf7:
$form = $this->createForm("\x41\x70\160\134\106\x6f\162\155\134\123\x69\164\x65\126\x61\x72\156\x69\x73\x68\103\x61\143\150\145\x50\x75\162\147\145\103\141\x63\150\145\124\171\x70\145", ["\163\x69\164\145" => $site], ["\x61\143\164\x69\157\156" => $this->generateUrl("\x63\154\x70\137\163\151\164\145\137\166\x61\x72\x6e\x69\163\150\137\143\x61\x63\x68\145", ["\144\x6f\155\141\x69\x6e\116\x61\x6d\145" => $site->getDomainName()]), "\x6d\145\x74\x68\x6f\144" => "\x50\117\123\x54", "\141\x74\164\162" => []]);
goto d8651;
bf72c:
return $form;
goto Bf282;
Bf282:
}
private function handleVarnishCacheSettingsForm(Request $request, Form $form, Site $site)
{
goto e321a;
e321a:
if (true === $form->isValid()) {
goto ecfe6;
}
goto d5466;
E426e:
try {
goto F0ad0;
a3a2e:
$siteEntity = $this->getSiteEntity($domainName);
goto Dd98a;
B2425:
EventQueue::addEvent(EventQueue::EVENT_SITE_VARNISH_CACHE_SETTINGS_UPDATE, $user, $eventData, $request);
goto A512f;
Cf9fb:
$site->setVarnishCacheSettings($varnishCacheSettings);
goto dbfda;
fb1d4:
$response = $this->redirect($this->generateUrl("\x63\x6c\160\137\163\x69\x74\x65\163"));
goto C0ada;
c1c92:
$cacheTagPrefix = $form->get("\x63\141\x63\150\x65\x54\x61\147\120\162\x65\146\151\x78")->getData();
goto E8eda;
da5b3:
$siteUpdater->phpSettings();
goto c5768;
f6c99:
$excludes = array_map("\x74\162\x69\155", array_filter(explode(PHP_EOL, trim($form->get("\145\170\x63\x6c\165\x64\x65\163")->getData()))));
goto F73f1;
Bc357:
$user = $this->getUser();
goto cf999;
E8eda:
$excludedParams = array_map("\x74\x72\151\x6d", array_filter(explode("\54", trim($form->get("\145\x78\x63\154\165\144\x65\144\x50\141\162\x61\155\x73")->getData()))));
goto f6c99;
A252b:
$cacheLifetime = $form->get("\x63\x61\x63\150\145\x4c\x69\146\145\x74\x69\155\x65")->getData();
goto c1c92;
E9284:
$response = $this->redirect($this->generateUrl("\143\x6c\160\137\163\151\x74\145\x5f\x76\x61\162\156\151\163\150\137\143\x61\x63\150\145", ["\144\x6f\x6d\x61\x69\x6e\116\141\155\x65" => $site->getDomainName()]));
goto fa4b5;
dbfda:
$siteUpdater = $this->getSiteUpdater($site);
goto B6c76;
fa4b5: ede1d:
goto B6d3c;
F73f1:
$varnishCacheSettings = ["\145\x6e\x61\x62\154\x65\x64" => $isEnabled, "\163\x65\x72\x76\145\162" => $server, "\143\x61\x63\150\145\124\x61\147\x50\x72\x65\x66\x69\x78" => $cacheTagPrefix, "\x63\141\143\x68\145\x4c\x69\146\x65\x74\x69\x6d\145" => $cacheLifetime, "\145\170\143\x6c\165\144\x65\163" => $excludes, "\145\x78\x63\154\x75\x64\145\144\x50\141\162\x61\x6d\163" => $excludedParams];
goto Cf9fb;
Cff07:
$domainName = $site->getDomainName();
goto a3a2e;
B6c76:
$siteUpdater->writeVarnishCacheSettingsFile($varnishCacheSettings);
goto da5b3;
C0ada:
goto ede1d;
goto fe132;
F0ad0:
$session = $request->getSession();
goto Cff07;
c5768:
$eventData = ["\x73\151\164\x65" => $domainName, "\166\141\x72\156\151\163\x68\x43\141\x63\x68\145\x45\x6e\x61\142\154\x65\x64" => $isEnabled, "\x73\x65\162\x76\145\162" => $server, "\x63\x61\x63\150\145\124\141\x67\x50\x72\x65\x66\151\170" => $cacheTagPrefix, "\143\141\x63\150\x65\114\151\146\145\x74\151\x6d\x65" => $cacheLifetime, "\x65\x78\x63\154\165\144\145\x73" => $excludes, "\x65\x78\x63\x6c\165\x64\145\x64\120\141\162\x61\x6d\163" => $excludedParams];
goto B2425;
A512f:
$session->getFlashBag()->set("\163\165\143\143\x65\163\163", $this->translator->trans("\126\141\162\156\151\163\150\40\x43\x61\143\150\145\x20\x53\x65\x74\x74\151\156\147\x73\x20\x68\141\x76\145\x20\x62\145\145\x6e\x20\x73\x61\x76\x65\144\56"));
goto E9284;
Dd98a:
if (false === is_null($siteEntity)) {
goto F8bd6;
}
goto fb1d4;
B6d3c:
return $response;
goto cd571;
fe132: F8bd6:
goto Bc357;
cf999:
$isEnabled = $form->get("\x69\x73\x45\x6e\141\x62\154\145\x64")->getData();
goto Aea49;
Aea49:
$server = $form->get("\163\145\162\166\145\162")->getData();
goto A252b;
cd571:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\x61\x6e\x67\x65\162", $this->translator->trans("\101\156\40\145\x72\162\x6f\162\40\x68\x61\163\x20\157\x63\x63\165\162\x72\145\144\54\40\145\x72\x72\157\162\40\x6d\145\x73\163\141\147\145\x3a\x20\x25\145\x72\162\157\162\x4d\x65\163\x73\141\147\x65\45", ["\x25\x65\x72\x72\157\162\x4d\145\163\x73\141\147\145\x25" => $e->getMessage()]));
}
goto B3f56;
Fc6ab:
goto a7ac6;
goto ec1d2;
B3f56: a7ac6:
goto E4ee0;
ec1d2: ecfe6:
goto E426e;
d5466:
$this->formErrors = $this->getErrorMessages($form);
goto Fc6ab;
E4ee0:
}
private function handleVarnishCachePurgeCacheForm(Request $request, Form $form, Site $site)
{
goto ddb1f;
B89cb:
$this->formErrors = $this->getErrorMessages($form);
goto dc908;
dc908:
goto C3b12;
goto b3dd2;
b3dd2: Bed3c:
goto acd18;
Ea95b: C3b12:
goto C9afe;
ddb1f:
if (true === $form->isValid()) {
goto Bed3c;
}
goto B89cb;
acd18:
try {
goto F23ca;
edf30:
$varnishCacheClient = new VarnishCacheClient();
goto B2868;
Bf518: a2e7c:
goto f565e;
Ce6d8:
$siteEntity = $this->getSiteEntity($domainName);
goto A5448;
d5f9a:
throw new \Exception("\126\141\x72\x6e\x69\163\150\x20\103\x61\143\150\145\40\123\145\x74\x74\151\156\147\x73\x20\143\141\x6e\156\157\x74\x20\x62\145\x20\145\155\160\164\x79\x2e");
goto f32ba;
A5448:
if (false === is_null($siteEntity)) {
goto a2e7c;
}
goto Fba36;
A533d:
goto Fc4fe;
goto Bf518;
bef15:
$response = $this->redirect($this->generateUrl("\143\154\160\x5f\163\151\164\x65\x5f\166\x61\x72\x6e\151\x73\x68\x5f\x63\141\143\150\145", ["\144\x6f\x6d\141\x69\x6e\x4e\x61\x6d\145" => $site->getDomainName()]));
goto bd1bc;
cff52: ff1fb:
goto a8f82;
F092b:
$purgeValues = array_map("\164\162\x69\x6d", array_filter(explode("\x2c", trim($form->get("\166\141\x6c\x75\145")->getData()))));
goto e8e8d;
b775b:
$eventData = ["\163\x69\164\145" => $domainName, "\x76\x61\x6c\165\x65\x73" => implode("\54", $purgeValues)];
goto Bce37;
f32ba:
goto b9004;
goto Efd81;
f565e:
$user = $this->getUser();
goto f39c8;
B2868:
$varnishCacheClient->setServer($varnishCacheSettings["\163\145\x72\x76\145\x72"]);
goto ccbf9;
Fd83a:
return $response;
goto F231c;
bd1bc: Fc4fe:
goto Fd83a;
F23ca:
$session = $request->getSession();
goto b7c63;
f39c8:
$varnishCacheSettings = $site->getVarnishCacheSettings();
goto F092b;
Efd81: d3674:
goto edf30;
a3011:
$session->getFlashBag()->set("\163\x75\143\143\145\x73\x73", $this->translator->trans("\126\141\x72\156\x69\163\150\x20\x43\141\143\x68\145\40\150\x61\163\40\x62\145\145\x6e\x20\160\165\162\x67\x65\x64\56"));
goto bef15;
a8f82: b9004:
goto b775b;
Bce37:
EventQueue::addEvent(EventQueue::EVENT_SITE_VARNISH_CACHE_PURGE, $user, $eventData, $request);
goto a3011;
ccbf9:
foreach ($purgeValues as $purgeValue) {
goto D53e1;
C9e57:
$varnishCacheClient->purgeTag($purgeValue);
goto Cc321;
D53e1:
$purgeValue = trim($purgeValue);
goto A5d16;
b17a1:
if (true === str_starts_with($purgeValue, "\150\164\x74\160")) {
goto E815f;
}
goto C9e57;
B928e: bcf56:
goto C73f3;
A5d16:
if (!(false === empty($purgeValue))) {
goto A812f;
}
goto b17a1;
F598e:
$varnishCacheClient->purgeUrl($purgeValue);
goto ff775;
e536a: E815f:
goto F598e;
ff775: f4dba:
goto f2696;
Cc321:
goto f4dba;
goto e536a;
f2696: A812f:
goto B928e;
C73f3:
}
goto cff52;
b7c63:
$domainName = $site->getDomainName();
goto Ce6d8;
e8e8d:
if (false === empty($purgeValues) && true === isset($varnishCacheSettings["\x73\x65\162\x76\145\x72"]) && false === empty($varnishCacheSettings["\x73\x65\162\166\x65\162"])) {
goto d3674;
}
goto d5f9a;
Fba36:
$response = $this->redirect($this->generateUrl("\143\x6c\160\137\163\x69\x74\145\163"));
goto A533d;
F231c:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\x61\156\x67\145\x72", $this->translator->trans("\101\156\40\145\162\x72\x6f\x72\40\150\x61\x73\40\x6f\143\x63\165\x72\162\x65\x64\54\x20\x65\x72\x72\x6f\x72\x20\155\145\163\x73\141\x67\145\x3a\40\45\x65\162\162\x6f\162\115\x65\x73\x73\141\x67\145\45", ["\x25\145\x72\162\x6f\x72\115\x65\x73\x73\141\147\x65\x25" => $e->getMessage()]));
}
goto Ea95b;
C9afe:
}
public function purgeVarnishCache(Request $request): Response
{
goto Ef874;
A29e0:
$response = $this->redirect($this->generateUrl("\x63\x6c\x70\x5f\163\x69\x74\145\137\x76\x61\162\156\x69\163\x68\137\x63\141\x63\x68\145", ["\x64\157\x6d\x61\151\x6e\x4e\141\155\x65" => $site->getDomainName()]));
goto d4d65;
c5bd3:
return $response;
goto b7fb1;
F4045:
$response = $this->redirect($this->generateUrl("\143\154\x70\x5f\163\151\x74\x65\163"));
goto Fda37;
Fda37:
goto A050f;
goto af73a;
c69a9:
try {
goto A3b0d;
F9f37:
$varnishCacheClient = new VarnishCacheClient();
goto cd308;
d4689:
$session = $request->getSession();
goto Ce349;
a920d:
$varnishCacheClient->purgeHost($domainName);
goto Ff2d6;
f90b7:
$varnishCacheClient->purgeTag($cacheTagPrefix);
goto a920d;
e6640:
$cacheTagPrefix = $varnishCacheSettings["\143\x61\143\x68\x65\x54\x61\147\x50\162\145\146\x69\x78"];
goto F9f37;
C25fe:
$eventData = ["\163\151\x74\145" => $domainName, "\x70\165\x72\147\x65" => "\146\x75\x6c\x6c"];
goto F6535;
cd308:
$varnishCacheClient->setServer($varnishCacheSettings["\163\145\x72\166\145\x72"]);
goto f90b7;
Ff2d6: F98fc:
goto C25fe;
E831e:
$varnishCacheSettings = $site->getVarnishCacheSettings();
goto f9ffe;
F6535:
EventQueue::addEvent(EventQueue::EVENT_SITE_VARNISH_CACHE_PURGE, $user, $eventData, $request);
goto A589d;
Ce349:
$domainName = $site->getDomainName();
goto E831e;
A589d:
$session->getFlashBag()->set("\x73\x75\143\x63\145\163\163", $this->translator->trans("\126\141\x72\x6e\151\x73\x68\40\103\x61\143\x68\x65\40\x68\x61\x73\40\x62\x65\x65\x6e\40\160\165\162\x67\145\x64\56"));
goto A838c;
A3b0d:
$user = $this->getUser();
goto d4689;
f9ffe:
if (!(true === isset($varnishCacheSettings["\163\x65\x72\x76\x65\x72"]) && true === isset($varnishCacheSettings["\x63\x61\143\x68\145\x54\141\x67\x50\x72\x65\146\x69\170"]) && false === empty($varnishCacheSettings["\x63\x61\x63\150\145\x54\141\x67\120\162\145\x66\151\x78"]))) {
goto F98fc;
}
goto e6640;
A838c:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\x64\x61\x6e\x67\145\x72", $this->translator->trans("\101\x6e\40\x65\x72\x72\x6f\x72\x20\150\x61\x73\40\x6f\x63\143\165\x72\162\x65\x64\54\x20\145\x72\x72\157\162\x20\x6d\x65\163\163\141\147\145\72\40\x25\x65\162\x72\157\162\115\x65\163\163\x61\x67\x65\45", ["\x25\x65\x72\x72\157\162\115\145\x73\163\141\x67\145\x25" => $e->getMessage()]));
}
goto A29e0;
da3cd:
if (false === is_null($site)) {
goto b805b;
}
goto F4045;
Ef874:
$site = $this->getSite($request);
goto da3cd;
d4d65:
return $response;
goto d86af;
af73a: b805b:
goto c69a9;
d86af: A050f:
goto c5bd3;
b7fb1:
}
public function vhost(Request $request): Response
{
goto c14e6;
E2ed2:
goto ac9ec;
goto Ffff4;
df750:
$domainName = $site->getDomainName();
goto a6b27;
a1d68:
return $response;
goto Fdeb0;
E560f:
$response = $this->redirect($this->generateUrl("\143\154\x70\137\163\151\164\145\x73"));
goto E2ed2;
D3fea:
if (!(false === empty($vhostTemplate))) {
goto Cd811;
}
goto df750;
dfc38:
$oldVhostTemplate = $siteEntity->getVhostTemplate();
goto a4b30;
Fc93a:
$isCsrfTokenValid = $this->isCsrfTokenValid("\166\150\157\163\164\x2d\165\160\x64\141\164\145", (string)$request->get("\x74\x6f\153\145\156"));
goto B8697;
b918b: F7cc3:
goto c39d2;
a6b27:
$siteEntity = $this->getSiteEntity($domainName);
goto dfc38;
Babae: Cd811:
goto b918b;
A90bf:
if (!(false === is_null($response))) {
goto bfd96;
}
goto C0d6d;
bf467:
if (false === is_null($site)) {
goto A8b7b;
}
goto E560f;
a4b30:
$site->setVhostTemplate($vhostTemplate);
goto ed160;
ed160:
$response = $this->handleVhostUpdate($request, $site, $siteEntity, $oldVhostTemplate);
goto A90bf;
c4da5: A7170:
goto e94df;
f9130: ac9ec:
goto a1d68;
c39d2:
$response = $this->render("\x46\x72\157\x6e\x74\x65\156\144\x2f\x53\151\164\145\57\x76\150\x6f\x73\x74\56\150\164\x6d\154\x2e\x74\167\x69\x67", ["\163\x69\164\x65" => $site]);
goto f9130;
Ffff4: A8b7b:
goto c0747;
B8697:
if (!(false === $isCsrfTokenValid)) {
goto A7170;
}
goto E1b56;
C0d6d:
return $response;
goto d6ce6;
c0747:
if (!(true === $request->isMethod("\x50\x4f\123\x54"))) {
goto F7cc3;
}
goto Fc93a;
c14e6:
$site = $this->getSite($request);
goto bf467;
e94df:
$vhostTemplate = trim($request->get("\166\150\x6f\x73\x74\x2d\x74\145\155\x70\x6c\x61\x74\x65"));
goto D3fea;
d6ce6: bfd96:
goto Babae;
E1b56:
throw new InvalidCsrfTokenException("\124\150\145\40\x43\123\122\x46\x20\x74\x6f\x6b\x65\x6e\40\151\x73\x20\x69\156\x76\x61\154\x69\x64\56");
goto c4da5;
Fdeb0:
}
private function handleVhostUpdate(Request $request, Site $site, SiteEntity $siteEntity, string $oldVhostTemplate)
{
try {
goto Cd1ae;
D1e25:
return $response;
goto A9b48;
Bce9f:
EventQueue::addEvent(EventQueue::EVENT_SITE_VHOST_UPDATE, $user, $eventData, $request);
goto Fb747;
Cbc1c:
$siteUpdater->updateNginxVhostWithRollback();
goto d5c2b;
f61b6:
$this->siteEntityManager->updateEntity($siteEntity);
goto e87df;
B08a5:
$domainName = $site->getDomainName();
goto D1e48;
f4d49:
$eventData = ["\x73\x69\x74\x65" => $domainName, "\166\150\x6f\x73\164" => $vhostTemplate, "\x6f\x6c\x64\x56\150\x6f\x73\164" => $oldVhostTemplate];
goto Bce9f;
e87df:
$session->getFlashBag()->set("\x73\165\x63\143\x65\x73\x73", $this->translator->trans("\x56\x68\157\163\164\40\150\141\163\40\142\x65\x65\x6e\x20\163\x61\166\x65\144\x2e"));
goto f4d49;
Cd1ae:
$user = $this->getUser();
goto f4774;
Fb747:
$response = $this->redirect($this->generateUrl("\x63\x6c\160\x5f\x73\151\x74\145\137\166\x68\x6f\163\x74", ["\144\x6f\155\x61\x69\156\116\x61\155\145" => $domainName]));
goto D1e25;
d5c2b:
$siteEntity->setVhostTemplate($vhostTemplate);
goto f61b6;
D1e48:
$vhostTemplate = $site->getVhostTemplate();
goto f84db;
f4774:
$session = $request->getSession();
goto B08a5;
f84db:
$siteUpdater = $this->getSiteUpdater($site);
goto Cbc1c;
A9b48:
} catch (InvalidVhostException $e) {
$session->getFlashBag()->set("\144\141\156\x67\x65\x72", $this->translator->trans("\x56\150\x6f\163\x74\x20\x69\x73\40\156\157\164\40\166\x61\x6c\x69\x64\x2c\40\145\162\x72\157\x72\x20\155\145\163\x73\141\147\x65\x3a\40\x25\145\162\x72\x6f\162\115\145\163\163\141\147\x65\x25", ["\x25\x65\162\162\x6f\x72\115\145\163\163\x61\x67\145\x25" => $e->getMessage()]));
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\141\x6e\147\x65\162", $this->translator->trans("\x41\x6e\x20\x65\x72\x72\x6f\162\40\x68\141\163\x20\157\143\143\165\162\x72\145\x64\x2c\x20\145\162\x72\157\162\x20\155\145\163\163\141\x67\145\72\40\45\145\162\162\x6f\162\x4d\145\163\x73\141\x67\145\x25", ["\x25\145\x72\x72\x6f\162\115\145\163\163\141\147\x65\45" => $e->getMessage()]));
}
}
public function settings(Request $request): Response
{
goto c46d9;
A5df4:
$response = $this->render("\106\162\157\156\164\145\156\x64\x2f\123\x69\164\x65\x2f\x73\x65\164\164\x69\x6e\147\163\56\x68\164\x6d\x6c\x2e\x74\167\151\x67", $parameters);
goto E132a;
C9b42:
$response = $this->handleDomainSettingsForm($request, $domainSettingsForm, $site);
goto D7ec8;
D08fa:
$domainSettingsForm->handleRequest($request);
goto bb32e;
De021:
$currentNodeSettings = clone $nodejsSettings;
goto c2208;
b4930:
$parameters["\162\x65\x76\145\162\x73\145\120\162\x6f\x78\171\123\145\x74\x74\151\x6e\147\163\x46\x6f\162\x6d"] = $reverseProxySettingsForm->createView();
goto f91b5;
Bfd71: e4b17:
goto C55b4;
d8ce2:
$pythonSettingsForm->handleRequest($request);
goto abed1;
a551e:
return $response;
goto F7123;
F7135: a7fc8:
goto cc13f;
Abf7b:
return $response;
goto c6716;
fd2d4:
$siteDeleteForm->handleRequest($request);
goto B1c6f;
fce17:
$siteDeleteForm = $this->createSiteDeleteForm($site, $siteDeleteData);
goto Afa3b;
Bd372:
if (!(SiteEntity::TYPE_PHP == $site->getType())) {
goto ac30b;
}
goto Ce5ef;
ed064:
if (!(true === $siteUserSettingsForm->isSubmitted())) {
goto ae0b9;
}
goto E7f7c;
A9cb9: B4b9e:
goto Ee023;
E604b:
$pythonSettingsForm = $this->createPythonSettingsForm($site, $pythonSettings);
goto F75cf;
fb425:
if (!(false === is_null($response))) {
goto C2bc5;
}
goto Abf7b;
C55b4:
$parameters["\160\x68\x70\123\x65\164\164\151\x6e\147\163\106\157\162\155"] = $phpSettingsForm->createView();
goto e6d7f;
C1d56: E01f5:
goto f32ef;
A8f45:
$parameters["\156\157\144\x65\152\163\123\x65\164\x74\151\x6e\x67\x73\x46\157\162\x6d"] = $nodejsSettingsForm->createView();
goto d61f5;
f91b5:
unset($parameters["\x70\x61\147\145\123\160\x65\145\x64\123\145\164\x74\x69\x6e\147\x73\106\157\x72\155"]);
goto A29af;
ae1b3: C7f27:
goto Bfd71;
C985d:
if (!(true === $request->isMethod("\120\117\123\x54"))) {
goto ea63a;
}
goto D7a00;
f3aa9:
$reverseProxySettingsForm = $this->createReverseProxySettingsForm($site);
goto C985d;
E5287: Da19a:
goto Bd372;
a4ac2:
$response = null;
goto b5ce1;
Ee023:
$domainSettingsData = ["\144\157\155\x61\x69\156\x4e\x61\x6d\145" => $site->getDomainName(), "\162\x6f\x6f\x74\104\151\162\x65\143\164\157\162\171" => $site->getRootDirectory()];
goto D05bc;
D0375:
return $response;
goto b473a;
b473a: C2770:
goto B9423;
dadcc:
$currentPhpSettings = clone $phpSettings;
goto Fdd90;
D7a00:
$reverseProxySettingsForm->handleRequest($request);
goto b40dd;
Afa3b:
if (!(true === $request->isMethod("\x50\x4f\x53\x54"))) {
goto a7fc8;
}
goto D08fa;
b4fd4:
if (!(true === $nodejsSettingsForm->isSubmitted())) {
goto a3a6e;
}
goto aa1f9;
b40dd:
if (!(true === $reverseProxySettingsForm->isSubmitted())) {
goto Ff12b;
}
goto ebe4b;
Ce5ef:
$phpSettings = $site->getPhpSettings();
goto F912c;
A601e:
$nodejsSettingsForm = $this->createNodejsSettingsForm($site, $nodejsSettings);
goto a53c1;
E3f2e:
$parameters["\160\x79\x74\150\x6f\156\123\145\164\x74\151\156\x67\x73\106\157\x72\x6d"] = $pythonSettingsForm->createView();
goto Bba07;
b0604:
$pythonSettings = $site->getPythonSettings();
goto E604b;
e21a1:
if (!(true === $pageSpeedSettingsForm->isSubmitted())) {
goto a0e06;
}
goto b184a;
c46d9:
$site = $this->getSite($request);
goto b17ef;
aa1f9:
$response = $this->handleNodejsSettingsForm($request, $nodejsSettingsForm, $currentNodeSettings, $site);
goto f70d6;
afefd: Ba23f:
goto F7135;
f260d: ea63a:
goto b4930;
ad0b7:
$siteUserSettingsForm = $this->createSiteUserSettingsForm($site, $siteUserSettingsData);
goto F6e60;
Fa796:
return $response;
goto Dd6a6;
Bba07: E3925:
goto A0bf1;
C3359:
$domainSettingsForm = $this->createDomainSettingsForm($site, $domainSettingsData);
goto ad0b7;
b17ef:
if (false === is_null($site)) {
goto B4b9e;
}
goto D2b0a;
D3a5e: a0e06:
goto e29a8;
c6716: C2bc5:
goto ae1b3;
a9605:
if (!(true === $phpSettingsForm->isSubmitted())) {
goto C7f27;
}
goto F0e2a;
Fdd90:
$phpSettingsForm->handleRequest($request);
goto a9605;
ebe4b:
$response = $this->handleReverseProxySettingsForm($request, $reverseProxySettingsForm, $site);
goto c9109;
cc13f:
$parameters = ["\163\x69\164\145" => $site, "\x64\x6f\155\x61\151\x6e\123\145\164\x74\151\156\147\163\x46\157\x72\155" => $domainSettingsForm->createView(), "\163\x69\164\145\x55\163\145\162\x53\145\164\x74\x69\156\147\x73\x46\x6f\x72\155" => $siteUserSettingsForm->createView(), "\x70\x61\x67\x65\123\160\x65\145\144\x53\145\164\x74\x69\156\x67\163\x46\157\x72\155" => $pageSpeedSettingsForm->createView(), "\x73\151\x74\145\x44\x65\154\145\x74\145\x46\x6f\162\155" => $siteDeleteForm->createView()];
goto ab5dd;
F912c:
$phpSettingsForm = $this->createPhpSettingsForm($site, $phpSettings);
goto D48a5;
D3f0f:
if (!(false === is_null($response))) {
goto b6f4a;
}
goto Fa796;
F6e60:
$pageSpeedSettingsForm = $this->createPageSpeedSettingsForm($site, $pageSpeedSettingsData);
goto fce17;
c9109:
if (!(false === is_null($response))) {
goto cd19f;
}
goto Fe726;
D05bc:
$siteUserSettingsData = ["\x73\x69\x74\x65\x55\163\145\162" => $site->getUser(), "\163\x73\x68\x4b\x65\x79\x73" => $site->getSshKeys()];
goto C79be;
D2b0a:
$response = $this->redirect($this->generateUrl("\x63\x6c\x70\137\x73\x69\x74\145\x73"));
goto e5d8b;
B1c6f:
$pageSpeedSettingsForm->handleRequest($request);
goto a4ac2;
c8805: Ff12b:
goto f260d;
E1bb0:
if (!(SiteEntity::TYPE_PYTHON == $site->getType())) {
goto E3925;
}
goto b0604;
Dd6a6: b6f4a:
goto C1d56;
D5252:
$parameters["\x66\157\x72\155\x45\162\162\157\x72\163"] = $this->formErrors;
goto A5df4;
a53c1:
if (!(true === $request->isMethod("\x50\x4f\123\124"))) {
goto E1e63;
}
goto De021;
b184a:
$response = $this->handlePageSpeedSettingsForm($request, $pageSpeedSettingsForm, $site);
goto D3a5e;
c2574: E1e63:
goto A8f45;
f32ef: eabf9:
goto E3f2e;
F75cf:
if (!(true === $request->isMethod("\120\x4f\x53\x54"))) {
goto eabf9;
}
goto d8ce2;
f70d6:
if (!(false === is_null($response))) {
goto C2770;
}
goto D0375;
F3696: ae0b9:
goto e21a1;
abed1:
if (!(true === $pythonSettingsForm->isSubmitted())) {
goto E01f5;
}
goto e30a0;
bb32e:
$siteUserSettingsForm->handleRequest($request);
goto fd2d4;
F02de: cd19f:
goto c8805;
Fe726:
return $response;
goto F02de;
Be8c7:
$response = $this->handleSiteDeleteForm($request, $siteDeleteForm, $site);
goto B8325;
f9a1a:
$pageSpeedSettingsData = ["\151\x73\x45\156\141\142\154\x65\x64" => $site->getPageSpeedEnabled(), "\x73\x65\164\164\151\x6e\x67\x73" => $site->getPageSpeedSettings()];
goto C3359;
c2208:
$nodejsSettingsForm->handleRequest($request);
goto b4fd4;
e29a8:
if (!(true === $siteDeleteForm->isSubmitted())) {
goto eb273;
}
goto Be8c7;
e5d8b:
goto f1b79;
goto A9cb9;
C79be:
$siteDeleteData = ["\144\157\x6d\141\151\x6e\x4e\141\155\145" => $site->getDomainName()];
goto f9a1a;
E7f7c:
$response = $this->handleSiteUserSettingsForm($request, $siteUserSettingsForm, $site);
goto F3696;
F86c4:
$nodejsSettings = $site->getNodejsSettings();
goto A601e;
e9e79:
if (!(false === is_null($response))) {
goto Ba23f;
}
goto Cb01c;
E132a: f1b79:
goto a551e;
e6d7f: ac30b:
goto E1bb0;
F0e2a:
$response = $this->handlePhpSettingsForm($request, $phpSettingsForm, $currentPhpSettings, $site);
goto fb425;
d61f5:
unset($parameters["\160\141\x67\x65\x53\x70\x65\145\144\123\145\x74\164\151\156\x67\163\106\157\162\155"]);
goto E5287;
b5ce1:
if (!(true === $domainSettingsForm->isSubmitted())) {
goto C38a5;
}
goto C9b42;
D7ec8: C38a5:
goto ed064;
ab5dd:
if (!(SiteEntity::TYPE_NODEJS == $site->getType())) {
goto Da19a;
}
goto F86c4;
Cb01c:
return $response;
goto afefd;
B8325: eb273:
goto e9e79;
e30a0:
$response = $this->handlePythonSettingsForm($request, $pythonSettingsForm, $site);
goto D3f0f;
A29af: D28b5:
goto D5252;
B9423: a3a6e:
goto c2574;
D48a5:
if (!(true === $request->isMethod("\x50\x4f\x53\124"))) {
goto e4b17;
}
goto dadcc;
A0bf1:
if (!(SiteEntity::TYPE_REVERSE_PROXY == $site->getType())) {
goto D28b5;
}
goto f3aa9;
F7123:
}
public function purgePageSpeedCache(Request $request): Response
{
goto F748b;
Dd8f5:
return $response;
goto d75e8;
A482d:
return $response;
goto E5aeb;
fa9f2:
if (false === is_null($site)) {
goto b372d;
}
goto ae168;
B26ec:
goto d9292;
goto d4d3f;
ae168:
$response = $this->redirect($this->generateUrl("\143\154\x70\137\163\151\164\x65\163"));
goto B26ec;
Bc81f:
$response = $this->redirect($this->generateUrl("\x63\154\x70\137\163\151\164\x65\x5f\x73\145\x74\x74\151\156\x67\163", ["\x64\x6f\155\141\x69\156\x4e\x61\155\145" => $site->getDomainName()]));
goto Dd8f5;
d75e8: d9292:
goto A482d;
d4d3f: b372d:
goto B5750;
B5750:
try {
goto C18a2;
C18a2:
$user = $this->getUser();
goto f3f98;
B0a03:
$eventData = ["\163\151\x74\145" => $site->getDomainName()];
goto a5a35;
F7869:
$siteUpdater->purgePageSpeedCache();
goto B0a03;
Fed1d:
$siteUpdater = $this->getSiteUpdater($site);
goto F7869;
ac525:
$session->getFlashBag()->set("\x73\x75\x63\143\145\163\163", $this->translator->trans("\120\141\x67\x65\40\123\160\x65\145\144\40\x43\141\143\x68\x65\x20\x68\141\x73\40\142\145\145\156\40\160\165\x72\x67\145\144\56"));
goto fe556;
f3f98:
$session = $request->getSession();
goto Fed1d;
a5a35:
EventQueue::addEvent(EventQueue::EVENT_SITE_PAGE_SPEED_CACHE_PURGE, $user, $eventData, $request);
goto ac525;
fe556:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\x64\x61\x6e\x67\145\x72", $this->translator->trans("\x41\x6e\x20\145\x72\162\x6f\162\40\x68\x61\x73\40\x6f\143\143\x75\162\162\145\144\x2c\40\x65\162\162\157\162\x20\x6d\x65\x73\163\141\x67\x65\72\x20\45\x65\x72\x72\157\162\x4d\145\x73\x73\x61\147\145\x25", ["\x25\x65\162\162\x6f\162\x4d\145\x73\163\141\x67\145\x25" => $e->getMessage()]));
}
goto Bc81f;
F748b:
$site = $this->getSite($request);
goto fa9f2;
E5aeb:
}
private function createDomainSettingsForm(Site $site, array $data): Form
{
goto aa606;
b7df5:
return $form;
goto e98be;
aa606:
$form = $this->createForm("\x41\x70\x70\134\106\157\162\155\x5c\x53\151\x74\145\x44\x6f\x6d\141\151\x6e\123\x65\x74\x74\x69\156\147\x73\x54\171\160\145", $data, ["\x61\x63\164\151\x6f\156" => $this->generateUrl("\x63\x6c\160\137\163\151\164\145\137\x73\x65\x74\164\x69\x6e\x67\x73", ["\144\157\x6d\141\x69\x6e\116\141\x6d\x65" => $site->getDomainName()]), "\155\x65\x74\150\x6f\144" => "\120\117\x53\x54", "\141\x74\164\162" => []]);
goto fa2a5;
fa2a5:
$form->add("\163\x75\x62\x6d\151\x74", SubmitType::class, ["\x61\164\x74\162" => ["\143\154\141\163\x73" => "\x62\x74\x6e\x20\142\x74\156\55\x62\x6c\x75\x65\x20\x62\x74\156\55\154\147"], "\x6c\141\x62\x65\154" => "\x53\x61\x76\145"]);
goto b7df5;
e98be:
}
private function createSiteUserSettingsForm(Site $site, array $data): Form
{
goto d84ff;
Dc038:
return $form;
goto A78b4;
A0283:
$form->add("\163\x75\x62\155\151\164", SubmitType::class, ["\x61\164\x74\x72" => ["\143\x6c\x61\x73\x73" => "\142\164\x6e\40\x62\164\156\x2d\x62\154\165\x65\40\142\x74\156\55\154\x67"], "\x6c\x61\142\x65\154" => "\x53\141\x76\145"]);
goto Dc038;
d84ff:
$form = $this->createForm("\x41\160\x70\134\x46\157\162\155\x5c\123\151\164\x65\125\x73\145\162\x53\x65\x74\164\151\156\x67\163\124\171\x70\x65", $data, ["\x61\x63\164\x69\x6f\x6e" => $this->generateUrl("\143\154\x70\x5f\x73\x69\164\x65\137\163\x65\164\x74\151\x6e\x67\163", ["\144\x6f\x6d\x61\151\x6e\116\x61\155\x65" => $site->getDomainName()]), "\155\145\x74\150\157\x64" => "\120\x4f\x53\x54", "\141\x74\x74\x72" => []]);
goto A0283;
A78b4:
}
private function createPageSpeedSettingsForm(Site $site, array $data): Form
{
goto F45fc;
Fa72f:
return $form;
goto A656c;
a042d:
$form->add("\163\165\142\x6d\x69\x74", SubmitType::class, ["\x61\164\164\x72" => ["\143\154\141\163\163" => "\142\x74\x6e\x20\x62\164\156\55\x62\154\165\x65\x20\x62\x74\156\x2d\x6c\x67"], "\x6c\141\142\x65\x6c" => "\123\x61\166\145"]);
goto Fa72f;
F45fc:
$form = $this->createForm("\101\x70\160\134\x46\157\162\x6d\x5c\123\151\164\x65\120\141\x67\145\123\160\145\145\x64\x53\x65\164\x74\151\156\147\x73\x54\x79\x70\145", $data, ["\x61\143\164\x69\x6f\156" => $this->generateUrl("\143\x6c\x70\137\x73\151\164\x65\x5f\x73\x65\x74\x74\x69\x6e\x67\x73", ["\144\157\155\141\151\x6e\116\x61\155\145" => $site->getDomainName()]), "\x6d\x65\x74\150\157\x64" => "\120\117\x53\124", "\141\164\164\162" => []]);
goto a042d;
A656c:
}
private function createReverseProxySettingsForm(Site $site): Form
{
goto Bad5c;
Faa2d:
$form->add("\x73\165\x62\x6d\151\164", SubmitType::class, ["\x61\164\x74\x72" => ["\x63\154\141\x73\163" => "\142\x74\x6e\40\142\164\x6e\55\142\154\x75\145\40\x62\164\156\55\x6c\x67"], "\x6c\141\142\145\x6c" => "\x53\x61\x76\145"]);
goto Ffbc1;
B6a80:
$form = $this->createForm("\101\x70\160\x5c\106\x6f\162\155\134\123\151\x74\x65\x52\145\x76\x65\162\163\x65\120\x72\x6f\x78\x79\123\x65\x74\x74\x69\x6e\x67\163\124\171\x70\x65", $data, ["\141\x63\164\x69\157\x6e" => $this->generateUrl("\143\154\160\137\x73\151\x74\x65\x5f\163\x65\x74\164\x69\156\147\163", ["\144\x6f\x6d\x61\151\156\x4e\141\x6d\x65" => $site->getDomainName()]), "\155\145\x74\x68\x6f\144" => "\x50\117\x53\124", "\141\164\164\162" => ["\x69\144" => "\162\145\x76\x65\x72\163\x65\x2d\160\162\x6f\170\x79\55\163\x65\x74\x74\151\156\147\163\x2d\x66\157\162\x6d"]]);
goto Faa2d;
Ffbc1:
return $form;
goto bd5bb;
Bad5c:
$data = ["\162\x65\166\x65\x72\163\x65\x50\162\157\x78\171\125\x72\x6c" => $site->getReverseProxyUrl()];
goto B6a80;
bd5bb:
}
private function createNodejsSettingsForm(Site $site, NodejsSettings $nodejsSettings): Form
{
goto c1908;
c1908:
$form = $this->createForm("\x41\160\160\x5c\x46\157\x72\155\134\x53\x69\164\145\116\x6f\x64\x65\152\163\123\x65\x74\x74\151\x6e\x67\163\x54\x79\160\145", $nodejsSettings, ["\141\x63\x74\x69\157\x6e" => $this->generateUrl("\x63\154\x70\x5f\163\x69\164\145\137\x73\x65\x74\164\151\156\x67\163", ["\x64\x6f\x6d\141\151\156\116\x61\x6d\x65" => $site->getDomainName()]), "\155\145\x74\150\157\144" => "\x50\x4f\x53\x54", "\141\164\x74\162" => ["\151\x64" => "\156\x6f\x64\145\x6a\x73\55\x73\x65\x74\164\151\x6e\147\x73\55\146\157\x72\155"]]);
goto b97d8;
e058b:
return $form;
goto A8dbf;
b97d8:
$form->add("\163\x75\x62\155\151\164", SubmitType::class, ["\x61\x74\x74\x72" => ["\x63\x6c\141\x73\x73" => "\142\x74\x6e\40\142\x74\x6e\x2d\x62\154\x75\x65\40\142\x74\x6e\x2d\x6c\x67"], "\154\141\142\145\x6c" => "\x53\x61\x76\145"]);
goto e058b;
A8dbf:
}
private function createPhpSettingsForm(Site $site, PhpSettings $phpSettings): Form
{
goto Af922;
Af922:
$form = $this->createForm("\x41\x70\x70\x5c\x46\x6f\x72\x6d\x5c\123\x69\164\x65\120\x68\x70\123\x65\x74\x74\151\156\147\x73\x54\171\160\145", $phpSettings, ["\141\143\164\x69\157\x6e" => $this->generateUrl("\143\x6c\160\137\x73\x69\164\145\137\163\145\164\x74\x69\156\x67\163", ["\x64\157\155\141\x69\x6e\x4e\x61\155\x65" => $site->getDomainName()]), "\155\x65\164\150\x6f\x64" => "\120\117\x53\x54", "\x61\x74\x74\162" => []]);
goto ca582;
Fab82:
return $form;
goto A3073;
ca582:
$form->add("\163\165\142\x6d\151\164", SubmitType::class, ["\x61\x74\x74\x72" => ["\143\x6c\141\163\163" => "\142\x74\x6e\40\x62\164\x6e\x2d\x62\154\x75\145\x20\142\x74\156\55\154\147"], "\x6c\141\x62\145\154" => "\123\x61\166\x65"]);
goto Fab82;
A3073:
}
private function createPythonSettingsForm(Site $site, PythonSettings $pythonSettings): Form
{
goto ea37d;
A55de:
$form->add("\x73\165\x62\x6d\151\164", SubmitType::class, ["\141\x74\164\162" => ["\x63\154\x61\x73\163" => "\142\x74\x6e\40\142\x74\156\55\142\x6c\165\x65\x20\142\x74\x6e\x2d\154\147"], "\154\x61\x62\x65\x6c" => "\x53\141\166\x65"]);
goto Ebeaf;
Ebeaf:
return $form;
goto D2b20;
ea37d:
$form = $this->createForm("\x41\160\160\x5c\x46\157\162\x6d\x5c\123\151\164\x65\120\171\x74\150\x6f\x6e\123\145\164\x74\151\156\x67\163\124\x79\160\x65", $pythonSettings, ["\141\x63\x74\x69\157\x6e" => $this->generateUrl("\x63\154\160\x5f\163\x69\x74\145\x5f\163\x65\164\x74\x69\x6e\147\x73", ["\x64\157\155\x61\x69\156\x4e\x61\x6d\x65" => $site->getDomainName()]), "\x6d\x65\x74\150\157\x64" => "\120\x4f\x53\124", "\141\164\x74\162" => []]);
goto A55de;
D2b20:
}
private function createSiteDeleteForm(Site $site, array $data): Form
{
goto E8a98;
af988:
return $form;
goto E96a3;
b27b4:
$form->add("\x73\165\142\x6d\x69\164", SubmitType::class, ["\141\164\164\162" => ["\x63\154\141\x73\x73" => "\x62\x74\156\40\142\164\x6e\55\x62\154\x75\145\x20\x62\x74\156\x2d\x6c\x67", "\x64\151\x73\141\142\154\x65\x64" => "\x64\x69\x73\141\x62\x6c\x65\x64"], "\154\x61\142\x65\x6c" => "\104\x65\154\x65\164\x65\40\x53\x69\164\145"]);
goto af988;
E8a98:
$form = $this->createForm("\x41\160\x70\134\x46\157\x72\x6d\134\123\151\164\145\x44\145\154\x65\164\x65\124\171\x70\145", $data, ["\x61\x63\x74\x69\157\156" => $this->generateUrl("\x63\x6c\x70\x5f\x73\151\x74\x65\137\x73\145\164\164\x69\x6e\147\x73", ["\144\157\x6d\141\151\x6e\116\x61\x6d\x65" => $site->getDomainName()]), "\x6d\145\164\150\x6f\x64" => "\x50\x4f\123\x54", "\x61\164\164\x72" => []]);
goto b27b4;
E96a3:
}
private function handleDomainSettingsForm(Request $request, Form $form, Site $site)
{
goto F0b2b;
bac62: Ce249:
goto a2d40;
a2d40:
try {
goto Ea651;
Eb765:
$session->getFlashBag()->set("\163\165\143\143\x65\x73\163", $this->translator->trans("\x52\157\x6f\164\x20\x44\151\162\x65\143\164\x6f\x72\171\40\150\x61\163\x20\x62\x65\145\156\40\163\x61\166\x65\x64\56"));
goto a9d68;
d853b:
$site->setRootDirectory($rootDirectory);
goto Df22e;
D44e3:
$rootDirectory = rtrim($form->get("\x72\157\x6f\164\x44\x69\162\x65\143\x74\x6f\162\171")->getData(), "\57");
goto d853b;
de4c8:
$siteEntity = $this->getSiteEntity($domainName);
goto bdd2c;
C8d40:
$eventData = ["\x73\151\164\x65" => $domainName, "\162\x6f\157\164\104\151\162\145\143\164\x6f\x72\x79" => $rootDirectory];
goto D577a;
bdd2c:
if (!(false === is_null($siteEntity))) {
goto ee64c;
}
goto D44e3;
Ea651:
$user = $this->getUser();
goto E3b35;
D577a:
EventQueue::addEvent(EventQueue::EVENT_SITE_ROOT_DIRECTORY_UPDATE, $user, $eventData, $request);
goto Eb765;
Df22e:
$siteEntity->setRootDirectory($rootDirectory);
goto f9a35;
E3b35:
$session = $request->getSession();
goto c4d98;
c4d98:
$domainName = $site->getDomainName();
goto de4c8;
f9a35:
$this->siteEntityManager->updateEntity($siteEntity);
goto D5da7;
Cb9a4:
$response = $this->redirect($this->generateUrl("\143\154\x70\137\163\x69\x74\x65\137\163\145\x74\x74\x69\156\x67\163", ["\144\157\155\x61\x69\156\116\x61\x6d\145" => $site->getDomainName()]));
goto c9626;
D5da7:
$siteUpdater = $this->getSiteUpdater($site);
goto b64bc;
a9d68: ee64c:
goto Cb9a4;
b64bc:
$siteUpdater->domainSettings();
goto C8d40;
c9626:
return $response;
goto f4c60;
f4c60:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\x64\x61\x6e\x67\145\x72", $this->translator->trans("\101\x6e\x20\x65\x72\162\x6f\x72\x20\x68\141\163\x20\157\x63\143\x75\162\162\145\x64\54\40\x65\162\x72\x6f\x72\x20\155\x65\163\163\141\147\x65\72\40\45\x65\x72\x72\157\162\x4d\145\x73\163\141\x67\145\x25", ["\45\x65\162\162\x6f\x72\x4d\x65\163\163\x61\x67\x65\45" => $e->getMessage()]));
}
goto be68f;
F2b2b:
$this->formErrors = $this->getErrorMessages($form);
goto caba3;
be68f: ac2c5:
goto Df4fd;
caba3:
goto ac2c5;
goto bac62;
F0b2b:
if (true === $form->isValid()) {
goto Ce249;
}
goto F2b2b;
Df4fd:
}
private function handleSiteUserSettingsForm(Request $request, Form $form, Site $site)
{
goto f9500;
D9855: b61c9:
goto a1c02;
a1c02:
try {
goto f9cf4;
d8c22:
$session->getFlashBag()->set("\x73\165\143\143\x65\x73\x73", $this->translator->trans("\x53\151\x74\145\x20\125\163\145\162\x20\123\x65\164\x74\x69\156\147\163\x20\x68\x61\166\145\40\142\145\145\156\40\x73\141\x76\x65\144\x2e"));
goto F6688;
Df818: E9594:
goto aa145;
bf5e5:
if (!(false === empty($password))) {
goto E9594;
}
goto a2dab;
Dcc30:
$session = $request->getSession();
goto A5461;
A5461:
$domainName = $site->getDomainName();
goto Dce41;
F0279:
$password = trim($form->get("\x70\x61\163\x73\x77\x6f\x72\144")->getData());
goto f2fba;
a7c41:
if (!(false === is_null($siteEntity))) {
goto a8567;
}
goto B2763;
B2763:
$siteUser = $site->getUser();
goto fc1d1;
a4690:
EventQueue::addEvent(EventQueue::EVENT_SITE_USER_SETTINGS_UPDATE, $user, $eventData, $request);
goto d8c22;
a2dab:
$siteUpdater->changeUserPassword($siteUser, $password);
goto Df818;
a0ee2:
return $response;
goto e371f;
e4e41:
$siteUpdater->updateUserSShKeys($siteUser, $sshKeys);
goto bf5e5;
B99dc:
$this->siteEntityManager->updateEntity($siteEntity);
goto D10a6;
Dce41:
$siteEntity = $this->getSiteEntity($domainName);
goto a7c41;
F6688: a8567:
goto F1e5c;
f2fba:
$siteEntity->setSshKeys($sshKeys);
goto B99dc;
D10a6:
$siteUpdater = $this->getSiteUpdater($site);
goto e4e41;
fc1d1:
$sshKeys = trim($form->get("\163\163\x68\x4b\145\171\x73")->getData());
goto F0279;
aa145:
$eventData = ["\x73\x69\164\145" => $domainName, "\x73\x73\x68\x4b\x65\171\163" => $sshKeys];
goto a4690;
F1e5c:
$response = $this->redirect($this->generateUrl("\x63\x6c\160\x5f\163\x69\x74\145\137\x73\145\x74\164\x69\156\147\x73", ["\144\x6f\x6d\141\x69\x6e\116\x61\x6d\145" => $site->getDomainName()]));
goto a0ee2;
f9cf4:
$user = $this->getUser();
goto Dcc30;
e371f:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\x64\x61\156\x67\145\x72", $this->translator->trans("\x41\x6e\40\145\162\162\157\x72\x20\150\x61\163\40\157\143\x63\x75\x72\162\145\144\54\x20\145\162\x72\x6f\x72\x20\x6d\145\x73\x73\x61\x67\x65\72\x20\45\x65\162\x72\157\162\x4d\145\163\x73\141\147\145\45", ["\x25\x65\x72\x72\157\x72\115\145\163\163\x61\x67\145\x25" => $e->getMessage()]));
}
goto c0afd;
c0afd: f9026:
goto Ceff2;
efcf8:
$this->formErrors = $this->getErrorMessages($form);
goto Cb955;
Cb955:
goto f9026;
goto D9855;
f9500:
if (true === $form->isValid()) {
goto b61c9;
}
goto efcf8;
Ceff2:
}
private function handlePageSpeedSettingsForm(Request $request, Form $form, Site $site)
{
goto Ec8d7;
Ec8d7:
if (true === $form->isValid()) {
goto Deeae;
}
goto f86c1;
E4401: e7b64:
goto dafca;
d9088: Deeae:
goto dde72;
dde72:
try {
goto B8cd6;
B8cd6:
$user = $this->getUser();
goto E329f;
aeb51:
return $response;
goto fc128;
e2a6e:
$siteEntity->setPageSpeedEnabled($isEnabled);
goto f68ce;
d14d9:
if (!(false === is_null($siteEntity))) {
goto ab720;
}
goto Ef25c;
A7090:
$this->siteEntityManager->updateEntity($siteEntity);
goto A9869;
A41aa:
$siteUpdater->purgePageSpeedCache();
goto e2a6e;
f68ce:
$siteEntity->setPageSpeedSettings($settings);
goto A7090;
e941c:
$response = $this->redirect($this->generateUrl("\x63\x6c\x70\x5f\x73\x69\164\x65\x5f\163\x65\x74\164\151\x6e\147\x73", ["\144\157\155\141\x69\x6e\x4e\x61\x6d\145" => $site->getDomainName()]));
goto aeb51;
B370f:
$settings = trim($form->get("\163\145\x74\x74\151\156\x67\163")->getData());
goto D66c0;
Ef25c:
$isEnabled = $form->get("\x69\163\x45\156\141\x62\154\145\x64")->getData();
goto B370f;
C0244:
$site->setPageSpeedSettings($settings);
goto d3351;
Aedba:
$domainName = $site->getDomainName();
goto D4207;
E329f:
$session = $request->getSession();
goto Aedba;
D4207:
$siteEntity = $this->getSiteEntity($domainName);
goto d14d9;
a816a:
$session->getFlashBag()->set("\x73\165\x63\143\145\x73\163", $this->translator->trans("\120\141\147\x65\x20\123\x70\145\145\x64\40\x53\x65\164\164\x69\x6e\x67\163\40\x68\141\x76\145\x20\142\145\x65\x6e\x20\x73\141\166\145\144\x2e"));
goto cd53e;
B46bb:
$siteUpdater->updateNginxVhostWithRollback();
goto A41aa;
D66c0:
$site->setPageSpeedEnabled($isEnabled);
goto C0244;
cd53e: ab720:
goto e941c;
d3351:
$siteUpdater = $this->getSiteUpdater($site);
goto B46bb;
A9869:
$eventData = ["\x73\151\x74\145" => $domainName, "\160\x61\147\145\x53\x70\145\145\x64\105\x6e\x61\x62\x6c\145\144" => $isEnabled, "\x70\141\x67\x65\x53\160\145\145\x64\123\x65\x74\164\151\x6e\x67\163" => $settings];
goto D0537;
D0537:
EventQueue::addEvent(EventQueue::EVENT_SITE_PAGE_SPEED_SETTINGS_UPDATE, $user, $eventData, $request);
goto a816a;
fc128:
} catch (InvalidVhostException $e) {
$session->getFlashBag()->set("\x64\141\156\147\x65\162", $this->translator->trans("\120\x61\147\145\x53\x70\x65\x65\144\40\123\x65\x74\164\151\156\147\x20\141\x72\x65\x20\x6e\x6f\164\40\166\x61\x6c\x69\144\x2c\40\145\162\x72\x6f\162\40\155\145\163\x73\x61\147\x65\72\x20\x25\145\162\162\x6f\162\115\145\163\x73\x61\x67\x65\45", ["\45\x65\162\162\157\x72\x4d\x65\x73\163\x61\147\x65\45" => $e->getMessage()]));
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\x64\x61\x6e\x67\145\162", $this->translator->trans("\x41\156\x20\x65\x72\162\157\162\40\150\x61\x73\x20\x6f\x63\x63\x75\x72\162\145\144\54\x20\x65\x72\x72\157\x72\40\155\145\x73\x73\141\x67\145\72\40\x25\145\x72\162\157\162\115\145\x73\163\x61\147\x65\45", ["\45\x65\162\162\x6f\x72\115\145\x73\x73\141\x67\145\x25" => $e->getMessage()]));
}
goto E4401;
dd834:
goto e7b64;
goto d9088;
f86c1:
$this->formErrors = $this->getErrorMessages($form);
goto dd834;
dafca:
}
private function handleSiteDeleteForm(Request $request, Form $form, Site $site)
{
goto b46cd;
b46cd:
if (true === $form->isValid()) {
goto e62c8;
}
goto d8523;
D15e4:
goto fc8ba;
goto A9c7b;
d8523:
$this->formErrors = $this->getErrorMessages($form);
goto D15e4;
Beefe: fc8ba:
goto d8e44;
E9d67:
try {
goto f9dd2;
Db3ad:
$session->getFlashBag()->set("\163\x75\143\143\145\163\163", $this->translator->trans("\x53\x69\164\x65\x20\x68\x61\163\x20\142\x65\x65\156\40\x64\x65\154\145\x74\145\x64\56"));
goto b13ba;
ae9a9:
$siteEntity = $this->getSiteEntity($domainName);
goto f6c51;
D2050:
$siteDeleter->delete();
goto A749d;
f9dd2:
$user = $this->getUser();
goto b5305;
def96:
EventQueue::addEvent(EventQueue::EVENT_SITE_DELETE, $user, $eventData, $request);
goto Db3ad;
Ee228:
return $response;
goto F3d1e;
f6c51:
if (!(false === is_null($siteEntity))) {
goto F4152;
}
goto Fcb26;
b13ba: F4152:
goto B2e19;
B2e19:
$response = $this->redirect($this->generateUrl("\x63\154\160\x5f\x73\x69\164\x65\163"));
goto Ee228;
Fcb26:
$siteDeleter = $this->getSiteDeleter($site);
goto D2050;
b5305:
$session = $request->getSession();
goto be66f;
e7cf4:
$eventData = ["\x73\151\x74\x65" => $domainName, "\x74\171\160\145" => $site->getType()];
goto def96;
A749d:
$this->siteEntityManager->deleteEntity($siteEntity);
goto e7cf4;
be66f:
$domainName = $site->getDomainName();
goto ae9a9;
F3d1e:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\x64\x61\x6e\x67\145\x72", $this->translator->trans("\101\x6e\40\145\162\162\x6f\162\40\150\x61\163\x20\157\143\x63\x75\162\162\x65\x64\x2c\40\145\162\162\157\162\x20\x6d\x65\163\163\141\147\145\72\x20\45\x65\162\162\x6f\x72\x4d\145\163\163\x61\x67\145\x25", ["\x25\145\162\x72\x6f\162\x4d\145\x73\x73\141\x67\x65\x25" => $e->getMessage()]));
}
goto Beefe;
A9c7b: e62c8:
goto E9d67;
d8e44:
}
private function handleNodejsSettingsForm(Request $request, Form $form, NodejsSettings $currentNodejsSettings, Site $site)
{
goto b4beb;
Bedbd: a4581:
goto c368e;
f0370: c426f:
goto b926d;
b4beb:
if (true === $form->isValid()) {
goto c426f;
}
goto edd2e;
edd2e:
$this->formErrors = $this->getErrorMessages($form);
goto Eddea;
b926d:
try {
goto Df1e9;
ee5ee:
$siteUpdater = $this->getSiteUpdater($site);
goto a0a3d;
D7073: fcdee:
goto A6488;
Dee47:
EventQueue::addEvent(EventQueue::EVENT_SITE_NODEJS_SETTINGS_UPDATE, $user, $eventData, $request);
goto cfc84;
b78bc:
if (!(false === is_null($siteEntity))) {
goto a84b1;
}
goto Dd5f5;
A19c9:
$siteEntity = $this->getSiteEntity($domainName);
goto b78bc;
a0a3d:
if (!(true === $hasNodejsVersionChanged)) {
goto fcdee;
}
goto Bcb6f;
Eb99f:
$session = $request->getSession();
goto Dd47d;
Dd5f5:
$nodejsSettings = $form->getData();
goto e02ed;
A6488:
$siteUpdater->nodejsSettings();
goto Caee2;
C100b: a84b1:
goto c3e4f;
Dd47d:
$domainName = $site->getDomainName();
goto A19c9;
F50f4:
$hasNodejsVersionChanged = $currentNodejsSettings->getNodejsVersion() != $nodejsVersion;
goto ee5ee;
e02ed:
$nodejsVersion = $nodejsSettings->getNodejsVersion();
goto F50f4;
e80f3:
$eventData = ["\x73\151\x74\x65" => $domainName, "\156\x6f\x64\145\x6a\163\x56\x65\162\163\x69\x6f\x6e" => $nodejsVersion, "\160\157\162\x74" => $nodejsSettings->getPort()];
goto Dee47;
c3e4f:
$response = $this->redirect($this->generateUrl("\x63\154\160\137\163\151\x74\x65\x5f\163\x65\164\x74\x69\x6e\x67\x73", ["\144\157\155\141\x69\156\116\x61\155\145" => $site->getDomainName()]));
goto D13cf;
Df1e9:
$user = $this->getUser();
goto Eb99f;
Bcb6f:
$siteUpdater->installNodejsVersion();
goto D7073;
D13cf:
return $response;
goto f077f;
Caee2:
$this->siteEntityManager->updateEntity($siteEntity);
goto e80f3;
cfc84:
$session->getFlashBag()->set("\x73\165\x63\x63\x65\x73\163", $this->translator->trans("\116\x6f\x64\x65\x2e\x6a\163\40\x53\x65\x74\164\x69\x6e\x67\163\40\150\141\x76\x65\40\x62\x65\145\156\x20\x73\141\x76\x65\144\56"));
goto C100b;
f077f:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\x61\x6e\x67\x65\162", $this->translator->trans("\x41\156\x20\145\162\x72\x6f\x72\40\150\141\163\40\x6f\x63\143\165\x72\x72\x65\144\x2c\x20\145\162\162\157\162\x20\155\x65\163\163\141\x67\x65\x3a\x20\x25\145\162\x72\x6f\162\115\x65\163\163\x61\147\x65\45", ["\45\x65\x72\x72\x6f\x72\x4d\x65\x73\163\x61\x67\145\45" => $e->getMessage()]));
}
goto Bedbd;
Eddea:
goto a4581;
goto f0370;
c368e:
}
private function handlePythonSettingsForm(Request $request, Form $form, Site $site)
{
goto Ebe23;
Cd199:
$this->formErrors = $this->getErrorMessages($form);
goto e1f08;
b7ab1: b15a0:
goto Af8b8;
e1f08:
goto Bb1d8;
goto b7ab1;
Ebe23:
if (true === $form->isValid()) {
goto b15a0;
}
goto Cd199;
aed49: Bb1d8:
goto f5c2e;
Af8b8:
try {
goto c0b23;
d3d94:
$siteUpdater->writePythonVersionFile();
goto C8aaa;
e8260:
$domainName = $site->getDomainName();
goto ca439;
Fc97b: D1fe4:
goto d4daf;
E62ce:
return $response;
goto Ae765;
C8d5f:
if (!(false === is_null($siteEntity))) {
goto D1fe4;
}
goto D523c;
d4daf:
$response = $this->redirect($this->generateUrl("\x63\x6c\160\137\x73\x69\x74\x65\x5f\163\x65\164\164\151\x6e\147\x73", ["\x64\157\155\141\x69\156\x4e\141\x6d\x65" => $site->getDomainName()]));
goto E62ce;
c0b23:
$user = $this->getUser();
goto Ebbd5;
Dccdc:
$pythonVersion = $pythonSettings->getPythonVersion();
goto A9946;
D523c:
$pythonSettings = $form->getData();
goto Dccdc;
C8aaa:
$siteUpdater->pythonSettings();
goto ffa4a;
a8965:
EventQueue::addEvent(EventQueue::EVENT_SITE_PYTHON_SETTINGS_UPDATE, $user, $eventData, $request);
goto Eae37;
ffa4a:
$this->siteEntityManager->updateEntity($siteEntity);
goto d9b7b;
ca439:
$siteEntity = $this->getSiteEntity($domainName);
goto C8d5f;
d9b7b:
$eventData = ["\x73\x69\164\145" => $domainName, "\160\x79\164\150\157\156\126\145\x72\163\x69\157\156" => $pythonVersion, "\x70\157\x72\x74" => $pythonSettings->getPort()];
goto a8965;
Eae37:
$session->getFlashBag()->set("\x73\165\143\x63\145\x73\163", $this->translator->trans("\x50\171\164\x68\157\x6e\40\x53\x65\x74\164\x69\156\147\x73\40\x68\x61\166\x65\40\142\145\x65\156\40\x73\141\166\x65\144\56"));
goto Fc97b;
A9946:
$siteUpdater = $this->getSiteUpdater($site);
goto d3d94;
Ebbd5:
$session = $request->getSession();
goto e8260;
Ae765:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\141\x6e\x67\x65\162", $this->translator->trans("\x41\x6e\40\x65\162\x72\157\162\x20\x68\141\x73\40\x6f\143\x63\x75\x72\162\x65\x64\54\x20\x65\x72\162\x6f\162\40\155\145\163\x73\141\147\145\72\40\45\145\162\162\157\x72\x4d\145\x73\163\x61\147\x65\x25", ["\x25\x65\162\162\x6f\x72\115\145\x73\163\x61\147\145\45" => $e->getMessage()]));
}
goto aed49;
f5c2e:
}
private function handleReverseProxySettingsForm(Request $request, Form $form, Site $site)
{
goto E045e;
E045e:
if (true === $form->isValid()) {
goto f02ac;
}
goto f8a6f;
b084f: dfc41:
goto c9eb5;
f8a6f:
$this->formErrors = $this->getErrorMessages($form);
goto b7395;
B5aa9:
try {
goto e8aac;
ac4a1:
$reverseProxyUrl = $form->get("\162\x65\166\145\162\163\x65\x50\162\157\170\x79\125\x72\154")->getData();
goto A01b9;
d6f3e:
$response = $this->redirect($this->generateUrl("\143\154\160\137\x73\x69\164\145\137\163\145\x74\x74\x69\156\x67\163", ["\x64\157\155\x61\151\x6e\x4e\141\x6d\x65" => $site->getDomainName()]));
goto b68de;
eb3d9:
$eventData = ["\x73\151\x74\x65" => $domainName, "\x72\x65\166\x65\162\x73\x65\x50\162\x6f\170\x79\x55\162\x6c" => $reverseProxyUrl];
goto C04a3;
A9dcd:
$siteEntity->setReverseProxyUrl($reverseProxyUrl);
goto E3db1;
b68de:
return $response;
goto F3904;
D9779:
$session->getFlashBag()->set("\x73\165\x63\143\145\x73\163", $this->translator->trans("\x52\x65\166\x65\162\x73\145\x20\120\162\157\170\x79\40\x53\x65\164\x74\151\x6e\x67\x73\40\150\x61\166\145\40\x62\x65\x65\x6e\40\163\141\x76\x65\x64\56"));
goto b10f9;
e8aac:
$user = $this->getUser();
goto ca5f2;
Be975:
$siteUpdater->updateNginxVhostWithRollback();
goto D8368;
E3db1:
$siteUpdater = $this->getSiteUpdater($site);
goto Be975;
a2f32:
if (!(false === is_null($siteEntity))) {
goto eac31;
}
goto ac4a1;
D8368:
$this->siteEntityManager->updateEntity($siteEntity);
goto eb3d9;
a04cd:
$domainName = $site->getDomainName();
goto A4366;
b10f9: eac31:
goto d6f3e;
ca5f2:
$session = $request->getSession();
goto a04cd;
C04a3:
EventQueue::addEvent(EventQueue::EVENT_SITE_REVERSE_PROXY_SETTINGS_UPDATE, $user, $eventData, $request);
goto D9779;
A4366:
$siteEntity = $this->getSiteEntity($domainName);
goto a2f32;
A01b9:
$site->setReverseProxyUrl($reverseProxyUrl);
goto A9dcd;
F3904:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\x64\x61\x6e\147\145\x72", $this->translator->trans("\x41\156\x20\x65\x72\x72\157\162\x20\150\141\x73\x20\x6f\143\x63\165\162\x72\145\144\54\40\145\x72\162\157\162\40\155\145\163\x73\141\x67\x65\x3a\x20\45\145\x72\x72\157\x72\x4d\145\x73\x73\x61\147\x65\x25", ["\45\145\x72\x72\x6f\x72\x4d\145\163\x73\141\x67\x65\45" => $e->getMessage()]));
}
goto b084f;
D7637: f02ac:
goto B5aa9;
b7395:
goto dfc41;
goto D7637;
c9eb5:
}
private function handlePhpSettingsForm(Request $request, Form $form, PhpSettings $currentPhpSettings, Site $site)
{
goto ee81b;
f5e30:
$this->formErrors = $this->getErrorMessages($form);
goto f7b24;
E865d: Be1ac:
goto f0ce9;
f0ce9:
try {
goto C93a0;
a633c:
$this->siteEntityManager->updateEntity($siteEntity);
goto da01f;
Bdc58:
$siteEntity = $this->getSiteEntity($domainName);
goto b339a;
F6cfc:
if (!(true === $hasPhpVersionChanged)) {
goto Bc55a;
}
goto F563a;
Af730:
$phpSettings = $form->getData();
goto a5354;
b7c5f:
return $response;
goto Ab3f8;
da01f:
$eventData = ["\x73\151\164\x65" => $domainName, "\160\x68\x70\126\145\162\163\x69\x6f\x6e" => $phpSettings->getPhpVersion(), "\x6d\145\155\157\162\171\x5f\154\x69\155\x69\x74" => $phpSettings->getMemoryLimit(), "\x6d\141\170\x5f\145\x78\145\x63\165\164\x69\x6f\x6e\x5f\164\151\x6d\145" => $phpSettings->getMaxExecutionTime(), "\155\x61\170\x5f\151\x6e\160\x75\164\x5f\164\x69\x6d\x65" => $phpSettings->getMaxInputTime(), "\x6d\141\x78\137\151\156\x70\x75\164\x5f\166\141\x72\163" => $phpSettings->getMaxInputVars(), "\x70\x6f\163\164\137\155\141\x78\137\x73\151\x7a\145" => $phpSettings->getPostMaxSize(), "\165\x70\x6c\157\141\x64\x5f\x6d\141\170\137\x66\151\154\x65\x73\151\172\145" => $phpSettings->getUploadMaxFileSize()];
goto Bb755;
fc89a: Bc55a:
goto Bb1ea;
Bb1ea:
$siteUpdater->phpSettings();
goto a633c;
b339a:
if (!(false === is_null($siteEntity))) {
goto B5d95;
}
goto Af730;
b34eb:
$session = $request->getSession();
goto B09ca;
B09ca:
$domainName = $site->getDomainName();
goto Bdc58;
C93a0:
$user = $this->getUser();
goto b34eb;
b111d:
$response = $this->redirect($this->generateUrl("\143\x6c\160\x5f\x73\151\x74\x65\137\163\145\164\164\x69\156\147\163", ["\144\157\x6d\x61\151\x6e\116\141\155\145" => $site->getDomainName()]));
goto b7c5f;
b6507:
$siteUpdater = $this->getSiteUpdater($site);
goto F6cfc;
F563a:
$siteUpdater->changePhpVersion($currentPhpSettings->getPhpVersion(), $phpSettings->getPhpVersion());
goto fc89a;
a5354:
$hasPhpVersionChanged = $currentPhpSettings->getPhpVersion() != $phpSettings->getPhpVersion();
goto b6507;
Ff663:
$session->getFlashBag()->set("\163\x75\143\143\x65\x73\163", $this->translator->trans("\120\x48\120\x20\x53\x65\164\164\x69\x6e\x67\x73\x20\x68\141\x76\x65\40\142\x65\x65\156\x20\x73\141\x76\145\x64\56"));
goto E7342;
Bb755:
EventQueue::addEvent(EventQueue::EVENT_SITE_PHP_SETTINGS_UPDATE, $user, $eventData, $request);
goto Ff663;
E7342: B5d95:
goto b111d;
Ab3f8:
} catch (\Exception $e) {
$this->logger->exception($e);
$session->getFlashBag()->set("\144\x61\x6e\x67\x65\162", $this->translator->trans("\101\x6e\40\145\x72\x72\x6f\x72\x20\x68\141\x73\x20\157\143\x63\x75\x72\162\x65\144\x2c\40\x65\162\x72\157\162\40\x6d\x65\163\163\141\147\x65\72\40\x25\x65\162\162\x6f\162\115\145\x73\x73\x61\x67\145\45", ["\x25\145\x72\x72\x6f\162\115\x65\163\x73\x61\147\x65\x25" => $e->getMessage()]));
}
goto c5a04;
ee81b:
if (true === $form->isValid()) {
goto Be1ac;
}
goto f5e30;
f7b24:
goto cca0f;
goto E865d;
c5a04: cca0f:
goto Ba106;
Ba106:
}
private function getSite(Request $request): ?Site
{
goto f527e;
E6fc9:
$subdomain = false === empty($subdomain) ? $subdomain : null;
goto C45fd;
Ce11c: f0c48:
goto C4926;
C56e3:
$site->setRegistrableDomain($registrableDomain);
goto C77ff;
a0e4d:
$site->setBasicAuth($siteEntity->getBasicAuth());
goto c514a;
E5cf8:
return null;
goto fbd21;
C77ff:
$site->setSubdomain($subdomain);
goto e96a8;
aed19:
if (!(false === is_null($site))) {
goto E4809;
}
goto Fb6a6;
Fdb29:
$site->setUser($siteEntity->getUser());
goto ea3da;
C29ec:
$site->setSshKeys($siteEntity->getSshKeys());
goto Ebeb8;
c514a:
$site->setBlockedBots($siteEntity->getBlockedBots());
goto F85cf;
E0d66:
$site->setFtpUsers($siteEntity->getFtpUsers());
goto e57a1;
acf65:
$site->setPageSpeedSettings($siteEntity->getPageSpeedSettings());
goto c9c43;
C4926:
return $site;
goto A0a4a;
fd179:
$siteEntity = $this->getSiteEntity($domainName);
goto C67ad;
aaf24:
$site->setDatabases($siteDatabases);
goto f3f59;
ea3da:
$site->setDomainName($siteEntity->getDomainName());
goto C56e3;
C67ad:
$site = null;
goto D8899;
Bf8c9:
switch ($siteType) {
case SiteEntity::TYPE_NODEJS:
goto Bd3d0;
Bd3d0:
$site = new NodejsSite();
goto Cf351;
c79af:
goto efc81;
goto cf4a5;
Cf351:
$site->setNodejsSettings($siteEntity->getNodejsSettings());
goto c79af;
cf4a5:
case SiteEntity::TYPE_STATIC:
$site = new StaticSite();
goto efc81;
case SiteEntity::TYPE_PHP:
goto E9d6c;
E9d6c:
$site = new PhpSite();
goto fda1e;
fda1e:
$site->setPhpSettings($siteEntity->getPhpSettings());
goto ac9ae;
ac9ae:
$site->setVarnishCache($siteEntity->getVarnishCache());
goto A1115;
A1115:
goto efc81;
goto Cf538;
Cf538:
case SiteEntity::TYPE_PYTHON:
goto a3842;
a3842:
$site = new PythonSite();
goto A4dc7;
A4dc7:
$site->setPythonSettings($siteEntity->getPythonSettings());
goto A7cbd;
A7cbd:
goto efc81;
goto e4b7f;
e4b7f:
case SiteEntity::TYPE_REVERSE_PROXY:
goto cf2ff;
cf2ff:
$site = new ReverseProxySite();
goto Ae9b5;
E91e6:
goto efc81;
goto B6ed3;
Ae9b5:
$site->setReverseProxyUrl($siteEntity->getReverseProxyUrl());
goto E91e6;
B6ed3:
}
goto fe8d3;
Fb6a6:
$resolvedDomainName = $this->domainNameParser->resolveDomainName($domainName);
goto f810a;
f509d:
$siteType = $siteEntity->getType();
goto Bf8c9;
Ebeb8:
$site->setVhostTemplate($siteEntity->getVhostTemplate());
goto cb576;
cb576:
$site->setAllowTrafficFromCloudflareOnly($siteEntity->allowTrafficFromCloudflareOnly());
goto d77fc;
e96a8:
$site->setRootDirectory($siteEntity->getRootDirectory());
goto a0e4d;
d77fc:
$site->setPageSpeedEnabled($siteEntity->getPageSpeedEnabled());
goto acf65;
e6b8d:
if (!(UserEntity::ROLE_USER == $user->getRole() && false === $user->hasSite($siteEntity))) {
goto a17b5;
}
goto E5cf8;
f810a:
$registrableDomain = $resolvedDomainName->registrableDomain()->toString();
goto a9a1c;
fb336:
$site->setCronJobs($siteEntity->getCronJobs());
goto E0d66;
fbd21: a17b5:
goto f509d;
e57a1:
$site->setSshUsers($siteEntity->getSshUsers());
goto C29ec;
c7494:
$domainName = $request->get("\144\x6f\x6d\x61\x69\x6e\116\x61\155\x65");
goto fd179;
fe8d3: Fff2d:
goto ce15d;
f3f59:
$site->setCertificate($siteEntity->getCertificate());
goto e14f0;
c9c43: E4809:
goto Ce11c;
e14f0:
$site->setCertificates($siteEntity->getCertificates());
goto fb336;
ce15d: efc81:
goto aed19;
F85cf:
$site->setBlockedIps($siteEntity->getBlockedIps());
goto aaf24;
f527e:
$user = $this->getUser();
goto c7494;
C45fd:
$siteDatabases = $this->getSiteDatabases($siteEntity);
goto Fdb29;
D8899:
if (!(false === is_null($siteEntity))) {
goto f0c48;
}
goto e6b8d;
a9a1c:
$subdomain = $resolvedDomainName->subDomain()->toString();
goto E6fc9;
A0a4a:
}
private function getSiteDatabases(SiteEntity $siteEntity): ?ArrayCollection
{
goto e8452;
e8452:
$siteDatabases = new ArrayCollection();
goto Abab6;
Abab6:
$activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer();
goto A835b;
A4546: f00f3:
goto be60c;
A835b:
$databaseEntities = $siteEntity->getDatabases();
goto B25c0;
be60c:
return $siteDatabases;
goto B904d;
B25c0:
foreach ($databaseEntities as $databaseEntity) {
goto A31bb;
C35f4:
$siteDatabases->add($databaseEntity);
goto f21af;
F3c50:
if (!($databaseServerEntity->getId() == $activeDatabaseServerEntity->getId())) {
goto Fa4b4;
}
goto C35f4;
ab439: dbf93:
goto f1220;
f21af: Fa4b4:
goto ab439;
A31bb:
$databaseServerEntity = $databaseEntity->getDatabaseServer();
goto F3c50;
f1220:
}
goto A4546;
B904d:
}
private function getSiteUpdater(Site $site): ?SiteUpdater
{
goto Dabe0;
A1540:
$siteType = $site->getType();
goto ede87;
E3d0e: c3bb8:
goto f8c99;
e88ad: C0eca:
goto E3d0e;
f8c99:
return $siteUpdater;
goto Efcae;
Dabe0:
$siteUpdater = null;
goto A1540;
ede87:
switch ($siteType) {
case SiteEntity::TYPE_NODEJS:
$siteUpdater = new NodejsSiteUpdater($site);
goto c3bb8;
case SiteEntity::TYPE_STATIC:
$siteUpdater = new StaticSiteUpdater($site);
goto c3bb8;
case SiteEntity::TYPE_PHP:
$siteUpdater = new PhpSiteUpdater($site);
goto c3bb8;
case SiteEntity::TYPE_PYTHON:
$siteUpdater = new PythonSiteUpdater($site);
goto c3bb8;
case SiteEntity::TYPE_REVERSE_PROXY:
$siteUpdater = new ReverseProxySiteUpdater($site);
goto c3bb8;
}
goto e88ad;
Efcae:
}
protected function getSiteDeleter(Site $site): ?SiteDeleter
{
goto efd85;
efd85:
$siteDeleter = null;
goto Cb6f9;
C08aa:
return $siteDeleter;
goto aee59;
C0657: a78d3:
goto C08aa;
Cb6f9:
$siteType = $site->getType();
goto Ea87f;
Ea87f:
switch ($siteType) {
case SiteEntity::TYPE_NODEJS:
$siteDeleter = new NodejsSiteDeleter($site);
goto a78d3;
case SiteEntity::TYPE_STATIC:
$siteDeleter = new StaticSiteDeleter($site);
goto a78d3;
case SiteEntity::TYPE_PHP:
$siteDeleter = new PhpSiteDeleter($site);
goto a78d3;
case SiteEntity::TYPE_PYTHON:
$siteDeleter = new PythonSiteDeleter($site);
goto a78d3;
case SiteEntity::TYPE_REVERSE_PROXY:
$siteDeleter = new ReverseProxySiteDeleter($site);
goto a78d3;
}
goto c43bc;
c43bc: a518e:
goto C0657;
aee59:
}
private function getSiteEntity(string $domainName): ?SiteEntity
{
$siteEntity = $this->siteEntityManager->findOneByDomainName($domainName);
return $siteEntity;
}
}
Function Calls
None |
Stats
MD5 | 7dc75392cf78b87dd610a28069c56be0 |
Eval Count | 0 |
Decode Time | 573 ms |