Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

namespace App\Controller\Frontend; use Symfony\Component\Form\FormError; use Symfony\Compo..

Decoded Output download

<?  namespace App\Controller\Frontend; use Symfony\Component\Form\FormError; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\Form\Extension\Core\Type\ButtonType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Component\HttpFoundation\Cookie; use Symfony\Component\Form\Form; use Twig\Environment as Twig; use Doctrine\Common\Collections\ArrayCollection; use App\Controller\Controller; use App\Event\EventQueue; use App\Service\Crypto; use App\Service\Logger; use App\Site\Site; use App\Site\NodejsSite; use App\Site\StaticSite; use App\Site\PhpSite; use App\Site\PythonSite; use App\Site\ReverseProxySite; use App\Entity\Site as SiteEntity; use App\Entity\NodejsSettings; use App\Entity\PhpSettings; use App\Entity\PythonSettings; use App\Entity\BasicAuth as BasicAuthEntity; use App\Entity\BlockedBot as BlockedBotEntity; use App\Entity\BlockedIp as BlockedIpEntity; use App\Entity\Database as DatabaseEntity; use App\Entity\DatabaseUser as DatabaseUserEntity; use App\Entity\User as UserEntity; use App\Entity\Certificate as CertificateEntity; use App\Entity\CronJob as CronJobEntity; use App\Entity\FtpUser as FtpUserEntity; use App\Entity\SshUser as SshUserEntity; use App\Site\Updater as SiteUpdater; use App\Site\Updater\NodejsSite as NodejsSiteUpdater; use App\Site\Updater\StaticSite as StaticSiteUpdater; use App\Site\Updater\PhpSite as PhpSiteUpdater; use App\Site\Updater\PythonSite as PythonSiteUpdater; use App\Site\Updater\ReverseProxySite as ReverseProxySiteUpdater; use App\Site\Deleter as SiteDeleter; use App\Site\Deleter\NodejsSite as NodejsSiteDeleter; use App\Site\Deleter\StaticSite as StaticSiteDeleter; use App\Site\Deleter\PhpSite as PhpSiteDeleter; use App\Site\Deleter\PythonSite as PythonSiteDeleter; use App\Site\Deleter\ReverseProxySite as ReverseProxySiteDeleter; use App\Database\Manager as DatabaseManager; use App\Entity\Manager\ConfigManager; use App\Entity\Manager\SiteManager as SiteEntityManager; use App\Entity\Manager\BasicAuthManager as BasicAuthEntityManager; use App\Entity\Manager\BlockedIpManager as BlockedIpEntityManager; use App\Entity\Manager\BlockedBotManager as BlockedBotEntityManager; use App\Entity\Manager\CertificateManager as CertificateEntityManager; use App\Entity\Manager\CronJobManager as CronJobEntityManager; use App\Entity\Manager\DatabaseManager as DatabaseEntityManager; use App\Entity\Manager\DatabaseUserManager as DatabaseUserEntityManager; use App\Entity\Manager\DatabaseServerManager as DatabaseServerEntityManager; use App\Entity\Manager\NodejsSettingsManager as NodejsSettingsEntityManager; use App\Entity\Manager\FtpUserManager as FtpUserEntityManager; use App\Entity\Manager\SshUserManager as SshUserEntityManager; 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\Site\Parser\DomainName as DomainNameParser; use App\Site\Nginx\Exception\InvalidVhostException; use App\Site\Ssl\DistinguishedName; use App\Site\Ssl\Generator\RsaKeyGenerator; use App\Site\Ssl\Generator\CsrGenerator; use App\Site\Ssl\PrivateKey; use App\Site\Ssl\LetsEncryptClient; use App\Site\VarnishCache\Client as VarnishCacheClient; 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 fa247; fa247: $this->configManager = $configManager; goto Fe569; C86e9: $this->sshUserEntityManager = $sshUserEntityManager; goto Fd207; Dbdf6: $this->blockedBotEntityManager = $blockedBotEntityManager; goto e844e; Cb97d: parent::__construct($translator, $logger); goto fa3aa; d3fb6: $this->databaseUserEntityManager = $databaseUserEntityManager; goto c508a; Fd207: $this->domainNameParser = $domainNameParser; goto Cb97d; a1d94: $this->ftpUserEntityManager = $ftpUserEntityManager; goto C86e9; e844e: $this->certificateEntityManager = $certificateEntityManager; goto Bbf83; F119d: $this->basicAuthEntityManager = $basicAuthEntityManager; goto Bde08; Fe569: $this->siteEntityManager = $siteEntityManager; goto F119d; Eeccb: $this->databaseEntityManager = $databaseEntityManager; goto d3fb6; Bbf83: $this->cronJobEntityManager = $cronJobEntityManager; goto Eeccb; Bde08: $this->blockedIpEntityManager = $blockedIpEntityManager; goto Dbdf6; c508a: $this->databaseServerEntityManager = $databaseServerEntityManager; goto e5764; e5764: $this->nodejsSettingsEntityManager = $nodejsSettingsEntityManager; goto a1d94; fa3aa: } public function index(Request $request) : Response { goto F4562; Dc335: return $response; goto F0cb4; cf0b6: $response = $this->render("Frontend/Site/index.html.twig", ["user" => $user, "sites" => $sites]); goto Dc335; Acab0: $sites = $this->siteEntityManager->getUserSites($user, ["domainName" => "asc"]); goto cf0b6; F4562: $user = $this->getUser(); goto Acab0; F0cb4: } public function fileManager(Request $request) : Response { goto Ab39b; De5ec: if (false === is_null($site)) { goto Eb883; } goto A2fb4; dd19a: $fileManagerUrl = sprintf("%s/file-manager/", rtrim($request->getSchemeAndHttpHost(), "/")); goto de89a; f83c6: goto Ad03c; goto db930; Ab39b: $site = $this->getSite($request); goto De5ec; b6b33: $locale = $request->getLocale(); goto A1859; A1859: $cookieExpirationDate = new \DateTime("now"); goto a844a; de89a: $response = $this->render("Frontend/Site/file-manager.html.twig", ["site" => $site, "fileManagerUrl" => $fileManagerUrl, "formErrors" => $this->formErrors]); goto F72ec; F72ec: Ad03c: goto a134e; a134e: return $response; goto E018b; A2fb4: $response = $this->redirect($this->generateUrl("clp_sites")); goto f83c6; db930: Eb883: goto a14da; a14da: $siteUser = $site->getUser(); goto E62ca; E62ca: $session = $request->getSession(); goto b6b33; f077a: $session->set("clp-file-manager", $data); goto dd19a; c4c87: $data = ["user" => $siteUser, "locale" => $locale]; goto f077a; a844a: $cookieExpirationDate->modify(sprintf("+%s hours", self::FILE_MANAGER_COOKIE_EXPIRATION)); goto c4c87; E018b: } public function view(Request $request) : Response { goto Dbd80; Dbd80: $domainName = $request->get("domainName"); goto C8a4f; C8a4f: $response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $domainName])); goto D49bf; D49bf: return $response; goto F585b; F585b: } public function logs(Request $request) : Response { goto B6551; C589f: $response = $this->redirect($this->generateUrl("clp_sites")); goto a39bf; a39bf: goto A9d1f; goto Ee3c5; Ffe2a: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto a9885; B6551: $site = $this->getSite($request); goto de2d5; f5ce9: $response = $this->render("Frontend/Site/logs.html.twig", ["site" => $site, "formErrors" => $this->formErrors, "form" => $form->createView()]); goto E14cb; de2d5: if (false === is_null($site)) { goto B98e8; } goto C589f; Fc991: return $response; goto deaaf; Ee3c5: B98e8: goto Ffe2a; E14cb: A9d1f: goto Fc991; a9885: $form = $this->createLogsForm($siteEntity); goto f5ce9; deaaf: } private function createLogsForm(SiteEntity $siteEntity) : Form { goto d1546; deaac: return $form; goto e0811; d1546: $form = $this->createForm("App\Form\SiteLogsType", [], ["action" => $this->generateUrl("clp_site_logs", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]); goto b5f67; b5f67: $form->add("update", ButtonType::class, ["attr" => ["class" => "btn btn-lg btn-blue btn-update"], "label" => "Update"]); goto deaac; e0811: } public function logFileContent(Request $request, Twig $twig) : Response { goto B81d0; fef31: $response = $this->json($data); goto ad557; f1d24: try { goto f39c1; Ea19d: $user = $this->getUser(); goto Cbb8d; C7751: $logfileReader = new LogfileReader($logfile); goto e7e82; Df145: $logMessages = $phpFpmErrorLogParser->parse(); goto F435a; F435a: $logMessagesHtml = $twig->render("Frontend/Site/Logs/php-fpm-error-log-messages.html.twig", ["logMessages" => $logMessages]); goto A28f9; f0eae: $logMessagesHtml = $twig->render("Frontend/Site/Logs/nginx-error-log-messages.html.twig", ["logMessages" => $logMessages]); goto c199f; c4b2d: if ("access.log" == substr($logfileName, 0, 10)) { goto C0695; } goto d3afc; Fa8bf: $logMessages = $nginxAccessLogParser->parse(); goto ef6f0; eb85f: $phpFpmErrorLogParser = new PhpFpmErrorLogParser($logLines); goto Df145; A28f9: A807b: goto C7d3f; e7e82: $logLines = $logfileReader->getLines($numberOfLines); goto a05e0; A7f56: $userTimezone = $user->getTimezone(); goto c4b2d; Bdef8: C0695: goto F7cfb; ef6f0: $logMessagesHtml = $twig->render("Frontend/Site/Logs/nginx-access-log-messages.html.twig", ["logMessages" => $logMessages]); goto D235a; F05c5: $logMessages = $nginxErrorLogParser->parse(); goto f0eae; f39c1: $logfile = sprintf("/home/%s/logs/%s/%s", $site->getUser(), $service, $logfileName); goto C7751; Cbb8d: if (!("nginx" == $service)) { goto E7998; } goto A7f56; d3afc: $nginxErrorLogParser = new NginxErrorLogParser($logLines); goto F05c5; D235a: D2aa1: goto Bf25a; Cfd68: $nginxAccessLogParser->setTimezone($userTimezone->getName()); goto Fa8bf; F7cfb: $nginxAccessLogParser = new NginxAccessLogParser($logLines); goto Cfd68; Bf25a: E7998: goto Dd1ef; C7d3f: $data["logMessagesHtml"] = $logMessagesHtml; goto fcd01; a05e0: $logMessagesHtml = ''; goto Ea19d; c199f: goto D2aa1; goto Bdef8; Dd1ef: if (!("php" == $service)) { goto A807b; } goto eb85f; fcd01: } catch (\Exception $e) { $this->logger->exception($e); } goto C5463; f9d9b: $logfileName = trim($request->get("logFile")); goto Aa049; Aca8c: ba359: goto fef31; c6667: $site = $this->getSite($request); goto f4049; ad557: return $response; goto D5aee; f4049: if (!(false === is_null($site))) { goto ba359; } goto b2c5f; Aa049: $numberOfLines = (int) $request->get("numberOfLines"); goto b3a57; b2c5f: $service = trim($request->get("service")); goto f9d9b; B81d0: $data = []; goto c6667; b3a57: if (!(false === empty($service) && false === empty($logfileName))) { goto A7602; } goto f1d24; C5463: A7602: goto Aca8c; D5aee: } public function loadLogfilesForService(Request $request) : Response { goto C38ca; d8c4e: return $response; goto Ff4c5; B047d: $service = trim($request->get("service")); goto Fdea5; E8cb1: $site = $this->getSite($request); goto d53f5; B222b: try { goto c5e8d; c5e8d: $logfilesDirectory = sprintf("/home/%s/logs/%s/", $site->getUser(), $service); goto Bc4d4; Bc4d4: $logsFinder = new LogsFinder($logfilesDirectory); goto f070c; B45a6: C3cdb: goto B4cbe; Eb6d5: if (!(false === empty($logfiles))) { goto C3cdb; } goto Eccd3; f070c: $logfiles = $logsFinder->getLogfiles(); goto Eb6d5; Eccd3: $data["logfiles"] = $logfiles; goto B45a6; B4cbe: } catch (\Exception $e) { $this->logger->exception($e); } goto Fe3e4; C38ca: $data = []; goto E8cb1; f643b: Bb2c4: goto D163f; D163f: $response = $this->json($data); goto d8c4e; d53f5: if (!(false === is_null($site))) { goto Bb2c4; } goto B047d; Fe3e4: b3c27: goto f643b; Fdea5: if (!(false === empty($service))) { goto b3c27; } goto B222b; Ff4c5: } public function cronJobs(Request $request) : Response { goto B337d; A1c18: goto A00db; goto F3544; fe152: return $response; goto ade30; B337d: $site = $this->getSite($request); goto c2116; Ab54a: $response = $this->render("Frontend/Site/cron-jobs.html.twig", ["site" => $site, "formErrors" => $this->formErrors]); goto bdfd1; bdfd1: A00db: goto fe152; c2116: if (false === is_null($site)) { goto D5553; } goto B4ea1; F3544: D5553: goto Ab54a; B4ea1: $response = $this->redirect($this->generateUrl("clp_sites")); goto A1c18; ade30: } public function newCronJob(Request $request) : Response { goto e658b; d481c: if (!(true === $form->isSubmitted())) { goto Cd1bd; } goto aae55; feba7: $form->handleRequest($request); goto d481c; dbb35: ade81: goto d8b2e; Ace0f: $cronJobEntity = $this->cronJobEntityManager->createEntity(); goto B75a6; bf593: return $response; goto Ac1cb; E4e37: return $response; goto f24b4; f3808: cd6ef: goto E4e37; B34cc: ecf98: goto b6bb7; dda0f: goto cd6ef; goto dbb35; e00bc: if (!(false === is_null($response))) { goto B0072; } goto bf593; Ac1cb: B0072: goto Fa975; Dc3c6: $response = $this->redirect($this->generateUrl("clp_sites")); goto dda0f; aae55: $response = $this->handleCronJobForm($request, $form, $site); goto e00bc; Fa975: Cd1bd: goto B34cc; E6809: $form = $this->createCronJobForm($cronJobEntity); goto E38e5; d8b2e: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto Ace0f; E38e5: if (!(true === $request->isMethod("POST"))) { goto ecf98; } goto feba7; e9e15: if (false === is_null($site)) { goto ade81; } goto Dc3c6; B75a6: $cronJobEntity->setSite($siteEntity); goto E6809; e658b: $site = $this->getSite($request); goto e9e15; b6bb7: $response = $this->render("Frontend/Site/new-cron-job.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]); goto f3808; f24b4: } private function createCronJobForm(CronJobEntity $cronJobEntity) : Form { goto fc358; fc358: $siteEntity = $cronJobEntity->getSite(); goto Dd086; Fc918: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Add Cron Job"]); goto Eb701; Eb701: return $form; goto e6915; Dd086: $form = $this->createForm("App\Form\SiteCronJobType", $cronJobEntity, ["action" => $this->generateUrl("clp_site_cron_job_new", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]); goto Fc918; e6915: } private function handleCronJobForm(Request $request, Form $form, Site $site) { goto B8413; B8413: if (true === $form->isValid()) { goto Be14b; } goto fc6b4; E60fe: try { goto b2619; C297b: $domainName = $site->getDomainName(); goto C6a0f; C6188: $response = $this->redirect($this->generateUrl("clp_sites")); goto F9835; dfa81: $siteUpdater = $this->getSiteUpdater($site); goto ff1bc; c8891: $this->siteEntityManager->updateEntity($siteEntity); goto dfa81; Be4f9: $eventData = ["site" => $domainName, "crontabExpression" => $cronJobEntity->getCrontabExpression()]; goto d37d6; C1486: $response = $this->redirect($this->generateUrl("clp_site_cron_jobs", ["domainName" => $site->getDomainName()])); goto ac55b; df7be: $cronJobEntity = $form->getData(); goto c2fa2; A27ca: cd713: goto Fbcf4; Fbcf4: $user = $this->getUser(); goto df7be; Ee038: $site->setCronJobs($siteEntity->getCronJobs()); goto c8891; f462e: $session->getFlashBag()->set("success", $this->translator->trans("Cron Job has been added.")); goto C1486; d37d6: EventQueue::addEvent(EventQueue::EVENT_SITE_CRON_JOB_ADD, $user, $eventData, $request); goto f462e; bf6be: if (false === is_null($siteEntity)) { goto cd713; } goto C6188; ac55b: Bd0fc: goto A019d; F9835: goto Bd0fc; goto A27ca; b2619: $session = $request->getSession(); goto C297b; C6a0f: $siteEntity = $this->getSiteEntity($domainName); goto bf6be; A019d: return $response; goto a77a2; c2fa2: $siteEntity->addCronJob($cronJobEntity); goto Ee038; ff1bc: $siteUpdater->updateUserCrontab(); goto Be4f9; a77a2: } 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 A837a; fc6b4: $this->formErrors = $this->getErrorMessages($form); goto Bcc04; Bcc04: goto B9e92; goto c2605; c2605: Be14b: goto E60fe; A837a: B9e92: goto ba161; ba161: } public function deleteCronJob(Request $request) : Response { goto e2f20; e2f20: $site = $this->getSite($request); goto Bab64; Fa1d9: e9e31: goto d8493; d8493: $response = $this->redirect($this->generateUrl("clp_sites")); goto b43d0; Bab64: if (!(false === is_null($site))) { goto e9e31; } goto Aa09d; b43d0: return $response; goto C3b28; Aa09d: try { goto b4ab8; c9182: EventQueue::addEvent(EventQueue::EVENT_SITE_CRON_JOB_DELETE, $user, $evenData, $request); goto Ca448; ea925: if (!($siteEntity->getDomainName() == $cronJobSiteEntity->getDomainName())) { goto ac65d; } goto A230b; C8bc1: $domainName = $site->getDomainName(); goto fa43e; a501d: $cronJobEntity = $this->cronJobEntityManager->findOneById($id); goto E4e6f; ffe5a: $site->setCronJobs($siteEntity->getCronJobs()); goto E8988; E8988: $this->siteEntityManager->updateEntity($siteEntity); goto C511a; B0363: $response = $this->redirect($this->generateUrl("clp_site_cron_jobs", ["domainName" => $site->getDomainName()])); goto B11ff; b4ab8: $session = $request->getSession(); goto a4016; E73af: $siteUpdater->updateUserCrontab(); goto e8575; d5f5c: ac65d: goto b8540; e8575: $evenData = ["site" => $domainName, "command" => $cronJobEntity->getCommand()]; goto c9182; E4e6f: if (!(false === is_null($siteEntity) && false === is_null($cronJobEntity))) { goto d864a; } goto a0a75; b02ab: $siteEntity->removeCronJob($cronJobEntity); goto ffe5a; A230b: $user = $this->getUser(); goto b02ab; a0a75: $cronJobSiteEntity = $cronJobEntity->getSite(); goto ea925; Ca448: $session->getFlashBag()->set("success", $this->translator->trans("Cron Job has been deleted.")); goto B0363; C511a: $siteUpdater = $this->getSiteUpdater($site); goto E73af; b8540: d864a: goto Ffcb1; B11ff: return $response; goto d5f5c; fa43e: $siteEntity = $this->getSiteEntity($domainName); goto a501d; a4016: $id = (int) $request->get("id"); goto C8bc1; Ffcb1: } 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 Fa1d9; C3b28: } public function editCronJob(Request $request) : Response { goto C3c91; d8402: if (!(true === $request->isMethod("POST"))) { goto Ec8eb; } goto Cee2d; fadd6: return $response; goto e8c25; E6d59: a048d: goto fadd6; c2cbe: goto a048d; goto E30be; B4f18: if (!(false === is_null($response))) { goto D8e68; } goto a5e02; E30be: fa035: goto A3b67; c4704: if (!(true === $form->isSubmitted())) { goto Cb440; } goto e3d52; c4f43: D8e68: goto b18b5; d07d5: $response = $this->redirect($this->generateUrl("clp_sites")); goto c2cbe; b3fd8: $site = $this->getSite($request); goto F8e26; B7cf0: $response = $this->render("Frontend/Site/edit-cron-job.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]); goto E6d59; e3d52: $response = $this->handleCronJobEditForm($request, $form, $site); goto B4f18; b18b5: Cb440: goto f2db1; f2db1: Ec8eb: goto B7cf0; a5e02: return $response; goto c4f43; Cee2d: $form->handleRequest($request); goto c4704; F8e26: $cronJobEntity = $this->cronJobEntityManager->findOneById($id); goto D27f6; C3c91: $id = (int) $request->get("id"); goto b3fd8; D27f6: if (false === is_null($cronJobEntity) && false === is_null($site) && $cronJobEntity->getSite()->getDomainName() == $site->getDomainName()) { goto fa035; } goto d07d5; A3b67: $form = $this->createCronJobEditForm($cronJobEntity); goto d8402; e8c25: } private function createCronJobEditForm(CronJobEntity $cronJobEntity) : Form { goto a5d83; f99b0: return $form; goto d900f; a5d83: $siteEntity = $cronJobEntity->getSite(); goto ad988; E6f46: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]); goto f99b0; ad988: $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 E6f46; d900f: } private function handleCronJobEditForm(Request $request, Form $form, Site $site) { goto A62f1; Ee476: Acd69: goto ea083; Fdb5a: try { goto Af7d7; c1490: F7934: goto b7198; cc149: $siteEntity = $this->getSiteEntity($domainName); goto b5ec6; C7ac1: goto F7934; goto f4b1a; ac576: $siteUpdater->updateUserCrontab(); goto ff868; e54f4: $response = $this->redirect($this->generateUrl("clp_site_cron_jobs", ["domainName" => $site->getDomainName()])); goto c1490; E9ea3: EventQueue::addEvent(EventQueue::EVENT_SITE_CRON_JOB_EDIT, $user, $eventData, $request); goto eaf45; ae98a: $user = $this->getUser(); goto ad0e9; ff868: $eventData = ["site" => $domainName, "crontabExpression" => $cronJobEntity->getCrontabExpression()]; goto E9ea3; c7372: $siteUpdater = $this->getSiteUpdater($site); goto ac576; Af7d7: $session = $request->getSession(); goto A72e7; A72e7: $domainName = $site->getDomainName(); goto cc149; c2055: $site->setCronJobs($siteEntity->getCronJobs()); goto daab7; daab7: $this->siteEntityManager->updateEntity($siteEntity); goto c7372; b5ec6: if (false === is_null($siteEntity)) { goto e5cf1; } goto f8870; Fd217: $siteEntity->addCronJob($cronJobEntity); goto c2055; b7198: return $response; goto d2383; ad0e9: $cronJobEntity = $form->getData(); goto Fd217; eaf45: $session->getFlashBag()->set("success", $this->translator->trans("Cron Job has been saved.")); goto e54f4; f4b1a: e5cf1: goto ae98a; f8870: $response = $this->redirect($this->generateUrl("clp_sites")); goto C7ac1; d2383: } 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 Ee476; C69fa: $this->formErrors = $this->getErrorMessages($form); goto F590f; a9de5: f28e3: goto Fdb5a; A62f1: if (true === $form->isValid()) { goto f28e3; } goto C69fa; F590f: goto Acd69; goto a9de5; ea083: } public function users(Request $request) : Response { goto E7aac; ae8ba: $response = $this->redirect($this->generateUrl("clp_sites")); goto e6d2a; b9974: a6141: goto efc63; bdeb0: if (false === is_null($site)) { goto a6141; } goto ae8ba; e6d2a: goto Cc97b; goto b9974; fe0b1: return $response; goto Fc07d; E7aac: $site = $this->getSite($request); goto bdeb0; D959a: Cc97b: goto fe0b1; efc63: $response = $this->render("Frontend/Site/users.html.twig", ["site" => $site, "formErrors" => $this->formErrors]); goto D959a; Fc07d: } public function newFtpUser(Request $request) : Response { goto Cf882; Cbc84: if (!(true === $form->isSubmitted())) { goto B5a00; } goto e11f3; e11f3: $response = $this->handleFtpUserForm($request, $form, $site); goto c6be0; Cf882: $site = $this->getSite($request); goto da21f; B79e9: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto b1496; a1022: $ftpUserEntity->setSite($siteEntity); goto F6394; Ffa81: $response = $this->render("Frontend/Site/new-ftp-user.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]); goto b3c09; da21f: if (false === is_null($site)) { goto C3b35; } goto bf85f; fc0b0: B5a00: goto Ed0bb; b27b3: ab797: goto fc0b0; b3c09: d1c33: goto f7aa3; f3b6c: goto d1c33; goto Dfaad; F04ef: return $response; goto b27b3; Dfaad: C3b35: goto B79e9; bf85f: $response = $this->redirect($this->generateUrl("clp_sites")); goto f3b6c; f7aa3: return $response; goto a455b; D3e45: if (!(true === $request->isMethod("POST"))) { goto F7e3d; } goto ab888; F6394: $form = $this->createFtpUserForm($ftpUserEntity); goto D3e45; Ed0bb: F7e3d: goto Ffa81; ab888: $form->handleRequest($request); goto Cbc84; b1496: $ftpUserEntity = $this->ftpUserEntityManager->createEntity(); goto a1022; c6be0: if (!(false === is_null($response))) { goto ab797; } goto F04ef; a455b: } private function createFtpUserForm(FtpUserEntity $ftpUserEntity) : Form { goto fab8d; fab8d: $siteEntity = $ftpUserEntity->getSite(); goto fa94e; A8feb: return $form; goto C84b0; Ff705: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Add User"]); goto A8feb; fa94e: $form = $this->createForm("App\Form\SiteFtpUserType", $ftpUserEntity, ["action" => $this->generateUrl("clp_site_ftp_user_new", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]); goto Ff705; C84b0: } private function handleFtpUserForm(Request $request, Form $form, Site $site) { goto D9488; de96a: D2acb: goto e81eb; F1be3: F0972: goto f4318; A8cf0: $this->formErrors = $this->getErrorMessages($form); goto E2c5d; D9488: if (true === $form->isValid()) { goto F0972; } goto A8cf0; f4318: try { goto ff639; F030b: $siteUpdater = $this->getSiteUpdater($site); goto f09c8; Da105: $eventData = ["site" => $domainName, "userName" => $ftpUserName, "homeDirectory" => $ftpUserEntity->getHomeDirectory()]; goto b939b; f09c8: $siteUpdater->createFtpUser($ftpUserEntity); goto Da105; A3412: B56d5: goto b3860; f2fa6: $this->siteEntityManager->updateEntity($siteEntity); goto F030b; b3860: $user = $this->getUser(); goto Efd2c; e9a22: $ftpUserName = $ftpUserEntity->getUserName(); goto ecca3; A41c7: goto f1f9b; goto A3412; Efd2c: $ftpUserEntity = $form->getData(); goto e9a22; b939b: EventQueue::addEvent(EventQueue::EVENT_SITE_FTP_USER_ADD, $user, $eventData, $request); goto Ed095; Abeb3: $siteEntity = $this->getSiteEntity($domainName); goto A03dc; dc560: $ftpUserEntity->setPassword($ftpUserPassword); goto Ba26f; A0ca1: $response = $this->redirect($this->generateUrl("clp_sites")); goto A41c7; c39a7: $response = $this->redirect($this->generateUrl("clp_site_users", ["domainName" => $site->getDomainName()])); goto f5833; b1ac3: return $response; goto A5324; Ed095: $session->getFlashBag()->set("success", $this->translator->trans("User has been added.")); goto c39a7; Ba26f: $siteEntity->addFtpUser($ftpUserEntity); goto f2fa6; ff639: $session = $request->getSession(); goto e8d58; ecca3: $ftpUserPassword = $form->get("password")->getData(); goto dc560; f5833: f1f9b: goto b1ac3; e8d58: $domainName = $site->getDomainName(); goto Abeb3; A03dc: if (false === is_null($siteEntity)) { goto B56d5; } goto A0ca1; A5324: } 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 de96a; E2c5d: goto D2acb; goto F1be3; e81eb: } public function editFtpUser(Request $request) : Response { goto d45df; D5b91: $site = $this->getSite($request); goto A9d87; c99d9: $form->handleRequest($request); goto Dd10d; C89b3: return $response; goto f3e04; d45df: $userName = $request->get("userName"); goto D5b91; B878f: if (!(true === $request->isMethod("POST"))) { goto C3c96; } goto c99d9; Dd10d: if (!(true === $form->isSubmitted())) { goto a8908; } goto f79e1; Fc672: return $response; goto Ae2c8; Bbb42: $response = $this->redirect($this->generateUrl("clp_sites")); goto Cd600; bf97f: C3c96: goto Dac13; Bf02e: C42a6: goto ba730; Af871: B25b0: goto C89b3; Cd600: goto B25b0; goto Bf02e; C2c05: if (false === is_null($ftpUserEntity) && false === is_null($site) && $ftpUserEntity->getSite()->getDomainName() == $site->getDomainName()) { goto C42a6; } goto Bbb42; Dac13: $response = $this->render("Frontend/Site/edit-ftp-user.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]); goto Af871; Ae2c8: b7f99: goto Abc3d; A9d87: $ftpUserEntity = $this->ftpUserEntityManager->findOneByUserName($userName); goto C2c05; ba730: $form = $this->createFtpUserEditForm($ftpUserEntity); goto B878f; F0e50: if (!(false === is_null($response))) { goto b7f99; } goto Fc672; f79e1: $response = $this->handleFtpUserEditForm($request, $form, $site); goto F0e50; Abc3d: a8908: goto bf97f; f3e04: } private function createFtpUserEditForm(FtpUserEntity $ftpUserEntity) : Form { goto df134; df134: $siteEntity = $ftpUserEntity->getSite(); goto Dd2a4; Dd2a4: $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 Bef79; Bef79: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]); goto Dc682; Dc682: return $form; goto d660c; d660c: } private function handleFtpUserEditForm(Request $request, Form $form, Site $site) { goto daa0c; F7c67: try { goto a72d4; b8665: $response = $this->redirect($this->generateUrl("clp_sites")); goto bbcfb; A842b: $session->getFlashBag()->set("success", $this->translator->trans("User has been saved.")); goto Ba980; d98d9: $siteEntity = $this->getSiteEntity($domainName); goto E8cd6; a72d4: $session = $request->getSession(); goto c988d; E0ff2: $ftpUserEntity = $form->getData(); goto f9174; fac27: $this->siteEntityManager->updateEntity($siteEntity); goto E1f75; Ac5fd: if (!(false === empty($ftpUserPassword))) { goto db0ce; } goto Ce6fa; f5a35: db0ce: goto Fa5db; bbcfb: goto Fb042; goto F4560; c620c: $user = $this->getUser(); goto E0ff2; A44e0: $siteUpdater->changeUserHomeDirectory($ftpUserName, $ftpUserHomeDirectory); goto Ac5fd; B577f: EventQueue::addEvent(EventQueue::EVENT_SITE_FTP_USER_EDIT, $user, $eventData, $request); goto A842b; Fa5db: $eventData = ["site" => $domainName, "userName" => $ftpUserName, "homeDirectory" => $ftpUserHomeDirectory]; goto B577f; E8cd6: if (false === is_null($siteEntity)) { goto Fd607; } goto b8665; B16e5: $ftpUserHomeDirectory = $ftpUserEntity->getHomeDirectory(); goto fac27; E1f75: $siteUpdater = $this->getSiteUpdater($site); goto A44e0; e8242: return $response; goto B5bc2; eb071: Fb042: goto e8242; Ba980: $response = $this->redirect($this->generateUrl("clp_site_users", ["domainName" => $site->getDomainName()])); goto eb071; F4560: Fd607: goto c620c; Ce6fa: $siteUpdater->changeUserPassword($ftpUserName, $ftpUserPassword); goto f5a35; c988d: $domainName = $site->getDomainName(); goto d98d9; f9174: $ftpUserName = $ftpUserEntity->getUserName(); goto f665f; f665f: $ftpUserPassword = $form->get("password")->getData(); goto B16e5; B5bc2: } 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 F551e; a3c89: $this->formErrors = $this->getErrorMessages($form); goto E591a; F551e: A4ff9: goto b74aa; E7efa: Ba532: goto F7c67; daa0c: if (true === $form->isValid()) { goto Ba532; } goto a3c89; E591a: goto A4ff9; goto E7efa; b74aa: } public function deleteFtpUser(Request $request) : Response { goto a56cb; F4524: try { goto c63c5; e197d: e357c: goto F8aef; A00ad: $response = $this->redirect($this->generateUrl("clp_site_users", ["domainName" => $site->getDomainName()])); goto b8445; A0a14: $session->getFlashBag()->set("success", $this->translator->trans("User has been deleted.")); goto A00ad; Dfa7c: $ftpUserEntity = $this->ftpUserEntityManager->findOneByUserName($userName); goto d4b63; F8aef: Ac641: goto f76e4; Bbec6: EventQueue::addEvent(EventQueue::EVENT_SITE_FTP_USER_DELETE, $user, $evenData, $request); goto A0a14; d1e4c: $siteUpdater->deleteUser($userName, false); goto E18f1; b8445: return $response; goto e197d; D5e51: $ftpUserSiteEntity = $ftpUserEntity->getSite(); goto d503c; afaad: $user = $this->getUser(); goto Ca189; D314f: $domainName = $site->getDomainName(); goto A0f2d; C3031: $this->siteEntityManager->updateEntity($siteEntity); goto d820c; d4dec: $siteEntity->removeFtpUser($ftpUserEntity); goto C3031; d820c: $siteUpdater = $this->getSiteUpdater($site); goto d1e4c; d503c: if (!($siteEntity->getDomainName() == $ftpUserSiteEntity->getDomainName())) { goto e357c; } goto afaad; Ca189: $userName = $ftpUserEntity->getUserName(); goto d4dec; E18f1: $evenData = ["site" => $domainName, "userName" => $userName]; goto Bbec6; c19c9: $userName = $request->get("userName"); goto D314f; c63c5: $session = $request->getSession(); goto c19c9; A0f2d: $siteEntity = $this->getSiteEntity($domainName); goto Dfa7c; d4b63: if (!(false === is_null($siteEntity) && false === empty($userName) && false === is_null($ftpUserEntity))) { goto Ac641; } goto D5e51; f76e4: } 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 Ccb47; Ccb47: A9184: goto e2ed5; a56cb: $site = $this->getSite($request); goto D7dcd; e2ed5: $response = $this->redirect($this->generateUrl("clp_sites")); goto D1b22; D7dcd: if (!(false === is_null($site))) { goto A9184; } goto F4524; D1b22: return $response; goto C1272; C1272: } public function newSshUser(Request $request) : Response { goto fd80c; c839f: $response = $this->handleSshUserForm($request, $form, $site); goto ee53e; dbfbc: $sshUserEntity->setSite($siteEntity); goto Ce808; fd80c: $site = $this->getSite($request); goto bc9cd; A2c9c: C5767: goto c49e6; Ae2e8: $form->handleRequest($request); goto d86cb; c0989: return $response; goto c57f7; F709e: $response = $this->redirect($this->generateUrl("clp_sites")); goto A896d; ee53e: if (!(false === is_null($response))) { goto C5767; } goto Bd2a8; Ce808: $form = $this->createSshUserForm($sshUserEntity); goto Ddb1b; A896d: goto e003b; goto f89a7; d9024: $response = $this->render("Frontend/Site/new-ssh-user.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]); goto E1493; E78c6: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto D3496; D91de: B8eaf: goto d9024; E1493: e003b: goto c0989; bc9cd: if (false === is_null($site)) { goto E26c6; } goto F709e; Ddb1b: if (!(true === $request->isMethod("POST"))) { goto B8eaf; } goto Ae2e8; Bd2a8: return $response; goto A2c9c; c49e6: f8025: goto D91de; d86cb: if (!(true === $form->isSubmitted())) { goto f8025; } goto c839f; D3496: $sshUserEntity = $this->sshUserEntityManager->createEntity(); goto dbfbc; f89a7: E26c6: goto E78c6; c57f7: } private function createSshUserForm(SshUserEntity $sshUserEntity) : Form { goto A3bf7; d80d7: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Add User"]); goto Cd8b7; Be104: $form = $this->createForm("App\Form\SiteSshUserType", $sshUserEntity, ["action" => $this->generateUrl("clp_site_ssh_user_new", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]); goto d80d7; A3bf7: $siteEntity = $sshUserEntity->getSite(); goto Be104; Cd8b7: return $form; goto Fe887; Fe887: } private function handleSshUserForm(Request $request, Form $form, Site $site) { goto a2668; Ed71c: $this->formErrors = $this->getErrorMessages($form); goto F77f1; a2668: if (true === $form->isValid()) { goto a066e; } goto Ed71c; F77f1: goto c97c8; goto f737b; e8b67: c97c8: goto becb3; E9740: try { goto F7cd2; E0f3c: return $response; goto Fabc6; B0eec: $sshUserEntity = $form->getData(); goto a9898; F050f: $siteEntity = $this->getSiteEntity($domainName); goto b54b5; C0145: goto A25b9; goto Fd285; a4c1b: $response = $this->redirect($this->generateUrl("clp_sites")); goto C0145; e5390: $sshKeys = $sshUserEntity->getSshKeys(); goto b1d8f; ee325: $siteUpdater->updateUserSShKeys($sshUserName, $sshKeys); goto Fb528; Fb528: e7ec3: goto D8e4a; a9898: $sshUserName = $sshUserEntity->getUserName(); goto F1f13; F1f13: $sshUserPassword = $form->get("password")->getData(); goto f57c3; dd3c1: EventQueue::addEvent(EventQueue::EVENT_SITE_SSH_USER_ADD, $user, $eventData, $request); goto Cfada; B6485: $this->siteEntityManager->updateEntity($siteEntity); goto d5f21; d5f21: $siteUpdater = $this->getSiteUpdater($site); goto B2481; ed9ab: $user = $this->getUser(); goto B0eec; D8e4a: $eventData = ["site" => $domainName, "userName" => $sshUserName, "sshKeys" => $sshKeys]; goto dd3c1; Cfada: $session->getFlashBag()->set("success", $this->translator->trans("User has been added.")); goto c7d22; f7a5d: if (!(false === empty($sshKeys))) { goto e7ec3; } goto ee325; f57c3: $sshUserEntity->setPassword($sshUserPassword); goto e5390; eee64: A25b9: goto E0f3c; F7cd2: $session = $request->getSession(); goto C7d28; C7d28: $domainName = $site->getDomainName(); goto F050f; b1d8f: $siteEntity->addSshUser($sshUserEntity); goto B6485; c7d22: $response = $this->redirect($this->generateUrl("clp_site_users", ["domainName" => $site->getDomainName()])); goto eee64; b54b5: if (false === is_null($siteEntity)) { goto ed8ca; } goto a4c1b; B2481: $siteUpdater->createSshUser($sshUserEntity); goto f7a5d; Fd285: ed8ca: goto ed9ab; Fabc6: } 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 e8b67; f737b: a066e: goto E9740; becb3: } public function editSshUser(Request $request) : Response { goto af47c; e7bf1: $form = $this->createSshUserEditForm($sshUserEntity); goto D1bf0; Da724: $response = $this->render("Frontend/Site/edit-ssh-user.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]); goto dc0b4; fa0f0: return $response; goto c45f8; D3109: if (false === is_null($sshUserEntity) && false === is_null($site) && $sshUserEntity->getSite()->getDomainName() == $site->getDomainName()) { goto b5312; } goto F1384; D1bf0: if (!(true === $request->isMethod("POST"))) { goto Bab19; } goto D53d2; af47c: $userName = $request->get("userName"); goto a3d87; c84cd: goto Ca11a; goto Db839; Db839: b5312: goto e7bf1; dc0b4: Ca11a: goto fa0f0; bfea0: $response = $this->handleSshUserEditForm($request, $form, $site); goto D505c; ff048: $sshUserEntity = $this->sshUserEntityManager->findOneByUserName($userName); goto D3109; D505c: if (!(false === is_null($response))) { goto A1319; } goto Bcda6; Bcda6: return $response; goto d8416; D53d2: $form->handleRequest($request); goto edf7a; fd3d8: Bab19: goto Da724; f1892: A043a: goto fd3d8; a3d87: $site = $this->getSite($request); goto ff048; edf7a: if (!(true === $form->isSubmitted())) { goto A043a; } goto bfea0; d8416: A1319: goto f1892; F1384: $response = $this->redirect($this->generateUrl("clp_sites")); goto c84cd; c45f8: } private function createSshUserEditForm(SshUserEntity $sshUserEntity) : Form { goto F70b7; db6b0: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]); goto aafbb; aafbb: return $form; goto ac3dc; F70b7: $siteEntity = $sshUserEntity->getSite(); goto c1e81; c1e81: $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 db6b0; ac3dc: } private function handleSshUserEditForm(Request $request, Form $form, Site $site) { goto D3adf; D3adf: if (true === $form->isValid()) { goto E216b; } goto c33f7; a8e45: E216b: goto d641d; d641d: try { goto fbf88; Dc31f: $response = $this->redirect($this->generateUrl("clp_sites")); goto E10a9; f75d8: EventQueue::addEvent(EventQueue::EVENT_SITE_SSH_USER_EDIT, $user, $eventData, $request); goto E70e7; A86f7: $this->siteEntityManager->updateEntity($siteEntity); goto E2742; Fe326: $siteUpdater->changeUserPassword($sshUserName, $sshUserPassword); goto B4071; Dd766: $sshUserEntity = $form->getData(); goto ee38d; Dc11d: return $response; goto a737d; Be8d8: af058: goto F5dbf; E10a9: goto e304e; goto Be8d8; A39c1: $sshUserPassword = $form->get("password")->getData(); goto Ad6b4; Acfea: if (!(false === empty($sshUserPassword))) { goto D272d; } goto Fe326; E70e7: $session->getFlashBag()->set("success", $this->translator->trans("User has been saved.")); goto Eff31; Ad6b4: $sshKeys = false === is_null($sshUserEntity->getSshKeys()) ? $sshUserEntity->getSshKeys() : ''; goto A86f7; B4071: D272d: goto a1b2c; Eff31: $response = $this->redirect($this->generateUrl("clp_site_users", ["domainName" => $site->getDomainName()])); goto A8643; fbf88: $session = $request->getSession(); goto c974c; ff080: $siteEntity = $this->getSiteEntity($domainName); goto c889e; a1b2c: $siteUpdater->updateUserSShKeys($sshUserName, $sshKeys); goto f2cd3; A8643: e304e: goto Dc11d; f2cd3: $eventData = ["site" => $domainName, "userName" => $sshUserName, "sshKeys" => $sshKeys]; goto f75d8; F5dbf: $user = $this->getUser(); goto Dd766; E2742: $siteUpdater = $this->getSiteUpdater($site); goto Acfea; c889e: if (false === is_null($siteEntity)) { goto af058; } goto Dc31f; ee38d: $sshUserName = $sshUserEntity->getUserName(); goto A39c1; c974c: $domainName = $site->getDomainName(); goto ff080; a737d: } 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 fdebf; Be820: goto e68bd; goto a8e45; c33f7: $this->formErrors = $this->getErrorMessages($form); goto Be820; fdebf: e68bd: goto Bca83; Bca83: } public function deleteSshUser(Request $request) : Response { goto D7bb2; C9986: e0a61: goto B3489; F7ee0: return $response; goto B52fb; B3489: $response = $this->redirect($this->generateUrl("clp_sites")); goto F7ee0; D7bb2: $site = $this->getSite($request); goto dfea3; dfea3: if (!(false === is_null($site))) { goto e0a61; } goto Ac910; Ac910: try { goto a8628; bbdcd: $response = $this->redirect($this->generateUrl("clp_site_users", ["domainName" => $site->getDomainName()])); goto A9a0e; bb327: $userName = $request->get("userName"); goto B6bc2; c7236: EventQueue::addEvent(EventQueue::EVENT_SITE_SSH_USER_DELETE, $user, $evenData, $request); goto Bdccd; db352: $this->siteEntityManager->updateEntity($siteEntity); goto c1852; Bdccd: $session->getFlashBag()->set("success", $this->translator->trans("User has been deleted.")); goto bbdcd; Ccb9e: Caad9: goto c65a4; Dcdca: $siteUpdater->deleteUser($userName, true); goto Cee51; f4628: $siteEntity->removeSshUser($sshUserEntity); goto db352; cd1d1: $userName = $sshUserEntity->getUserName(); goto f4628; b1d7c: if (!($siteEntity->getDomainName() == $sshUserSiteEntity->getDomainName())) { goto Bef14; } goto a2f65; D0960: $sshUserEntity = $this->sshUserEntityManager->findOneByUserName($userName); goto ceb4c; c1852: $siteUpdater = $this->getSiteUpdater($site); goto Dcdca; B6bc2: $domainName = $site->getDomainName(); goto fc1ba; f15fc: $sshUserSiteEntity = $sshUserEntity->getSite(); goto b1d7c; ceb4c: if (!(false === is_null($siteEntity) && false === empty($userName) && false === is_null($sshUserEntity))) { goto Caad9; } goto f15fc; fc1ba: $siteEntity = $this->getSiteEntity($domainName); goto D0960; A9a0e: return $response; goto d01e6; Cee51: $evenData = ["site" => $domainName, "userName" => $userName]; goto c7236; a8628: $session = $request->getSession(); goto bb327; a2f65: $user = $this->getUser(); goto cd1d1; d01e6: Bef14: goto Ccb9e; c65a4: } 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 C9986; B52fb: } public function security(Request $request) : Response { goto f74c6; c30b5: D30c8: goto C465a; d2743: if (false === is_null($site)) { goto Eda41; } goto bc12a; B2951: $basicAuthEntity = $this->basicAuthEntityManager->createEntity(); goto Cabaf; B4dc2: afa05: goto c083f; D714d: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto ec5b8; a1b1e: $blockedIps = $site->getBlockedIps(); goto f90ab; D0fc8: $cloudflareForm = $this->createCloudflareForm($siteEntity, $cloudflareData); goto Bebbc; a7105: if (!(false === is_null($response))) { goto D3800; } goto F7112; F7112: return $response; goto ce482; ed25b: $basicAuthEntity->setSite($siteEntity); goto Eedf2; afa88: if (!(false === is_null($response))) { goto afa05; } goto de7cd; C465a: $response = $this->render("Frontend/Site/security.html.twig", ["site" => $site, "blockedIps" => $blockedIps, "blockedBots" => $blockedBots, "basicAuthForm" => $basicAuthForm->createView(), "cloudflareForm" => $cloudflareForm->createView(), "formErrors" => $this->formErrors]); goto B94c9; cbb75: $response = $this->handleCloudflareForm($request, $cloudflareForm, $site); goto a7105; f74c6: $site = $this->getSite($request); goto d2743; af919: $basicAuthForm->handleRequest($request); goto F94ad; e48db: if (!(true === $basicAuthForm->isSubmitted())) { goto Ce182; } goto af727; bc12a: $response = $this->redirect($this->generateUrl("clp_sites")); goto Dc333; c083f: Ce182: goto Ff28f; Cabaf: Aeee6: goto ed25b; B94c9: Cd281: goto fa906; A6eb9: $blockedBots = $site->getBlockedBots(); goto a1b1e; ce482: D3800: goto Ca9f0; Dc333: goto Cd281; goto D506b; D506b: Eda41: goto D714d; Ff28f: if (!(true === $cloudflareForm->isSubmitted())) { goto Cca40; } goto cbb75; Fddb8: if (!(true === is_null($basicAuthEntity))) { goto Aeee6; } goto B2951; de7cd: return $response; goto B4dc2; ec5b8: $cloudflareData = ["allowTrafficFromCloudflareOnly" => $siteEntity->allowTrafficFromCloudflareOnly()]; goto A6eb9; Bebbc: if (!(true === $request->isMethod("POST"))) { goto D30c8; } goto af919; F94ad: $cloudflareForm->handleRequest($request); goto e48db; fa906: return $response; goto a080a; f90ab: $basicAuthEntity = $site->getBasicAuth(); goto Fddb8; Ca9f0: Cca40: goto c30b5; Eedf2: $basicAuthForm = $this->createBasicAuthForm($basicAuthEntity); goto D0fc8; af727: $response = $this->handleBasicAuthForm($request, $basicAuthForm, $site); goto afa88; a080a: } private function createCloudflareForm(SiteEntity $siteEntity, array $data) : Form { goto C1b5a; B8713: return $form; goto C4d2d; C1b5a: $form = $this->createForm("App\Form\SiteCloudflareType", $data, ["action" => $this->generateUrl("clp_site_security", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]); goto C79af; C79af: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]); goto B8713; C4d2d: } private function createBasicAuthForm(BasicAuthEntity $basicAuthEntity) : Form { goto df696; cc794: $form = $this->createForm("App\Form\SiteBasicAuthType", $basicAuthEntity, ["action" => $this->generateUrl("clp_site_security", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]); goto Aaa8a; Aaa8a: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]); goto ce637; ce637: return $form; goto Be0d3; df696: $siteEntity = $basicAuthEntity->getSite(); goto cc794; Be0d3: } private function handleBasicAuthForm(Request $request, Form $form, Site $site) { goto f64bd; c3ed9: try { goto E5120; Fd088: $basicAuthEntity = $form->getData(); goto A3042; E5db0: $siteUpdater->createBasicAuthFile($basicAuthEntity); goto ee1c9; A66f7: $siteUpdater->reloadNginxService(); goto d8d41; B9026: $response = $this->redirect($this->generateUrl("clp_sites")); goto Abfbc; d5000: ea355: goto A6d7d; a9872: if (false === is_null($siteEntity)) { goto ea355; } goto B9026; deae9: $domainName = $site->getDomainName(); goto cdf45; cdf45: $siteEntity = $this->getSiteEntity($domainName); goto a9872; a9c5e: D0069: goto Cf901; A6d7d: $user = $this->getUser(); goto Fd088; Abfbc: goto D0069; goto d5000; Cf901: return $response; goto a01cf; B10bb: $siteUpdater = $this->getSiteUpdater($site); goto E5db0; D8eed: EventQueue::addEvent(EventQueue::EVENT_SITE_BASIC_AUTHENTIFICATION_SETTINGS, $user, $eventData, $request); goto Be483; E5120: $session = $request->getSession(); goto deae9; ee1c9: $siteUpdater->updateNginxVhost(); goto A66f7; a3cc9: $response = $this->redirect($this->generateUrl("clp_site_security", ["domainName" => $site->getDomainName()])); goto a9c5e; B63b9: $this->siteEntityManager->updateEntity($siteEntity); goto B10bb; A3042: $siteEntity->setBasicAuth($basicAuthEntity); goto bac2b; d8d41: $eventData = ["site" => $domainName, "active" => true === $basicAuthEntity->getIsActive() ? "1" : "0", "userName" => $basicAuthEntity->getUserName(), "whitelistedIps" => $basicAuthEntity->getWhitelistedIps()]; goto D8eed; Be483: $session->getFlashBag()->set("success", $this->translator->trans("Basic Authentication settings have been saved.")); goto a3cc9; bac2b: $site->setBasicAuth($basicAuthEntity); goto B63b9; a01cf: } 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 Dc380; Fcd79: $this->formErrors = $this->getErrorMessages($form); goto A4252; f64bd: if (true === $form->isValid()) { goto D7e40; } goto Fcd79; A4252: goto a3fee; goto Eeaaa; Eeaaa: D7e40: goto c3ed9; Dc380: a3fee: goto a7ec5; a7ec5: } private function handleCloudflareForm(Request $request, Form $form, Site $site) { goto f4182; A56b5: c5b82: goto d3029; ba503: $this->formErrors = $this->getErrorMessages($form); goto bb0d5; f4182: if (true === $form->isValid()) { goto A194c; } goto ba503; D411b: A194c: goto c3786; bb0d5: goto c5b82; goto D411b; c3786: try { goto e9f3c; Ef3cc: Fa737: goto b0aab; Ce98b: $eventData = ["site" => $domainName, "allowTrafficFromCloudflareOnly" => true === $allowTrafficFromCloudflareOnly ? "1" : "0"]; goto Cba1a; A268e: $user = $this->getUser(); goto b8ddc; Cba1a: EventQueue::addEvent(EventQueue::EVENT_SITE_CLOUDFLARE_SETTINGS, $user, $eventData, $request); goto f0550; Aefb5: goto Fa737; goto dfa67; b8ddc: $allowTrafficFromCloudflareOnly = $form->get("allowTrafficFromCloudflareOnly")->getData(); goto a0eae; A90fc: $siteUpdater = $this->getSiteUpdater($site); goto D0d04; d0840: $siteEntity = $this->getSiteEntity($domainName); goto ac107; dfa67: e1852: goto A268e; c415c: $response = $this->redirect($this->generateUrl("clp_site_security", ["domainName" => $site->getDomainName()])); goto Ef3cc; e9f3c: $session = $request->getSession(); goto c1277; f0550: $session->getFlashBag()->set("success", $this->translator->trans("Cloudflare settings have been saved.")); goto c415c; Fe9cd: $siteUpdater->reloadNginxService(); goto Ce98b; Addbb: $site->setAllowTrafficFromCloudflareOnly($allowTrafficFromCloudflareOnly); goto E37b8; ac107: if (false === is_null($siteEntity)) { goto e1852; } goto Ebb8f; c1277: $domainName = $site->getDomainName(); goto d0840; Ebb8f: $response = $this->redirect($this->generateUrl("clp_sites")); goto Aefb5; D0d04: $siteUpdater->updateNginxVhost(); goto Fe9cd; E37b8: $this->siteEntityManager->updateEntity($siteEntity); goto A90fc; a0eae: $siteEntity->setAllowTrafficFromCloudflareOnly($allowTrafficFromCloudflareOnly); goto Addbb; b0aab: return $response; goto Cabb2; Cabb2: } 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 A56b5; d3029: } public function newBlockedIp(Request $request) : Response { goto E2e08; f51e2: Ba159: goto e94c4; e94c4: $response = $this->render("Frontend/Site/new-blocked-ip.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]); goto ffc9e; E9c9d: return $response; goto B81e9; Bc43f: $form->handleRequest($request); goto e66df; Bd612: $response = $this->handleBlockedIpForm($request, $form, $site); goto e3efe; ffc9e: ddc38: goto Cbd2c; B157a: $blockedIpEntity->setSite($siteEntity); goto F0365; Cbd2c: return $response; goto Eacdf; e3efe: if (!(false === is_null($response))) { goto b755c; } goto E9c9d; e6a83: $blockedIpEntity = $this->blockedIpEntityManager->createEntity(); goto B157a; bd8b7: if (false === is_null($site)) { goto b0aaf; } goto F3149; B04e2: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto e6a83; F3149: $response = $this->redirect($this->generateUrl("clp_sites")); goto e5310; b66a8: if (!(true === $request->isMethod("POST"))) { goto Ba159; } goto Bc43f; B8331: ef116: goto f51e2; F0365: $form = $this->createBlockedIpForm($blockedIpEntity); goto b66a8; E2e08: $site = $this->getSite($request); goto bd8b7; e66df: if (!(true === $form->isSubmitted())) { goto ef116; } goto Bd612; e4fbd: b0aaf: goto B04e2; B81e9: b755c: goto B8331; e5310: goto ddc38; goto e4fbd; Eacdf: } private function createBlockedIpForm(BlockedIpEntity $blockedIpEntity) : Form { goto D2041; d5733: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Add IP"]); goto Da17d; Da17d: return $form; goto Eb0dd; fe29a: $form = $this->createForm("App\Form\SiteBlockedIPType", $blockedIpEntity, ["action" => $this->generateUrl("clp_site_security_blocked_ip_new", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]); goto d5733; D2041: $siteEntity = $blockedIpEntity->getSite(); goto fe29a; Eb0dd: } private function handleBlockedIpForm(Request $request, Form $form, Site $site) { goto e6a72; Cc45f: d94aa: goto B8d97; e6a72: if (true === $form->isValid()) { goto Fd341; } goto e4467; D086c: goto d94aa; goto be57b; f9870: try { goto D2033; Ba803: $session->getFlashBag()->set("success", $this->translator->trans("IP has been added.")); goto C2caa; Dd1c5: $user = $this->getUser(); goto c379b; Fbb99: $response = $this->redirect($this->generateUrl("clp_sites")); goto Ad75b; a5041: $siteEntity = $this->getSiteEntity($domainName); goto b4520; Ad75b: goto ad6df; goto ec758; a6fff: $siteUpdater = $this->getSiteUpdater($site); goto fe80c; D2033: $session = $request->getSession(); goto c88dc; ee9a1: $siteEntity->addBlockedIp($blockedIp); goto Ef65e; ec758: cdd96: goto Dd1c5; ca90f: EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_IP_ADD, $user, $eventData, $request); goto Ba803; C2caa: $response = $this->redirect($this->generateUrl("clp_site_security", ["domainName" => $site->getDomainName()])); goto F31a3; c88dc: $domainName = $site->getDomainName(); goto a5041; b4520: if (false === is_null($siteEntity)) { goto cdd96; } goto Fbb99; d2e95: return $response; goto Fa04d; ec6c9: $siteUpdater->reloadNginxService(); goto Ebff4; Ef65e: $this->siteEntityManager->updateEntity($siteEntity); goto a6fff; fe80c: $siteUpdater->updateNginxVhost(); goto ec6c9; Ebff4: $eventData = ["site" => $domainName, "ip" => $blockedIp->getIp()]; goto ca90f; F31a3: ad6df: goto d2e95; c379b: $blockedIp = $form->getData(); goto ee9a1; Fa04d: } 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 Cc45f; e4467: $this->formErrors = $this->getErrorMessages($form); goto D086c; be57b: Fd341: goto f9870; B8d97: } public function deleteBlockedIp(Request $request) : Response { goto bbd79; cc322: if (!(false === is_null($site))) { goto bbb14; } goto b1f30; a43f1: $response = $this->redirect($this->generateUrl("clp_sites")); goto f9cdb; bbd79: $site = $this->getSite($request); goto cc322; Fad7a: bbb14: goto a43f1; b1f30: try { goto D3013; e0edb: $id = (int) $request->get("id"); goto c463b; Bf622: EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_IP_DELETE, $user, $eventData, $request); goto fb317; A3dd3: $response = $this->redirect($this->generateUrl("clp_site_security", ["domainName" => $site->getDomainName()])); goto Fe9eb; fa15b: $user = $this->getUser(); goto Bfe79; Fe9eb: return $response; goto e3ea9; C9c76: $siteUpdater->updateNginxVhost(); goto E683e; Bfe79: $siteEntity->removeBlockedIp($blockedIpEntity); goto E72bc; A114f: $siteUpdater = $this->getSiteUpdater($site); goto C9c76; Deb49: $siteEntity = $this->getSiteEntity($domainName); goto c36e0; D3013: $session = $request->getSession(); goto e0edb; c463b: $domainName = $site->getDomainName(); goto Deb49; Debd9: $eventData = ["site" => $domainName, "ip" => $blockedIpEntity->getIp()]; goto Bf622; E683e: $siteUpdater->reloadNginxService(); goto Debd9; e3ea9: Ffd7f: goto D9462; c36e0: $blockedIpEntity = $this->blockedIpEntityManager->findOneById($id); goto e0ad1; E72bc: $this->siteEntityManager->updateEntity($siteEntity); goto A114f; e0ad1: if (!(false === is_null($siteEntity) && false === empty($id) && false === is_null($blockedIpEntity) && $siteEntity == $blockedIpEntity->getSite())) { goto Ffd7f; } goto fa15b; fb317: $session->getFlashBag()->set("success", $this->translator->trans("IP has been deleted.")); goto A3dd3; D9462: } 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 Fad7a; f9cdb: return $response; goto B8787; B8787: } public function newBlockedBot(Request $request) : Response { goto F2215; D0246: return $response; goto Bc2e5; Ead0b: $blockedBotEntity = $this->blockedBotEntityManager->createEntity(); goto Ff76b; Ff76b: $blockedBotEntity->setSite($siteEntity); goto dcb02; Dfa3a: C032e: goto cbf85; f161b: a2712: goto D0246; A13fc: b8ea2: goto a7ef3; a6506: if (!(true === $form->isSubmitted())) { goto b8ea2; } goto c9629; f90fd: $form->handleRequest($request); goto a6506; db029: if (!(true === $request->isMethod("POST"))) { goto B7848; } goto f90fd; d1714: goto a2712; goto Dfa3a; fa94c: $response = $this->redirect($this->generateUrl("clp_sites")); goto d1714; dcb02: $form = $this->createBlockedBotForm($blockedBotEntity); goto db029; cbf85: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto Ead0b; F0809: if (!(false === is_null($response))) { goto C2c17; } goto D5efa; F2215: $site = $this->getSite($request); goto Ebca9; b6dd6: C2c17: goto A13fc; cde63: $response = $this->render("Frontend/Site/new-blocked-bot.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]); goto f161b; a7ef3: B7848: goto cde63; Ebca9: if (false === is_null($site)) { goto C032e; } goto fa94c; c9629: $response = $this->handleBlockedBotForm($request, $form, $site); goto F0809; D5efa: return $response; goto b6dd6; Bc2e5: } private function createBlockedBotForm(BlockedBotEntity $blockedBotEntity) : Form { goto cff13; Bbc52: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Add Bot"]); goto b9b1e; cff13: $siteEntity = $blockedBotEntity->getSite(); goto fdf6f; b9b1e: return $form; goto A081d; fdf6f: $form = $this->createForm("App\Form\SiteBlockedBotType", $blockedBotEntity, ["action" => $this->generateUrl("clp_site_security_blocked_bot_new", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]); goto Bbc52; A081d: } private function handleBlockedBotForm(Request $request, Form $form, Site $site) { goto Aa591; fd3a4: $this->formErrors = $this->getErrorMessages($form); goto dd87a; Aa591: if (true === $form->isValid()) { goto A3a04; } goto fd3a4; ce44b: e98a6: goto ebe3b; c4ed2: try { goto f197c; B78d4: goto eead9; goto b4335; Bb2fb: $eventData = ["site" => $domainName, "name" => $blockedBot->getName()]; goto F31db; F31db: EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_BOT_ADD, $user, $eventData, $request); goto cb6de; d15c6: $response = $this->redirect($this->generateUrl("clp_site_security", ["domainName" => $site->getDomainName()])); goto E3337; E3337: eead9: goto Cbce4; b2055: $siteEntity = $this->getSiteEntity($domainName); goto f080d; f72db: $this->siteEntityManager->updateEntity($siteEntity); goto Efabb; a7a70: $domainName = $site->getDomainName(); goto b2055; E7f44: $blockedBot = $form->getData(); goto B4ccd; B4ccd: $siteEntity->addBlockedBot($blockedBot); goto f72db; b4335: Ab832: goto Ff1d6; Ff1d6: $user = $this->getUser(); goto E7f44; f080d: if (false === is_null($siteEntity)) { goto Ab832; } goto B2f18; Cbce4: return $response; goto e0590; B2f18: $response = $this->redirect($this->generateUrl("clp_sites")); goto B78d4; cb6de: $session->getFlashBag()->set("success", $this->translator->trans("Bot has been added.")); goto d15c6; B56d2: $siteUpdater->updateNginxVhost(); goto A1d8c; Efabb: $siteUpdater = $this->getSiteUpdater($site); goto B56d2; A1d8c: $siteUpdater->reloadNginxService(); goto Bb2fb; f197c: $session = $request->getSession(); goto a7a70; e0590: } 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 ce44b; dd87a: goto e98a6; goto F10a9; F10a9: A3a04: goto c4ed2; ebe3b: } public function deleteBlockedBot(Request $request) : Response { goto fee11; c3227: if (!(false === is_null($site))) { goto C48f3; } goto E7977; fee11: $site = $this->getSite($request); goto c3227; A1a4c: $response = $this->redirect($this->generateUrl("clp_sites")); goto Cd0f0; c8789: C48f3: goto A1a4c; Cd0f0: return $response; goto B71d7; E7977: try { goto B0371; f8780: $user = $this->getUser(); goto F9f51; C67df: $response = $this->redirect($this->generateUrl("clp_site_security", ["domainName" => $site->getDomainName()])); goto A8054; b0ca8: if (!(false === is_null($siteEntity) && false === empty($id) && false === is_null($blockedBotEntity) && $siteEntity == $blockedBotEntity->getSite())) { goto bb0ea; } goto f8780; A23e7: $eventData = ["site" => $domainName, "name" => $blockedBotEntity->getName()]; goto e2c25; A8054: return $response; goto A0bb8; B0371: $session = $request->getSession(); goto Adfbb; f139c: $siteUpdater->updateNginxVhost(); goto cd634; C31b5: $domainName = $site->getDomainName(); goto D7d0d; be7c5: $this->siteEntityManager->updateEntity($siteEntity); goto C26ca; d2dc3: $blockedBotEntity = $this->blockedBotEntityManager->findOneById($id); goto b0ca8; D7d0d: $siteEntity = $this->getSiteEntity($domainName); goto d2dc3; cd634: $siteUpdater->reloadNginxService(); goto A23e7; A0bb8: bb0ea: goto Ab8d1; C26ca: $siteUpdater = $this->getSiteUpdater($site); goto f139c; F9f51: $siteEntity->removeBlockedBot($blockedBotEntity); goto be7c5; f9b2a: $session->getFlashBag()->set("success", $this->translator->trans("Bot has been deleted.")); goto C67df; Adfbb: $id = (int) $request->get("id"); goto C31b5; e2c25: EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_BOT_DELETE, $user, $eventData, $request); goto f9b2a; Ab8d1: } 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 c8789; B71d7: } public function certificates(Request $request) : Response { goto bef06; cf70c: $response = $this->redirect($this->generateUrl("clp_sites")); goto d3089; E7f3e: $response = $this->render("Frontend/Site/certificates.html.twig", ["site" => $site, "installedCertificate" => $installedCertificate, "certificates" => $certificates]); goto a1af8; d3089: goto fb846; goto Cd0ce; d4ec3: return $response; goto eb1b4; de767: $installedCertificate = $site->getCertificate(); goto Ccec6; Cd0ce: A5bd6: goto de767; c235f: if (false === is_null($site)) { goto A5bd6; } goto cf70c; Ccec6: $certificates = $site->getCertificates(); goto E7f3e; bef06: $site = $this->getSite($request); goto c235f; a1af8: fb846: goto d4ec3; eb1b4: } public function importCertificate(Request $request) : Response { goto Bf37c; E7512: D066a: goto a8fd3; bc9de: E190d: goto B5f3b; f2394: return $response; goto E3801; b079f: $response = $this->redirect($this->generateUrl("clp_sites")); goto ae4dd; Ec371: if (false === is_null($site)) { goto E190d; } goto b079f; D6e63: $certificateEntity = $this->certificateEntityManager->createEntity(); goto efacf; aa651: $response = $this->handleImportCertificateForm($request, $form, $site); goto d2bd5; efacf: $certificateEntity->setType(CertificateEntity::TYPE_IMPORTED); goto F534f; Eefa0: $form = $this->createImportCertificateForm($certificateEntity); goto d8149; ae4dd: goto E748b; goto bc9de; cee00: ccdb3: goto a109b; F534f: $certificateEntity->setSite($siteEntity); goto Eefa0; b0a24: if (!(true === $form->isSubmitted())) { goto Ffba4; } goto aa651; c93f9: $form->handleRequest($request); goto b0a24; b15e5: E748b: goto f2394; d2bd5: if (!(false === is_null($response))) { goto D066a; } goto D7a1b; Bf37c: $site = $this->getSite($request); goto Ec371; a109b: $response = $this->render("Frontend/Site/import-certificate.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]); goto b15e5; D7a1b: return $response; goto E7512; d8149: if (!(true === $request->isMethod("POST"))) { goto ccdb3; } goto c93f9; B5f3b: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto D6e63; a8fd3: Ffba4: goto cee00; E3801: } private function createImportCertificateForm(CertificateEntity $certificateEntity) : Form { goto A06bd; Ce9f2: $form = $this->createForm("App\Form\SiteImportCertificateType", $certificateEntity, ["action" => $this->generateUrl("clp_site_certificate_import", ["domainName" => $siteEntity->getDomainName()]), "method" => "POST", "attr" => []]); goto C2ddd; C2ddd: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Import and Install"]); goto fb699; A06bd: $siteEntity = $certificateEntity->getSite(); goto Ce9f2; fb699: return $form; goto E111a; E111a: } private function handleImportCertificateForm(Request $request, Form $form, Site $site) { goto Ddc8c; Abbf5: $this->formErrors = $this->getErrorMessages($form); goto Ef052; Ef052: goto e7f98; goto Ff8a0; Ddc8c: if (true === $form->isValid()) { goto e164a; } goto Abbf5; d0ac6: e7f98: goto D9efc; Ff8a0: e164a: goto Dc76b; Dc76b: try { goto c1f1c; Cccb7: $session->getFlashBag()->set("success", $this->translator->trans("Certificate has been installed.")); goto C4100; a7459: $siteEntity = $this->getSiteEntity($domainName); goto b1813; C4100: $response = $this->redirect($this->generateUrl("clp_site_certificates", ["domainName" => $site->getDomainName()])); goto c546a; eb463: $siteUpdater = $this->getSiteUpdater($site); goto Ae39a; b55f8: $evenData = ["site" => $domainName]; goto B61ef; C7dda: $user = $this->getUser(); goto e67dd; baf25: $domainName = $site->getDomainName(); goto a7459; cd2a8: $this->siteEntityManager->updateEntity($siteEntity); goto b55f8; Ab0f8: $response = $this->redirect($this->generateUrl("clp_sites")); goto da4b9; b1813: if (false === is_null($siteEntity)) { goto be288; } goto Ab0f8; c1f1c: $session = $request->getSession(); goto baf25; da4b9: goto bb043; goto ea9c3; B61ef: EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_INSTALL, $user, $evenData, $request); goto Cccb7; F95dc: return $response; goto d4c95; ea9c3: be288: goto C7dda; c546a: bb043: goto F95dc; B8bbf: $siteEntity->setCertificate($certificateEntity); goto Fa6fb; Fa6fb: $siteEntity->addCertificate($certificateEntity); goto cd2a8; e67dd: $certificateEntity = $form->getData(); goto eb463; Ae39a: $siteUpdater->installCertificate($certificateEntity); goto B8bbf; d4c95: } 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 d0ac6; D9efc: } public function newLetsEncryptCertificate(Request $request) : Response { goto Ff985; D9074: $domains = (array) $request->get("domains"); goto C4aba; a89e9: $domains = array_map("trim", $domains); goto F593c; cd69a: $response = $this->render("Frontend/Site/new-lets-encrypt-certificate.html.twig", ["site" => $site, "domains" => $domains, "form" => $form->createView(), "formErrors" => $this->formErrors]); goto d5e8e; f08b3: $domains = []; goto b5e18; Ff985: $site = $this->getSite($request); goto ccb9f; Ce5cc: $subdomain = false === empty($subdomain) ? $subdomain : null; goto D707e; ccb9f: if (false === is_null($site)) { goto c1530; } goto bb891; bb891: $response = $this->redirect($this->generateUrl("clp_sites")); goto E36a1; C4aba: $domains = array_filter($domains, function ($value) { return false === empty(trim($value)); }); goto a89e9; c9aba: goto d8bc6; goto D7930; b7330: if (!(false === is_null($response))) { goto Ec9d6; } goto A21be; b5e18: if (true === $request->isMethod("POST")) { goto E9d4f; } goto f80fb; f80fb: $resolvedDomainName = $this->domainNameParser->resolveDomainName($domainName); goto c0c06; B961f: E34f8: goto a9ded; F593c: $domains = array_unique($domains); goto C405c; c0c06: $registrableDomain = $resolvedDomainName->registrableDomain()->toString(); goto d44ae; d44ae: $subdomain = $resolvedDomainName->subDomain()->toString(); goto Ce5cc; a6404: if (!(true === $form->isSubmitted())) { goto Ff859; } goto D9074; d5e8e: F27bd: goto e349e; e349e: return $response; goto B17af; ed078: $domains = [$domainName]; goto Fb76e; b69ce: $domainName = $site->getDomainName(); goto E03b3; a8a69: d8bc6: goto cd69a; a9ded: $domains = [$registrableDomain, sprintf("www.%s", $registrableDomain)]; goto Aaca7; Aaca7: bf289: goto c9aba; e0c05: c1530: goto b69ce; A21be: return $response; goto fa063; Fb76e: goto bf289; goto B961f; E1e1a: $form->handleRequest($request); goto a6404; D7930: E9d4f: goto E1e1a; E36a1: goto F27bd; goto e0c05; C405c: $response = $this->handleLetsEncryptCertificateForm($request, $form, $site, $domains); goto b7330; e03ec: Ff859: goto a8a69; E03b3: $form = $this->createLetsEncryptCertificateForm($domainName); goto f08b3; D707e: if (true === is_null($subdomain) || "www" == $subdomain) { goto E34f8; } goto ed078; fa063: Ec9d6: goto e03ec; B17af: } private function createLetsEncryptCertificateForm(string $domainName) : Form { goto af82f; A1a73: return $form; goto Dea58; af82f: $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 F0d64; F0d64: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Create and Install"]); goto A1a73; Dea58: } private function handleLetsEncryptCertificateForm(Request $request, Form $form, Site $site, array $domains) { goto a1430; E44fc: f7f80: goto Bcec9; a1430: if (!(true === $form->isValid())) { goto f7f80; } goto a4800; Bcec9: $this->formErrors = $this->getErrorMessages($form); goto b681a; a4800: try { goto Baa20; Ffc7f: $certificateOrder = $letsEncryptClient->requestOrder($domains); goto B7be5; Ad091: EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_INSTALL, $user, $evenData, $request); goto Af855; ba3ff: b6003: goto Bbbf8; De9da: $distinguishedName = new DistinguishedName($commonName, $distinguishedNameDomains); goto aa677; Ee196: $letsEncryptPrivateKey = $this->configManager->get("le_private_key"); goto c295d; D7119: $certificateEntity->setCsr($certificate->getCsr()); goto E804a; F518a: return $response; goto da5dd; B4670: $distinguishedNameDomains = $domains; goto aed2b; fe483: $certificate = $letsEncryptClient->finalizeOrder($certificateOrder, $privateKey, $csr); goto Fdc38; Fdc38: $certificateEntity = $this->certificateEntityManager->createEntity(); goto E2d69; Fba22: $validationErrors = $letsEncryptClient->validateDomains($certificateOrder); goto D923d; c636b: $siteEntity->addCertificate($certificateEntity); goto Afa80; A9345: $response = $this->redirect($this->generateUrl("clp_sites")); goto fa9c1; da5dd: c88f6: goto d9829; Edb30: $response = $this->redirect($this->generateUrl("clp_site_certificates", ["domainName" => $site->getDomainName()])); goto F518a; Ccf5c: $siteUpdater->installCertificate($certificateEntity); goto Df2fd; a46fe: $letsEncryptClient = new LetsEncryptClient($privateKey); goto F5d0b; Af855: $session->getFlashBag()->set("success", $this->translator->trans("Certificate has been installed.")); goto Edb30; d5a91: $domainName = $site->getDomainName(); goto ee2c6; Ab57a: ce124: goto c52b6; Bbbf8: $user = $this->getUser(); goto Ee196; bbc6b: if (false === is_null($siteEntity)) { goto b6003; } goto A9345; c52b6: goto c88f6; goto fbf15; Baa20: $session = $request->getSession(); goto d5a91; Bc9b9: $csr = $csrGenerator->generate(); goto fe483; aa677: $rsaKeyGenerator = new RsaKeyGenerator(); goto E18c8; aed2b: $commonName = array_shift($distinguishedNameDomains); goto De9da; d630b: $siteUpdater = $this->getSiteUpdater($site); goto Ccf5c; Df2fd: $siteEntity->setCertificate($certificateEntity); goto c636b; df761: $siteUpdater->createLetsEncryptChallengeFiles($certificateOrder); goto Fba22; a473a: $csrGenerator = new CsrGenerator($privateKey, $distinguishedName); goto Bc9b9; Bcf6c: $siteUpdater->deleteLetsEncryptChallengeDirectory(); goto df761; A74a2: $certificateEntity->setCertificate($certificate->getCertificate()); goto C26fa; F5d0b: $letsEncryptClient->registerAccount(); goto Ffc7f; Afa80: $this->siteEntityManager->updateEntity($siteEntity); goto d4ec9; C26fa: $certificateEntity->setCertificateChain($certificate->getCertificateChain()); goto d630b; E804a: $certificateEntity->setPrivateKey($certificate->getPrivateKey()); goto A74a2; B7be5: $siteUpdater = $this->getSiteUpdater($site); goto Bcf6c; E2d69: $certificateEntity->setType(CertificateEntity::TYPE_LETS_ENCRYPT); goto e1ea0; fbf15: e6c3e: goto B4670; fdc50: foreach ($validationErrors as $domain => $validationErrorMessage) { $form->addError(new FormError(sprintf("%s: %s", $domain, $validationErrorMessage))); e7607: } goto Ab57a; D923d: if (true === empty($validationErrors)) { goto e6c3e; } goto fdc50; d9829: D03b5: goto E46ea; daa5d: goto D03b5; goto ba3ff; fa9c1: return $response; goto daa5d; E18c8: $privateKey = $rsaKeyGenerator->generatePrivateKey(); goto a473a; e1ea0: $certificateEntity->setSite($siteEntity); goto D7119; d4ec9: $evenData = ["site" => $domainName]; goto Ad091; c295d: $privateKey = new PrivateKey($letsEncryptPrivateKey); goto a46fe; ee2c6: $siteEntity = $this->getSiteEntity($domainName); goto bbc6b; E46ea: } 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 ea3b5; } $siteUpdater->deleteLetsEncryptChallengeDirectory(); ea3b5: } goto E44fc; b681a: } public function installCertificate(Request $request) : Response { goto B6f71; C86da: try { goto d5235; a245b: $response = $this->redirect($this->generateUrl("clp_site_certificates", ["domainName" => $site->getDomainName()])); goto Fbc01; dc8b0: if (!($siteEntity->getDomainName() == $certificateSiteEntity->getDomainName() && $siteEntity->getCertificate() != $certificateSiteEntity)) { goto Dd647; } goto E7d2c; Fbc01: return $response; goto C24d8; Aec93: F4bc9: goto ad9ec; bdc43: $uid = $request->get("uid"); goto Bfd8c; D581a: $siteUpdater->installCertificate($certificateEntity); goto eb728; A0659: $evenData = ["site" => $domainName]; goto ba3ef; D737c: if (!(false === is_null($siteEntity) && false === empty($uid) && false === is_null($certificateEntity))) { goto F4bc9; } goto dd7d3; ba3ef: EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_INSTALL, $user, $evenData, $request); goto ecd41; eb728: $siteEntity->setCertificate($certificateEntity); goto ac186; dd7d3: $certificateSiteEntity = $certificateEntity->getSite(); goto dc8b0; ea9d3: $certificateEntity = $this->certificateEntityManager->findOneByUid($uid); goto D737c; ac186: $this->siteEntityManager->updateEntity($siteEntity); goto A0659; Da812: $siteUpdater = $this->getSiteUpdater($site); goto D581a; ecd41: $session->getFlashBag()->set("success", $this->translator->trans("Certificate has been installed.")); goto a245b; d5235: $session = $request->getSession(); goto bdc43; C24d8: Dd647: goto Aec93; E7d2c: $user = $this->getUser(); goto Da812; Bfd8c: $domainName = $site->getDomainName(); goto a3556; a3556: $siteEntity = $this->getSiteEntity($domainName); goto ea9d3; ad9ec: } 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 c7a8a; c7a8a: Aeaf8: goto Ad1a5; B6f71: $site = $this->getSite($request); goto bf457; ba110: return $response; goto feeee; Ad1a5: $response = $this->redirect($this->generateUrl("clp_sites")); goto ba110; bf457: if (!(false === is_null($site))) { goto Aeaf8; } goto C86da; feeee: } public function deleteCertificate(Request $request) : Response { goto b81cf; a9bff: return $response; goto Cb1a8; dc325: B54f9: goto f7f5f; a573e: try { goto B34d2; F7684: $this->siteEntityManager->updateEntity($siteEntity); goto Edc69; ebaf8: $siteEntity->removeCertificate($certificateEntity); goto F7684; f94a7: if (!(false === is_null($siteEntity) && false === empty($uid) && false === is_null($certificateEntity) && false === $certificateEntity->getDefaultCertificate())) { goto f849f; } goto F47d0; B3115: $siteEntity = $this->getSiteEntity($domainName); goto Cfac6; a59d3: f849f: goto f5609; B34d2: $session = $request->getSession(); goto E7f8b; E7f8b: $uid = $request->get("uid"); goto a21ec; Cfac6: $certificateEntity = $this->certificateEntityManager->findOneByUid($uid); goto f94a7; Edc69: $evenData = ["site" => $domainName]; goto dfbbd; dfbbd: EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_DELETE, $user, $evenData, $request); goto E11c9; B2864: return $response; goto ed0c1; fb0d6: $response = $this->redirect($this->generateUrl("clp_site_certificates", ["domainName" => $site->getDomainName()])); goto B2864; ed0c1: a51d6: goto a59d3; F47d0: $certificateSiteEntity = $certificateEntity->getSite(); goto e5ab9; B5fed: $user = $this->getUser(); goto ebaf8; e5ab9: if (!($siteEntity->getDomainName() == $certificateSiteEntity->getDomainName() && $siteEntity->getCertificate() != $certificateSiteEntity)) { goto a51d6; } goto B5fed; a21ec: $domainName = $site->getDomainName(); goto B3115; E11c9: $session->getFlashBag()->set("success", $this->translator->trans("Certificate has been deleted.")); goto fb0d6; f5609: } 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 dc325; bf723: if (!(false === is_null($site))) { goto B54f9; } goto a573e; b81cf: $site = $this->getSite($request); goto bf723; f7f5f: $response = $this->redirect($this->generateUrl("clp_sites")); goto a9bff; Cb1a8: } public function databases(Request $request) : Response { goto D0f83; c1c92: foreach ($databases as $database) { $numberOfDatabaseUsers += count($database->getUsers()); C72da: } goto aa699; A23bf: d7a92: goto ea384; f57c8: b48af: goto e9d53; C43a9: goto d7a92; goto f57c8; f39f7: $numberOfDatabaseUsers = 0; goto c1c92; cc25c: if (false === is_null($site)) { goto b48af; } goto e6d1d; e9d53: $databases = $site->getDatabases(); goto C451f; e6d1d: $response = $this->redirect($this->generateUrl("clp_sites")); goto C43a9; b0a63: $response = $this->render("Frontend/Site/databases.html.twig", ["site" => $site, "databases" => $databases, "numberOfDatabaseUsers" => $numberOfDatabaseUsers, "databaseServer" => $databaseServerEntity]); goto A23bf; ea384: return $response; goto Fed7c; D0f83: $site = $this->getSite($request); goto cc25c; aa699: a4656: goto b0a63; C451f: $databaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto f39f7; Fed7c: } public function newDatabase(Request $request) : Response { goto Abd64; B34fb: F84e8: goto f8309; D1058: $response = $this->redirect($this->generateUrl("clp_sites")); goto D276f; D202f: $form->handleRequest($request); goto Afdfb; D175f: return $response; goto B382e; c68a3: $databaseEntity->setSite($siteEntity); goto D076b; f7c26: return $response; goto eb94e; a2fe6: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto E011d; Afdfb: if (!(true === $form->isSubmitted())) { goto Fecda; } goto E5cf2; Abd64: $site = $this->getSite($request); goto ad0da; D276f: goto D5a7d; goto Cccc5; E011d: $databaseEntity = $this->databaseEntityManager->createEntity(); goto c68a3; af3a3: if (!(false === is_null($response))) { goto eb38b; } goto f7c26; ad0da: if (false === is_null($site)) { goto dac4c; } goto D1058; E5cf2: $response = $this->handleDatabaseForm($request, $form, $site); goto af3a3; d9498: D5a7d: goto D175f; eb94e: eb38b: goto Ee89b; f8309: $response = $this->render("Frontend/Site/new-database.html.twig", ["site" => $site, "form" => $form->createView(), "formErrors" => $this->formErrors]); goto d9498; ee66e: if (!(true === $request->isMethod("POST"))) { goto F84e8; } goto D202f; Cccc5: dac4c: goto a2fe6; D076b: $form = $this->createDatabaseForm($site, $databaseEntity); goto ee66e; Ee89b: Fecda: goto B34fb; B382e: } private function createDatabaseForm(Site $site, DatabaseEntity $databaseEntity) : Form { goto F8498; a7397: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Add Database"]); goto bfd7a; bfd7a: return $form; goto f9c9b; F8498: $form = $this->createForm("App\Form\SiteDatabaseType", $databaseEntity, ["action" => $this->generateUrl("clp_site_database_new", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]); goto a7397; f9c9b: } private function handleDatabaseForm(Request $request, Form $form, Site $site) { goto F1c0d; ac37c: goto F995a; goto D0c95; F1c0d: if (true === $form->isValid()) { goto d41b7; } goto Cead5; Cff02: F995a: goto A990e; Cead5: $this->formErrors = $this->getErrorMessages($form); goto ac37c; C53e6: try { goto b0ef7; b0ef7: $user = $this->getUser(); goto Ea518; b5997: $databaseUserEntity = $this->databaseUserEntityManager->createEntity(); goto A3b40; f5268: $databaseEntity->setSite($siteEntity); goto f2c33; D9212: $activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto b9618; d64e3: $session->getFlashBag()->set("success", $this->translator->trans("Database has been added.")); goto a3bed; C2edf: return $response; goto c1c9a; f1a5b: $databaseManager->createUser($databaseUserEntity); goto d9268; Fa163: if (false === is_null($siteEntity)) { goto af686; } goto A3818; f8b6a: $eventData = ["site" => $domainName, "database" => $databaseEntity->getName(), "databaseUserName" => $databaseUserEntity->getUserName()]; goto Ad44f; d9268: $this->siteEntityManager->updateEntity($siteEntity); goto f8b6a; b4da4: c94a4: goto C2edf; E2290: $domainName = $site->getDomainName(); goto B5b3f; bdd71: $databaseEntity->setDatabaseServer($activeDatabaseServerEntity); goto f5268; fcc2f: af686: goto d3cc1; f2c33: $databaseUserName = $form->get("userName")->getData(); goto c5f8b; Eb02d: $databaseManager->createDatabase($databaseEntity); goto f1a5b; B5b3f: $siteEntity = $this->getSiteEntity($domainName); goto Fa163; D8238: goto c94a4; goto fcc2f; B0242: $databaseUserEntity->setDatabase($databaseEntity); goto f9dbc; a3bed: $response = $this->redirect($this->generateUrl("clp_site_databases", ["domainName" => $site->getDomainName()])); goto b4da4; A3b40: $databaseUserEntity->setUserName($databaseUserName); goto Abbed; f9dbc: $databaseEntity->addUser($databaseUserEntity); goto B0539; Ad44f: EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_ADD, $user, $eventData, $request); goto d64e3; A3818: $response = $this->redirect($this->generateUrl("clp_site_database_new", ["domainName" => $site->getDomainName()])); goto D8238; aa795: $databaseUserEntity->setPermissions(DatabaseUserEntity::PERMISSIONS_READ_WRITE); goto B0242; c5f8b: $databaseUserPassword = $form->get("userPassword")->getData(); goto b5997; B0539: $siteEntity->addDatabase($databaseEntity); goto Eb02d; Ea518: $session = $request->getSession(); goto E2290; b9618: $databaseManager = new DatabaseManager($activeDatabaseServerEntity); goto bdd71; Abbed: $databaseUserEntity->setPassword(Crypto::encrypt($databaseUserPassword)); goto aa795; d3cc1: $databaseEntity = $form->getData(); goto D9212; c1c9a: } 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 Cff02; D0c95: d41b7: goto C53e6; A990e: } public function deleteDatabase(Request $request) : Response { goto e4db7; E0ee6: $databaseEntity = $this->databaseEntityManager->findOneByName($databaseName); goto bbd6f; F2fc3: $response = $this->redirect($this->generateUrl("clp_site_databases", ["domainName" => $site->getDomainName()])); goto B9793; e4db7: $site = $this->getSite($request); goto b562d; b562d: if (!(false === is_null($site))) { goto a5421; } goto bbfff; E1549: d9341: goto f74cc; bbd6f: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto E61a8; D42d2: return $response; goto c538a; E61a8: if (!(false === is_null($databaseEntity) && $site->getDomainName() == $databaseEntity->getSite()->getDomainName() && false === is_null($siteEntity))) { goto d9341; } goto C95a5; C95a5: try { goto B3ee5; Fa8a9: $domainName = $site->getDomainName(); goto b6c42; b1aaf: $session->getFlashBag()->set("success", $this->translator->trans("Database has been deleted.")); goto b7e5b; e9ef7: $databaseManager->deleteDatabase($databaseEntity, true); goto C7f32; B3ee5: $user = $this->getUser(); goto F041f; F041f: $session = $request->getSession(); goto Fa8a9; Cb55c: $this->siteEntityManager->updateEntity($siteEntity); goto E2474; f6f98: EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_DELETE, $user, $eventData, $request); goto b1aaf; B17bd: $databaseManager = new DatabaseManager($databaseServerEntity); goto e9ef7; C7f32: $siteEntity->removeDatabase($databaseEntity); goto Cb55c; b6c42: $databaseServerEntity = $databaseEntity->getDatabaseServer(); goto B17bd; E2474: $eventData = ["site" => $domainName, "database" => $databaseEntity->getName()]; goto f6f98; b7e5b: } 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 F2fc3; B9793: return $response; goto E1549; Aa47f: $response = $this->redirect($this->generateUrl("clp_sites")); goto D42d2; bbfff: $databaseName = $request->get("databaseName"); goto E0ee6; f74cc: a5421: goto Aa47f; c538a: } public function phpMyAdmin(Request $request) : Response { goto E6f2b; c7dda: $response->headers->clearCookie("SignonSession"); goto e0137; De442: if (false === is_null($domainName)) { goto f2ddb; } goto B0709; Fb567: $phpMyAdminUrl = sprintf("https://%s:%s/phpmyadmin/login.php?host=%s&port=%s", $request->getHost(), $request->getPort(), $databaseServerHost, $databaseServerPort); goto Be84c; ea7f7: $databaseServerPort = $activeDatabaseServerEntity->getPort(); goto Fb567; e329b: de041: goto b650b; c1df3: if (!(false === is_null($databaseEntity) && $site->getDomainName() == $databaseEntity->getSite()->getDomainName())) { goto dd258; } goto facd8; b650b: c982c: goto C63bf; e0137: return $response; goto d37b1; Ac166: $response->headers->clearCookie("clp-pma"); goto fecb1; e3f59: dd258: goto e329b; bdd83: $phpMyAdminUrl = sprintf("https://%s:%s/phpmyadmin/login.php?host=%s&port=%s", $request->getHost(), $request->getPort(), $databaseServerHost, $databaseServerPort); goto F4090; e481e: goto a25dc; goto Bf4b4; E6f2b: $domainName = $request->get("domainName"); goto De442; Bf4b4: f2ddb: goto Ae01c; B0709: $activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto Bd2fb; Ae01c: $site = $this->getSite($request); goto B2cb8; a36ec: $databaseServerHost = urlencode(base64_encode($activeDatabaseServerEntity->getHost())); goto c2455; d37b1: F78c1: goto e481e; c2455: $databaseServerPort = $activeDatabaseServerEntity->getPort(); goto bdd83; cb4de: $cookie = new Cookie("clp-pma", $encryptedData); goto d3525; Bd2fb: if (!(false === is_null($activeDatabaseServerEntity))) { goto F78c1; } goto a36ec; Ae451: $databaseUserName = $request->get("databaseUserName"); goto e9991; Be84c: $data = ["host" => $activeDatabaseServerEntity->getHost(), "userName" => $databaseUserEntity->getUserName(), "password" => $databaseUserEntity->getDecryptedPassword(), "port" => $activeDatabaseServerEntity->getPort()]; goto fb634; fecb1: $response->headers->clearCookie("phpMyAdmin_https"); goto D792d; B2cb8: if (!(false === is_null($site))) { goto c982c; } goto Ae451; D792d: $response->headers->clearCookie("pmaAuth-1_https"); goto c7dda; facd8: $databaseServerHost = urlencode(base64_encode($activeDatabaseServerEntity->getHost())); goto ea7f7; F4090: $response = new RedirectResponse($phpMyAdminUrl); goto Ac166; B47b6: $encryptedData = trim(base64_encode($encryptedData)); goto cb4de; Dfdca: $activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto a006c; B7fc9: $encryptedData = Crypto::encrypt($data); goto B47b6; fb634: $data = serialize($data); goto B7fc9; a006c: if (!(false === is_null($activeDatabaseServerEntity) && false === is_null($activeDatabaseServerEntity))) { goto de041; } goto Bb16c; Cf39b: return $response; goto bf62a; d3525: $response = new RedirectResponse($phpMyAdminUrl); goto c5969; ae7cb: return $response; goto e3f59; c5969: $response->headers->setCookie($cookie); goto ae7cb; e9991: $databaseUserEntity = $this->databaseUserEntityManager->findOneByUserName($databaseUserName); goto Dfdca; b1a9c: $response = $this->redirect($this->generateUrl("clp_sites")); goto Cf39b; C63bf: a25dc: goto b1a9c; Bb16c: $databaseEntity = $databaseUserEntity->getDatabase(); goto c1df3; bf62a: } public function phpMyAdminLogout(Request $request) { goto Da4fc; Da4fc: $response = $this->redirect($this->generateUrl("clp_sites")); goto B02a5; B02a5: $response->headers->clearCookie("clp-pma"); goto a32f0; Fe8b1: return $response; goto ecf9f; a32f0: $response->headers->clearCookie("phpMyAdmin_https"); goto Bb924; c5902: $response->headers->clearCookie("SignonSession"); goto Fe8b1; Bb924: $response->headers->clearCookie("pmaAuth-1_https"); goto c5902; ecf9f: } public function newDatabaseUser(Request $request) : Response { goto B5427; e0ea7: da654: goto Aed7b; e3481: $databaseUserEntity->setSite($siteEntity); goto B5eae; e4633: if (!(false === is_null($response))) { goto D0598; } goto f495f; B5eae: $form = $this->createDatabaseUserForm($site, $databaseUserEntity); goto C5485; c3dc2: df993: goto df5dc; F3a13: $session = $request->getSession(); goto d82e2; df5dc: $databaseUserEntity = $this->databaseUserEntityManager->createEntity(); goto e3481; f4819: $domainName = $site->getDomainName(); goto A69da; efcbe: goto da654; goto b0ab9; Bc54f: D0598: goto a00ec; a95fc: goto ad447; goto c3dc2; Ba613: $response = $this->redirect($this->generateUrl("clp_site_databases", ["domainName" => $site->getDomainName()])); goto a95fc; Aed7b: return $response; goto B2e59; A1d7a: $response = $this->handleDatabaseUserForm($request, $form, $site); goto e4633; B5427: $site = $this->getSite($request); goto fc12d; D53b4: $response = $this->render("Frontend/Site/new-database-user.html.twig", ["site" => $site, "databaseUser" => $databaseUserEntity, "databases" => $databases, "form" => $form->createView(), "formErrors" => $this->formErrors]); goto Ef068; a00ec: d1d1e: goto a644f; Ef068: ad447: goto e0ea7; D85dc: $response = $this->redirect($this->generateUrl("clp_sites")); goto efcbe; f495f: return $response; goto Bc54f; dc417: if (!(true === $form->isSubmitted())) { goto d1d1e; } goto A1d7a; a0cc4: $form->handleRequest($request); goto dc417; fc12d: if (false === is_null($site)) { goto f6737; } goto D85dc; A69da: $siteEntity = $this->getSiteEntity($domainName); goto e0c20; e0c20: if (count($databases) && false === is_null($siteEntity)) { goto df993; } goto F3a13; a644f: a7367: goto D53b4; d82e2: $session->getFlashBag()->set("danger", $this->translator->trans("No database found; create a database first.")); goto Ba613; b0ab9: f6737: goto Aa6e0; C5485: if (!(true === $request->isMethod("POST"))) { goto a7367; } goto a0cc4; Aa6e0: $databases = $site->getDatabases(); goto f4819; B2e59: } private function createDatabaseUserForm(Site $site, DatabaseUserEntity $databaseUserEntity) : Form { goto B5a52; De8db: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Add Database User"]); goto C741b; C741b: return $form; goto ddc65; B5a52: $form = $this->createForm("App\Form\SiteDatabaseUserType", $databaseUserEntity, ["action" => $this->generateUrl("clp_site_database_user_new", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]); goto De8db; ddc65: } private function handleDatabaseUserForm(Request $request, Form $form, Site $site) { goto e02bf; f078f: goto c113e; goto A74e3; A74e3: f0dfb: goto c1e51; a2287: c113e: goto dbca0; c1e51: try { goto Eff11; fc56c: $session->getFlashBag()->set("success", $this->translator->trans("Database User has been added.")); goto E3682; Ee8f1: $encryptedPassword = Crypto::encrypt($databaseUserEntity->getPassword()); goto ecce6; da66e: return $response; goto Ff77c; E3682: $response = $this->redirect($this->generateUrl("clp_site_databases", ["domainName" => $site->getDomainName()])); goto cc0b2; f8c79: $response = $this->redirect($this->generateUrl("clp_site_database_user_new", ["domainName" => $site->getDomainName()])); goto Fe989; E68b1: $databaseManager = new DatabaseManager($activeDatabaseServerEntity); goto a3d62; cc0b2: E9158: goto da66e; Eff11: $user = $this->getUser(); goto B74f7; e7d48: EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_USER_ADD, $user, $eventData, $request); goto fc56c; a3d62: $databaseManager->createUser($databaseUserEntity); goto D1a9d; B5b46: $domainName = $site->getDomainName(); goto bc26d; ef3af: Eb025: goto F2b08; d959b: $activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto E68b1; a314b: $databaseEntity = $databaseUserEntity->getDatabase(); goto a88d2; ecce6: $databaseUserEntity->setPassword($encryptedPassword); goto d959b; B74f7: $session = $request->getSession(); goto B5b46; F2b08: $databaseUserEntity = $form->getData(); goto Ee8f1; D1a9d: $this->databaseUserEntityManager->updateEntity($databaseUserEntity); goto a314b; Fe989: goto E9158; goto ef3af; bc26d: $siteEntity = $this->getSiteEntity($domainName); goto c8647; a61a5: $eventData = ["site" => $domainName, "databaseUserName" => $databaseUserEntity->getUserName(), "permissions" => $databaseUserEntity->getPermissions(), "database" => $databaseName]; goto e7d48; c8647: if (false === is_null($siteEntity)) { goto Eb025; } goto f8c79; a88d2: $databaseName = $databaseEntity->getName(); goto a61a5; Ff77c: } 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 a2287; e02bf: if (true === $form->isValid()) { goto f0dfb; } goto e1c53; e1c53: $this->formErrors = $this->getErrorMessages($form); goto f078f; dbca0: } public function editDatabaseUser(Request $request) : Response { goto F8482; c11bd: $response = $this->handleDatabaseUserEditForm($request, $form, $site); goto c7da5; F8482: $site = $this->getSite($request); goto c76ce; b7206: $response = $this->redirect($this->generateUrl("clp_site_databases", ["domainName" => $site->getDomainName()])); goto B97b9; d6867: $session->getFlashBag()->set("danger", $this->translator->trans("No database found; create a database first.")); goto b7206; D7dea: ed9dc: goto F8642; ffe5c: a5cc9: goto Fce74; cb2ae: ac53d: goto af75e; A6026: E6734: goto c346a; cec98: $response = $this->render("Frontend/Site/edit-database-user.html.twig", ["site" => $site, "databaseUser" => $databaseUserEntity, "form" => $form->createView(), "formErrors" => $this->formErrors]); goto A39e4; A4532: return $response; goto e6447; B97b9: goto dc79b; goto A6026; af75e: return $response; goto d223b; fc7bf: if (!(false === is_null($databaseUserEntity))) { goto a8ac2; } goto bb927; c76ce: if (false === is_null($site)) { goto ed9dc; } goto Bddcd; bb927: $databaseUserEntity->setPassword(''); goto D4ed7; Fce74: e1c97: goto cec98; F8642: $databases = $site->getDatabases(); goto e0f70; e1c32: dc79b: goto cb2ae; e6447: aacf3: goto ffe5c; c5ce0: $databaseUserEntity = $this->databaseUserEntityManager->findOneByUserName($databaseUserName); goto fc7bf; Dd0d4: $siteEntity = $this->getSiteEntity($domainName); goto b1c1b; Bddcd: $response = $this->redirect($this->generateUrl("clp_sites")); goto ed167; A39e4: a8ac2: goto e1c32; c7da5: if (!(false === is_null($response))) { goto aacf3; } goto A4532; e0972: $session = $request->getSession(); goto d6867; ed167: goto ac53d; goto D7dea; b1c1b: if (count($databases) && false === is_null($siteEntity)) { goto E6734; } goto e0972; A1882: if (!(true === $form->isSubmitted())) { goto a5cc9; } goto c11bd; e0f70: $domainName = $site->getDomainName(); goto Dd0d4; D4ed7: $form = $this->createDatabaseUserEditForm($site, $databaseUserEntity); goto D60bc; D60bc: if (!(true === $request->isMethod("POST"))) { goto e1c97; } goto ae0c1; c346a: $databaseUserName = $request->get("databaseUserName"); goto c5ce0; ae0c1: $form->handleRequest($request); goto A1882; d223b: } private function createDatabaseUserEditForm(Site $site, DatabaseUserEntity $databaseUserEntity) : Form { goto C24a8; C24a8: $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 Fe153; Fe153: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]); goto Ae49c; Ae49c: return $form; goto C594b; C594b: } private function handleDatabaseUserEditForm(Request $request, Form $form, Site $site) { goto B7bd3; Ed8d1: try { goto c549e; cde7b: goto F3282; goto b2cbf; E81bb: $encryptedPassword = Crypto::encrypt($databaseUserEntity->getPassword()); goto e2370; f8e8f: $this->databaseUserEntityManager->updateEntity($databaseUserEntity); goto C8666; e7565: $databaseManager->createUser($databaseUserEntity); goto f8e8f; ee595: $response = $this->redirect($this->generateUrl("clp_site_database_user_new", ["domainName" => $site->getDomainName()])); goto cde7b; Bfe63: $databaseUserEntity = $form->getData(); goto E81bb; b2cbf: C69e2: goto Bfe63; e2370: $databaseUserEntity->setPassword($encryptedPassword); goto D2aca; f55b9: if (false === is_null($siteEntity)) { goto C69e2; } goto ee595; B2374: $eventData = ["site" => $domainName, "databaseUserName" => $databaseUserEntity->getUserName(), "permissions" => $databaseUserEntity->getPermissions(), "database" => $databaseName]; goto d1a01; c549e: $user = $this->getUser(); goto Bb164; d222d: $session->getFlashBag()->set("success", $this->translator->trans("Database User has been updated.")); goto Fe903; f3653: $domainName = $site->getDomainName(); goto C5776; Bb164: $session = $request->getSession(); goto f3653; D2aca: $activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto Ebf8e; C5776: $siteEntity = $this->getSiteEntity($domainName); goto f55b9; d1a01: EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_USER_EDIT, $user, $eventData, $request); goto d222d; Ebf8e: $databaseManager = new DatabaseManager($activeDatabaseServerEntity); goto e7565; d84c9: F3282: goto D3714; C8666: $databaseEntity = $databaseUserEntity->getDatabase(); goto B369a; D3714: return $response; goto f3ce0; B369a: $databaseName = $databaseEntity->getName(); goto B2374; Fe903: $response = $this->redirect($this->generateUrl("clp_site_databases", ["domainName" => $site->getDomainName()])); goto d84c9; f3ce0: } 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 Dab77; C91db: goto F2d08; goto d86f2; d86f2: C1216: goto Ed8d1; bad62: $this->formErrors = $this->getErrorMessages($form); goto C91db; Dab77: F2d08: goto eae87; B7bd3: if (true === $form->isValid()) { goto C1216; } goto bad62; eae87: } public function deleteDatabaseUser(Request $request) : Response { goto c8fb1; E2171: return $response; goto c0bbd; d927f: $response = $this->redirect($this->generateUrl("clp_sites")); goto E2171; d355d: if (!(false === is_null($databaseUserEntity))) { goto bc696; } goto B4154; C6bde: $response = $this->redirect($this->generateUrl("clp_site_databases", ["domainName" => $site->getDomainName()])); goto c0130; B4154: try { goto Fc3ef; Ef225: $session = $request->getSession(); goto F9b5a; Ad0e8: EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_USER_DELETE, $user, $eventData, $request); goto e951d; F8397: if (!(false === is_null($databaseEntity) && $site->getDomainName() == $databaseEntity->getSite()->getDomainName())) { goto F3187; } goto c0ea8; a13ad: $databaseManager->deleteUser($databaseUserEntity); goto d91e8; e951d: F3187: goto abe99; ca006: $databaseManager = new DatabaseManager($activeDatabaseServerEntity); goto a13ad; Bd171: $eventData = ["site" => $domainName, "databaseUserName" => $databaseUserName]; goto Ad0e8; ad9c9: $domainName = $site->getDomainName(); goto Ef225; Fc3ef: $databaseEntity = $databaseUserEntity->getDatabase(); goto F8397; d91e8: $this->databaseUserEntityManager->deleteEntity($databaseUserEntity); goto e0ed3; c0ea8: $user = $this->getUser(); goto ad9c9; e0ed3: $session->getFlashBag()->set("success", $this->translator->trans("Database User has been deleted.")); goto Bd171; F9b5a: $activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto ca006; abe99: } 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 C6bde; D0d8b: bc696: goto f6301; cbdbc: if (!(false === is_null($site))) { goto D6312; } goto A4ec9; c391f: $databaseUserEntity = $this->databaseUserEntityManager->findOneByUserName($databaseUserName); goto d355d; f6301: D6312: goto d927f; c0130: return $response; goto D0d8b; c8fb1: $site = $this->getSite($request); goto cbdbc; A4ec9: $databaseUserName = $request->get("databaseUserName"); goto c391f; c0bbd: } public function varnishCache(Request $request) : Response { goto a1f87; D1e09: if (!(true === $request->isMethod("POST"))) { goto cddd7; } goto c987f; E836c: if (!(true === $purgeCacheForm->isSubmitted())) { goto e4148; } goto F8f98; d6b0b: $settingsForm = $this->createVarnishCacheSettingsForm($site, $varnishCacheSettingsData); goto f36a1; C2dcb: cddd7: goto ac3f3; aede4: $response = $this->redirect($this->generateUrl("clp_sites")); goto C020a; c987f: $settingsForm->handleRequest($request); goto a9704; a1f94: $varnishCacheSettings = $site->getVarnishCacheSettings(); goto fe218; F8f98: $response = $this->handleVarnishCachePurgeCacheForm($request, $purgeCacheForm, $site); goto A9fde; E54e5: return $response; goto dfb81; C020a: goto b8162; goto ac5b4; ac5b4: c63ea: goto a1f94; b311e: if (!(true === $settingsForm->isSubmitted())) { goto C01eb; } goto Cd2ae; Cd2ae: $response = $this->handleVarnishCacheSettingsForm($request, $settingsForm, $site); goto f186e; a1f87: $site = $this->getSite($request); goto b058f; E4221: return $response; goto F2743; ad98c: C01eb: goto E836c; dfb81: E1e2a: goto ec2ff; A9fde: if (!(false === is_null($response))) { goto E1e2a; } goto E54e5; b058f: if (false === is_null($site) && true === $site->getVarnishCache()) { goto c63ea; } goto aede4; f36a1: $purgeCacheForm = $this->createVarnishCachePurgeCacheForm($site); goto D1e09; fe218: $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 d6b0b; Cd1f8: return $response; goto e251a; a9704: $purgeCacheForm->handleRequest($request); goto b311e; ec2ff: e4148: goto C2dcb; F2743: b4b34: goto ad98c; f186e: if (!(false === is_null($response))) { goto b4b34; } goto E4221; E2de5: b8162: goto Cd1f8; ac3f3: $response = $this->render("Frontend/Site/varnish-cache.html.twig", ["site" => $site, "settingsForm" => $settingsForm->createView(), "purgeCacheForm" => $purgeCacheForm->createView(), "formErrors" => $this->formErrors]); goto E2de5; e251a: } private function createVarnishCacheSettingsForm(Site $site, array $data) : Form { goto E2f9b; E2f9b: $form = $this->createForm("App\Form\SiteVarnishCacheSettingsType", $data, ["action" => $this->generateUrl("clp_site_varnish_cache", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]); goto Bd9a4; Bd9a4: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]); goto Fe3bc; Fe3bc: return $form; goto B57ee; B57ee: } private function createVarnishCachePurgeCacheForm(Site $site) : Form { goto C21e2; C21e2: $form = $this->createForm("App\Form\SiteVarnishCachePurgeCacheType", ["site" => $site], ["action" => $this->generateUrl("clp_site_varnish_cache", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]); goto dc7d6; dc7d6: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Purge Cache"]); goto F9c8f; F9c8f: return $form; goto c328b; c328b: } private function handleVarnishCacheSettingsForm(Request $request, Form $form, Site $site) { goto A1f9b; e742c: goto Bd62e; goto edb06; F0abd: Bd62e: goto e20f7; A8291: try { goto c29b5; B4b71: if (false === is_null($siteEntity)) { goto b1165; } goto bf4d1; c29b5: $session = $request->getSession(); goto B4135; fab6c: goto C34fa; goto Ee8d6; Fc22a: $user = $this->getUser(); goto C0889; fd704: $siteEntity = $this->getSiteEntity($domainName); goto B4b71; C94b5: $siteUpdater->writeVarnishCacheSettingsFile($varnishCacheSettings); goto A91cd; C0889: $isEnabled = $form->get("isEnabled")->getData(); goto B2f27; Eb483: $excludes = array_map("trim", array_filter(explode(PHP_EOL, trim($form->get("excludes")->getData())))); goto f5ae4; f5ae4: $varnishCacheSettings = ["enabled" => $isEnabled, "server" => $server, "cacheTagPrefix" => $cacheTagPrefix, "cacheLifetime" => $cacheLifetime, "excludes" => $excludes, "excludedParams" => $excludedParams]; goto a7dbd; B4135: $domainName = $site->getDomainName(); goto fd704; Dfb3e: $response = $this->redirect($this->generateUrl("clp_site_varnish_cache", ["domainName" => $site->getDomainName()])); goto a9a21; ef517: $excludedParams = array_map("trim", array_filter(explode(",", trim($form->get("excludedParams")->getData())))); goto Eb483; B2f27: $server = $form->get("server")->getData(); goto c62b1; a46ce: $session->getFlashBag()->set("success", $this->translator->trans("Varnish Cache Settings have been saved.")); goto Dfb3e; cc144: return $response; goto F4538; B9c87: EventQueue::addEvent(EventQueue::EVENT_SITE_VARNISH_CACHE_SETTINGS_UPDATE, $user, $eventData, $request); goto a46ce; f9801: $eventData = ["site" => $domainName, "varnishCacheEnabled" => $isEnabled, "server" => $server, "cacheTagPrefix" => $cacheTagPrefix, "cacheLifetime" => $cacheLifetime, "excludes" => $excludes, "excludedParams" => $excludedParams]; goto B9c87; c62b1: $cacheLifetime = $form->get("cacheLifetime")->getData(); goto D48be; a7dbd: $site->setVarnishCacheSettings($varnishCacheSettings); goto f0c6b; f0c6b: $siteUpdater = $this->getSiteUpdater($site); goto C94b5; D48be: $cacheTagPrefix = $form->get("cacheTagPrefix")->getData(); goto ef517; a9a21: C34fa: goto cc144; bf4d1: $response = $this->redirect($this->generateUrl("clp_sites")); goto fab6c; A91cd: $siteUpdater->phpSettings(); goto f9801; Ee8d6: b1165: goto Fc22a; F4538: } 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 F0abd; A1f9b: if (true === $form->isValid()) { goto B6faa; } goto Af90d; edb06: B6faa: goto A8291; Af90d: $this->formErrors = $this->getErrorMessages($form); goto e742c; e20f7: } private function handleVarnishCachePurgeCacheForm(Request $request, Form $form, Site $site) { goto c0ff8; aa06b: $this->formErrors = $this->getErrorMessages($form); goto F85da; E72d1: try { goto ea316; d8fd8: $varnishCacheSettings = $site->getVarnishCacheSettings(); goto fd56f; b6c0d: EventQueue::addEvent(EventQueue::EVENT_SITE_VARNISH_CACHE_PURGE, $user, $eventData, $request); goto Fc26c; bc7ab: if (false === is_null($siteEntity)) { goto E769d; } goto dd25a; ecbbc: foreach ($purgeValues as $purgeValue) { goto C0326; da7ee: Cd1a5: goto cae8c; Ad80d: $varnishCacheClient->purgeTag($purgeValue); goto Af11d; E293c: Ad737: goto Dd528; a1ada: if (true === str_starts_with($purgeValue, "http")) { goto A192b; } goto Ad80d; F7417: A192b: goto a150a; Af11d: goto Ad737; goto F7417; C0326: $purgeValue = trim($purgeValue); goto f5754; a150a: $varnishCacheClient->purgeUrl($purgeValue); goto E293c; f5754: if (!(false === empty($purgeValue))) { goto d2b7e; } goto a1ada; Dd528: d2b7e: goto da7ee; cae8c: } goto Cfd03; A5930: $user = $this->getUser(); goto d8fd8; dd25a: $response = $this->redirect($this->generateUrl("clp_sites")); goto D6609; ea316: $session = $request->getSession(); goto bb9b7; Cfd03: ad878: goto fcd70; a89e4: $eventData = ["site" => $domainName, "values" => implode(",", $purgeValues)]; goto b6c0d; B32ac: $siteEntity = $this->getSiteEntity($domainName); goto bc7ab; e1abb: if (false === empty($purgeValues) && true === isset($varnishCacheSettings["server"]) && false === empty($varnishCacheSettings["server"])) { goto D0ae2; } goto B1d9b; Abfb2: E769d: goto A5930; Cf8cb: D0ae2: goto ffacf; D6609: goto bcc02; goto Abfb2; fd56f: $purgeValues = array_map("trim", array_filter(explode(",", trim($form->get("value")->getData())))); goto e1abb; fcd70: Fc43d: goto a89e4; B1d9b: throw new \Exception("Varnish Cache Settings cannot be empty."); goto Df493; bb9b7: $domainName = $site->getDomainName(); goto B32ac; E4e23: $response = $this->redirect($this->generateUrl("clp_site_varnish_cache", ["domainName" => $site->getDomainName()])); goto Dec82; Df493: goto Fc43d; goto Cf8cb; ffacf: $varnishCacheClient = new VarnishCacheClient(); goto bdc6f; bdc6f: $varnishCacheClient->setServer($varnishCacheSettings["server"]); goto ecbbc; c1d4f: return $response; goto Dedcd; Fc26c: $session->getFlashBag()->set("success", $this->translator->trans("Varnish Cache has been purged.")); goto E4e23; Dec82: bcc02: goto c1d4f; Dedcd: } 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 ce8bf; b5fa6: A894d: goto E72d1; ce8bf: cebba: goto b4173; F85da: goto cebba; goto b5fa6; c0ff8: if (true === $form->isValid()) { goto A894d; } goto aa06b; b4173: } public function purgeVarnishCache(Request $request) : Response { goto af2fa; af2fa: $site = $this->getSite($request); goto e223c; a01ba: return $response; goto d0381; Dff8a: try { goto C27af; E809b: $varnishCacheClient->setServer($varnishCacheSettings["server"]); goto d9d11; d9d11: $varnishCacheClient->purgeTag($cacheTagPrefix); goto C1e14; a3c7a: $cacheTagPrefix = $varnishCacheSettings["cacheTagPrefix"]; goto Dae2d; D7305: if (!(true === isset($varnishCacheSettings["server"]) && true === isset($varnishCacheSettings["cacheTagPrefix"]) && false === empty($varnishCacheSettings["cacheTagPrefix"]))) { goto B9a0d; } goto a3c7a; C27af: $user = $this->getUser(); goto d5bcc; D4c5f: $varnishCacheSettings = $site->getVarnishCacheSettings(); goto D7305; e2097: $eventData = ["site" => $domainName, "purge" => "full"]; goto ac6c3; b512f: $session->getFlashBag()->set("success", $this->translator->trans("Varnish Cache has been purged.")); goto Fc03a; Dae2d: $varnishCacheClient = new VarnishCacheClient(); goto E809b; C1e14: $varnishCacheClient->purgeHost($domainName); goto Fab99; c42f2: $domainName = $site->getDomainName(); goto D4c5f; Fab99: B9a0d: goto e2097; d5bcc: $session = $request->getSession(); goto c42f2; ac6c3: EventQueue::addEvent(EventQueue::EVENT_SITE_VARNISH_CACHE_PURGE, $user, $eventData, $request); goto b512f; Fc03a: } 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 B7283; fc535: $response = $this->redirect($this->generateUrl("clp_sites")); goto a74b5; B7283: $response = $this->redirect($this->generateUrl("clp_site_varnish_cache", ["domainName" => $site->getDomainName()])); goto F8a0f; F8a0f: return $response; goto B86de; a74b5: goto Ae6cb; goto fd54d; e223c: if (false === is_null($site)) { goto b0af7; } goto fc535; B86de: Ae6cb: goto a01ba; fd54d: b0af7: goto Dff8a; d0381: } public function vhost(Request $request) : Response { goto D3724; a5ea4: return $response; goto B8499; b72c5: if (false === is_null($site)) { goto ba97e; } goto D40e5; D40e5: $response = $this->redirect($this->generateUrl("clp_sites")); goto D35de; ae936: $site->setVhostTemplate($vhostTemplate); goto D2ea5; fbcf6: if (!(true === $request->isMethod("POST"))) { goto B6609; } goto d5c93; fdbd1: if (!(false === empty($vhostTemplate))) { goto F8501; } goto E8ff7; D2cf1: $oldVhostTemplate = $siteEntity->getVhostTemplate(); goto ae936; b923a: B6609: goto D9bc7; d5c93: $vhostTemplate = trim($request->get("vhost-template")); goto fdbd1; D2ea5: $response = $this->handleVhostUpdate($request, $site, $siteEntity, $oldVhostTemplate); goto dd952; e3e81: F8501: goto b923a; Aa5b4: ba97e: goto fbcf6; dd952: if (!(false === is_null($response))) { goto Ccaa5; } goto F1de1; D3724: $site = $this->getSite($request); goto b72c5; D35de: goto D542e; goto Aa5b4; Db32e: D542e: goto a5ea4; E8ff7: $domainName = $site->getDomainName(); goto E1ceb; E1ceb: $siteEntity = $this->getSiteEntity($domainName); goto D2cf1; F1de1: return $response; goto De789; D9bc7: $response = $this->render("Frontend/Site/vhost.html.twig", ["site" => $site]); goto Db32e; De789: Ccaa5: goto e3e81; B8499: } private function handleVhostUpdate(Request $request, Site $site, SiteEntity $siteEntity, string $oldVhostTemplate) { try { goto Ca4be; A6d0a: return $response; goto E9fa6; Ca4be: $user = $this->getUser(); goto f188e; ac2c1: $eventData = ["site" => $domainName, "vhost" => $vhostTemplate, "oldVhost" => $oldVhostTemplate]; goto a2562; b6b2d: $siteUpdater = $this->getSiteUpdater($site); goto cd3bc; e99c2: $vhostTemplate = $site->getVhostTemplate(); goto b6b2d; f188e: $session = $request->getSession(); goto ed364; cd3bc: $siteUpdater->updateNginxVhostWithRollback(); goto Ee7c5; B2ad2: $session->getFlashBag()->set("success", $this->translator->trans("Vhost has been saved.")); goto ac2c1; a2562: EventQueue::addEvent(EventQueue::EVENT_SITE_VHOST_UPDATE, $user, $eventData, $request); goto Da7db; Ee7c5: $siteEntity->setVhostTemplate($vhostTemplate); goto B183a; ed364: $domainName = $site->getDomainName(); goto e99c2; Da7db: $response = $this->redirect($this->generateUrl("clp_site_vhost", ["domainName" => $domainName])); goto A6d0a; B183a: $this->siteEntityManager->updateEntity($siteEntity); goto B2ad2; E9fa6: } 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 cbd1a; c32f5: if (!(true === $request->isMethod("POST"))) { goto b8df7; } goto df6b7; ba279: $domainSettingsForm = $this->createDomainSettingsForm($site, $domainSettingsData); goto Ffef7; bba31: $parameters["phpSettingsForm"] = $phpSettingsForm->createView(); goto F3644; Aa9ae: if (!(true === $reverseProxySettingsForm->isSubmitted())) { goto bb553; } goto d80f0; b21c3: Bb04e: goto A115e; A115e: $parameters["reverseProxySettingsForm"] = $reverseProxySettingsForm->createView(); goto c07d8; F0f82: b8df7: goto Fe874; E8d90: $currentPhpSettings = clone $phpSettings; goto Fed33; Ee924: $phpSettings = $site->getPhpSettings(); goto Acb8d; c3db9: bf6da: goto bb9d2; B7fd7: $pythonSettingsForm->handleRequest($request); goto e38db; dddd9: $pageSpeedSettingsForm = $this->createPageSpeedSettingsForm($site, $pageSpeedSettingsData); goto B3d35; Ed94b: $siteUserSettingsData = ["siteUser" => $site->getUser(), "sshKeys" => $site->getSshKeys()]; goto Ebff6; d238d: D6acd: goto f3f5c; C637d: $response = $this->handlePageSpeedSettingsForm($request, $pageSpeedSettingsForm, $site); goto Ae8e3; f42ad: $response = $this->handleNodejsSettingsForm($request, $nodejsSettingsForm, $currentNodeSettings, $site); goto cacad; d80f0: $response = $this->handleReverseProxySettingsForm($request, $reverseProxySettingsForm, $site); goto fdd2c; a1afb: C7d90: goto F38bf; Bc7ef: B7fdc: goto bba31; B9f6c: if (!(false === is_null($response))) { goto F4c4c; } goto C7643; e38db: if (!(true === $pythonSettingsForm->isSubmitted())) { goto D8e9a; } goto F9989; Af9d8: if (!(true === $phpSettingsForm->isSubmitted())) { goto Ecb05; } goto D4d5c; a40dd: if (!(SiteEntity::TYPE_PHP == $site->getType())) { goto A8e5e; } goto Ee924; e3f9b: return $response; goto a92cb; A997d: if (!(true === $request->isMethod("POST"))) { goto C7d90; } goto B7fd7; E814b: Aa52d: goto B76ec; B3d35: $siteDeleteForm = $this->createSiteDeleteForm($site, $siteDeleteData); goto c32f5; Ae8e3: D2405: goto C198d; f3f5c: if (!(true === $siteUserSettingsForm->isSubmitted())) { goto Dc7ca; } goto Dd98c; a00b5: $reverseProxySettingsForm = $this->createReverseProxySettingsForm($site); goto F7f00; Cd3a7: cf017: goto c0a32; D4d5c: $response = $this->handlePhpSettingsForm($request, $phpSettingsForm, $currentPhpSettings, $site); goto c0089; Fc23b: B4236: goto F20ce; f798e: if (!(SiteEntity::TYPE_NODEJS == $site->getType())) { goto ab2d3; } goto e22ec; Bd7c4: bb553: goto b21c3; c07d8: unset($parameters["pageSpeedSettingsForm"]); goto c78ba; Cac0d: if (!(true === $domainSettingsForm->isSubmitted())) { goto D6acd; } goto Eebed; f2c5c: $pythonSettings = $site->getPythonSettings(); goto a0b21; Bbeba: if (!(true === $request->isMethod("POST"))) { goto B7fdc; } goto E8d90; cacad: if (!(false === is_null($response))) { goto Aa52d; } goto C931c; f562b: $response = $this->render("Frontend/Site/settings.html.twig", $parameters); goto Ba1f6; ccbc6: if (false === is_null($site)) { goto ec3cf; } goto Bc0bc; F7f00: if (!(true === $request->isMethod("POST"))) { goto Bb04e; } goto e0287; Fe874: $parameters = ["site" => $site, "domainSettingsForm" => $domainSettingsForm->createView(), "siteUserSettingsForm" => $siteUserSettingsForm->createView(), "pageSpeedSettingsForm" => $pageSpeedSettingsForm->createView(), "siteDeleteForm" => $siteDeleteForm->createView()]; goto f798e; caced: $currentNodeSettings = clone $nodejsSettings; goto F3bc4; C5bc1: Dc7ca: goto d2aba; Ab4a1: $siteUserSettingsForm->handleRequest($request); goto c578d; c0a32: $parameters["nodejsSettingsForm"] = $nodejsSettingsForm->createView(); goto b239b; Dd98c: $response = $this->handleSiteUserSettingsForm($request, $siteUserSettingsForm, $site); goto C5bc1; c0089: if (!(false === is_null($response))) { goto B4236; } goto D1872; f39d7: return $response; goto e2445; Eebed: $response = $this->handleDomainSettingsForm($request, $domainSettingsForm, $site); goto d238d; Ce99d: ec3cf: goto df19c; C2d28: return $response; goto E3830; cbc56: if (!(false === is_null($response))) { goto b770c; } goto f39d7; D9143: if (!(SiteEntity::TYPE_PYTHON == $site->getType())) { goto bf6da; } goto f2c5c; cbd1a: $site = $this->getSite($request); goto ccbc6; Ebff6: $siteDeleteData = ["domainName" => $site->getDomainName()]; goto c20e9; F3bc4: $nodejsSettingsForm->handleRequest($request); goto E6294; ed8b1: e27ec: goto cbc56; Ba1f6: Ee6d6: goto e3f9b; C7643: return $response; goto b49a1; fdd2c: if (!(false === is_null($response))) { goto f6e08; } goto C2d28; c20e9: $pageSpeedSettingsData = ["isEnabled" => $site->getPageSpeedEnabled(), "settings" => $site->getPageSpeedSettings()]; goto ba279; e2445: b770c: goto F0f82; df19c: $domainSettingsData = ["domainName" => $site->getDomainName(), "rootDirectory" => $site->getRootDirectory()]; goto Ed94b; b87aa: $response = $this->handleSiteDeleteForm($request, $siteDeleteForm, $site); goto ed8b1; F9989: $response = $this->handlePythonSettingsForm($request, $pythonSettingsForm, $site); goto B9f6c; bb9d2: if (!(SiteEntity::TYPE_REVERSE_PROXY == $site->getType())) { goto f896f; } goto a00b5; Acb8d: $phpSettingsForm = $this->createPhpSettingsForm($site, $phpSettings); goto Bbeba; D1872: return $response; goto Fc23b; b49a1: F4c4c: goto B3e6b; E3830: f6e08: goto Bd7c4; Fed33: $phpSettingsForm->handleRequest($request); goto Af9d8; C198d: if (!(true === $siteDeleteForm->isSubmitted())) { goto e27ec; } goto b87aa; Db289: $nodejsSettingsForm = $this->createNodejsSettingsForm($site, $nodejsSettings); goto d8957; Cb3b9: $parameters["formErrors"] = $this->formErrors; goto f562b; c78ba: f896f: goto Cb3b9; Ac62f: ab2d3: goto a40dd; d8957: if (!(true === $request->isMethod("POST"))) { goto cf017; } goto caced; E6294: if (!(true === $nodejsSettingsForm->isSubmitted())) { goto A4278; } goto f42ad; B76ec: A4278: goto Cd3a7; C931c: return $response; goto E814b; d2aba: if (!(true === $pageSpeedSettingsForm->isSubmitted())) { goto D2405; } goto C637d; B6909: $response = null; goto Cac0d; Ffef7: $siteUserSettingsForm = $this->createSiteUserSettingsForm($site, $siteUserSettingsData); goto dddd9; e75d4: $pageSpeedSettingsForm->handleRequest($request); goto B6909; df6b7: $domainSettingsForm->handleRequest($request); goto Ab4a1; c578d: $siteDeleteForm->handleRequest($request); goto e75d4; F38bf: $parameters["pythonSettingsForm"] = $pythonSettingsForm->createView(); goto c3db9; a0b21: $pythonSettingsForm = $this->createPythonSettingsForm($site, $pythonSettings); goto A997d; e0287: $reverseProxySettingsForm->handleRequest($request); goto Aa9ae; B3e6b: D8e9a: goto a1afb; e00f5: goto Ee6d6; goto Ce99d; Bc0bc: $response = $this->redirect($this->generateUrl("clp_sites")); goto e00f5; F3644: A8e5e: goto D9143; e22ec: $nodejsSettings = $site->getNodejsSettings(); goto Db289; b239b: unset($parameters["pageSpeedSettingsForm"]); goto Ac62f; F20ce: Ecb05: goto Bc7ef; a92cb: } public function purgePageSpeedCache(Request $request) : Response { goto Be8cd; Be8cd: $site = $this->getSite($request); goto c84de; fba8f: return $response; goto c5ca8; fa495: e3f14: goto fba8f; Ab110: Ee81c: goto c7614; c7614: try { goto b567f; b567f: $user = $this->getUser(); goto D24a9; da981: $eventData = ["site" => $site->getDomainName()]; goto B3497; B3497: EventQueue::addEvent(EventQueue::EVENT_SITE_PAGE_SPEED_CACHE_PURGE, $user, $eventData, $request); goto Cf201; C9346: $siteUpdater = $this->getSiteUpdater($site); goto d0da4; d0da4: $siteUpdater->purgePageSpeedCache(); goto da981; D24a9: $session = $request->getSession(); goto C9346; Cf201: $session->getFlashBag()->set("success", $this->translator->trans("Page Speed Cache has been purged.")); goto A97a4; A97a4: } 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 f60b8; a97e6: goto e3f14; goto Ab110; F480a: $response = $this->redirect($this->generateUrl("clp_sites")); goto a97e6; f60b8: $response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()])); goto F532d; F532d: return $response; goto fa495; c84de: if (false === is_null($site)) { goto Ee81c; } goto F480a; c5ca8: } private function createDomainSettingsForm(Site $site, array $data) : Form { goto D2aa7; E8a76: return $form; goto D8a3a; C6433: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]); goto E8a76; D2aa7: $form = $this->createForm("App\Form\SiteDomainSettingsType", $data, ["action" => $this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]); goto C6433; D8a3a: } private function createSiteUserSettingsForm(Site $site, array $data) : Form { goto f15df; f15df: $form = $this->createForm("App\Form\SiteUserSettingsType", $data, ["action" => $this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]); goto b18ca; c0b91: return $form; goto De662; b18ca: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]); goto c0b91; De662: } private function createPageSpeedSettingsForm(Site $site, array $data) : Form { goto c89a2; B2d84: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]); goto A1450; A1450: return $form; goto D17d6; c89a2: $form = $this->createForm("App\Form\SitePageSpeedSettingsType", $data, ["action" => $this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]); goto B2d84; D17d6: } private function createReverseProxySettingsForm(Site $site) : Form { goto Ef39d; E6bea: return $form; goto ff168; Ad38c: $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 f2cae; f2cae: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]); goto E6bea; Ef39d: $data = ["reverseProxyUrl" => $site->getReverseProxyUrl()]; goto Ad38c; ff168: } private function createNodejsSettingsForm(Site $site, NodejsSettings $nodejsSettings) : Form { goto E31e5; E31e5: $form = $this->createForm("App\Form\SiteNodejsSettingsType", $nodejsSettings, ["action" => $this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => ["id" => "nodejs-settings-form"]]); goto Dd304; e6365: return $form; goto B8e17; Dd304: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]); goto e6365; B8e17: } private function createPhpSettingsForm(Site $site, PhpSettings $phpSettings) : Form { goto F447b; e2bbd: return $form; goto Ffba6; fa88f: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]); goto e2bbd; F447b: $form = $this->createForm("App\Form\SitePhpSettingsType", $phpSettings, ["action" => $this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]); goto fa88f; Ffba6: } private function createPythonSettingsForm(Site $site, PythonSettings $pythonSettings) : Form { goto Ed10b; cc30c: return $form; goto beafc; C24ba: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg"], "label" => "Save"]); goto cc30c; Ed10b: $form = $this->createForm("App\Form\SitePythonSettingsType", $pythonSettings, ["action" => $this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]); goto C24ba; beafc: } private function createSiteDeleteForm(Site $site, array $data) : Form { goto Dd48d; Dd48d: $form = $this->createForm("App\Form\SiteDeleteType", $data, ["action" => $this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()]), "method" => "POST", "attr" => []]); goto d48a2; Da50a: return $form; goto aa90d; d48a2: $form->add("submit", SubmitType::class, ["attr" => ["class" => "btn btn-blue btn-lg", "disabled" => "disabled"], "label" => "Delete Site"]); goto Da50a; aa90d: } private function handleDomainSettingsForm(Request $request, Form $form, Site $site) { goto Ce65c; de2c6: try { goto c3356; Cf866: return $response; goto D2beb; c8cc2: $session->getFlashBag()->set("success", $this->translator->trans("Root Directory has been saved.")); goto C44d9; b82fc: $this->siteEntityManager->updateEntity($siteEntity); goto Ee112; c846c: EventQueue::addEvent(EventQueue::EVENT_SITE_ROOT_DIRECTORY_UPDATE, $user, $eventData, $request); goto c8cc2; b8046: $session = $request->getSession(); goto A8034; Ecde1: $siteEntity = $this->getSiteEntity($domainName); goto da926; Eb9e0: $response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()])); goto Cf866; Eef84: $rootDirectory = rtrim($form->get("rootDirectory")->getData(), "/"); goto b9311; Bf20c: $siteUpdater->domainSettings(); goto Ac258; da926: if (!(false === is_null($siteEntity))) { goto F60da; } goto Eef84; b9311: $site->setRootDirectory($rootDirectory); goto b7735; C44d9: F60da: goto Eb9e0; Ee112: $siteUpdater = $this->getSiteUpdater($site); goto Bf20c; Ac258: $eventData = ["site" => $domainName, "rootDirectory" => $rootDirectory]; goto c846c; c3356: $user = $this->getUser(); goto b8046; b7735: $siteEntity->setRootDirectory($rootDirectory); goto b82fc; A8034: $domainName = $site->getDomainName(); goto Ecde1; D2beb: } 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 d6a20; E578a: F0da6: goto de2c6; b943a: goto C76d9; goto E578a; d87cf: $this->formErrors = $this->getErrorMessages($form); goto b943a; d6a20: C76d9: goto c1410; Ce65c: if (true === $form->isValid()) { goto F0da6; } goto d87cf; c1410: } private function handleSiteUserSettingsForm(Request $request, Form $form, Site $site) { goto Da4b0; Feab4: goto Aa561; goto F93b7; f3f26: Aa561: goto Aa7a4; ea8ec: try { goto Cee72; E881c: $response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()])); goto a865c; b9e9a: $password = trim($form->get("password")->getData()); goto abbef; b460e: $siteUser = $site->getUser(); goto B530d; B530d: $sshKeys = trim($form->get("sshKeys")->getData()); goto b9e9a; b3fc5: if (!(false === empty($password))) { goto Bdb37; } goto D8e46; D8e46: $siteUpdater->changeUserPassword($siteUser, $password); goto B89a4; Df899: $siteUpdater->updateUserSShKeys($siteUser, $sshKeys); goto b3fc5; fb010: $siteEntity = $this->getSiteEntity($domainName); goto C1728; e6b88: EventQueue::addEvent(EventQueue::EVENT_SITE_USER_SETTINGS_UPDATE, $user, $eventData, $request); goto aef43; a2b72: $siteUpdater = $this->getSiteUpdater($site); goto Df899; abbef: $siteEntity->setSshKeys($sshKeys); goto ec862; ec862: $this->siteEntityManager->updateEntity($siteEntity); goto a2b72; B89a4: Bdb37: goto c49f9; c49f9: $eventData = ["site" => $domainName, "sshKeys" => $sshKeys]; goto e6b88; aef43: $session->getFlashBag()->set("success", $this->translator->trans("Site User Settings have been saved.")); goto eb0c0; Cee72: $user = $this->getUser(); goto aee70; aee70: $session = $request->getSession(); goto B00c7; C1728: if (!(false === is_null($siteEntity))) { goto a75c6; } goto b460e; B00c7: $domainName = $site->getDomainName(); goto fb010; eb0c0: a75c6: goto E881c; a865c: return $response; goto B6c65; B6c65: } 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 f3f26; F93b7: c908d: goto ea8ec; Da4b0: if (true === $form->isValid()) { goto c908d; } goto Bef9b; Bef9b: $this->formErrors = $this->getErrorMessages($form); goto Feab4; Aa7a4: } private function handlePageSpeedSettingsForm(Request $request, Form $form, Site $site) { goto d4fb3; Bb5fa: Dd178: goto E99db; d4fb3: if (true === $form->isValid()) { goto F009b; } goto F3a38; f8542: try { goto d5613; ff407: $siteEntity->setPageSpeedSettings($settings); goto A2718; B96c8: $session->getFlashBag()->set("success", $this->translator->trans("Page Speed Settings have been saved.")); goto e004f; Fcd7e: if (!(false === is_null($siteEntity))) { goto Af724; } goto A3f4b; Cf0a3: $siteEntity = $this->getSiteEntity($domainName); goto Fcd7e; e65b1: $site->setPageSpeedEnabled($isEnabled); goto C57ef; A3f4b: $isEnabled = $form->get("isEnabled")->getData(); goto d42e8; A2718: $this->siteEntityManager->updateEntity($siteEntity); goto D628b; aa3e8: $session = $request->getSession(); goto Ede50; F4f49: $siteEntity->setPageSpeedEnabled($isEnabled); goto ff407; e004f: Af724: goto e6f51; e6f51: $response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()])); goto de90b; B918f: $siteUpdater->updateNginxVhostWithRollback(); goto f460f; Ac4f2: $siteUpdater = $this->getSiteUpdater($site); goto B918f; Ede50: $domainName = $site->getDomainName(); goto Cf0a3; f460f: $siteUpdater->purgePageSpeedCache(); goto F4f49; d5613: $user = $this->getUser(); goto aa3e8; d42e8: $settings = trim($form->get("settings")->getData()); goto e65b1; f5631: EventQueue::addEvent(EventQueue::EVENT_SITE_PAGE_SPEED_SETTINGS_UPDATE, $user, $eventData, $request); goto B96c8; de90b: return $response; goto de8bb; C57ef: $site->setPageSpeedSettings($settings); goto Ac4f2; D628b: $eventData = ["site" => $domainName, "pageSpeedEnabled" => $isEnabled, "pageSpeedSettings" => $settings]; goto f5631; de8bb: } 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 Bb5fa; F3a38: $this->formErrors = $this->getErrorMessages($form); goto C5f39; C5f39: goto Dd178; goto D8743; D8743: F009b: goto f8542; E99db: } private function handleSiteDeleteForm(Request $request, Form $form, Site $site) { goto Ac140; Ac140: if (true === $form->isValid()) { goto De1b9; } goto e1131; e1131: $this->formErrors = $this->getErrorMessages($form); goto C039a; B36bf: try { goto D854a; E8778: $session->getFlashBag()->set("success", $this->translator->trans("Site has been deleted.")); goto Bc0ec; Fc9b0: $siteDeleter->delete(); goto Dadd5; Dadd5: $this->siteEntityManager->deleteEntity($siteEntity); goto Fa1ee; Bc0ec: De352: goto a7c05; f9ab2: return $response; goto Ee228; c70f4: $session = $request->getSession(); goto c027b; Fa1ee: $eventData = ["site" => $domainName, "type" => $site->getType()]; goto Cd0fa; D854a: $user = $this->getUser(); goto c70f4; b3fb7: if (!(false === is_null($siteEntity))) { goto De352; } goto C0494; c027b: $domainName = $site->getDomainName(); goto d86b6; Cd0fa: EventQueue::addEvent(EventQueue::EVENT_SITE_DELETE, $user, $eventData, $request); goto E8778; d86b6: $siteEntity = $this->getSiteEntity($domainName); goto b3fb7; a7c05: $response = $this->redirect($this->generateUrl("clp_sites")); goto f9ab2; C0494: $siteDeleter = $this->getSiteDeleter($site); goto Fc9b0; Ee228: } 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 B3fb1; b6346: De1b9: goto B36bf; B3fb1: C115b: goto d8d45; C039a: goto C115b; goto b6346; d8d45: } private function handleNodejsSettingsForm(Request $request, Form $form, NodejsSettings $currentNodejsSettings, Site $site) { goto cdbdb; Fcefe: $this->formErrors = $this->getErrorMessages($form); goto E9af7; cdbdb: if (true === $form->isValid()) { goto Efb11; } goto Fcefe; E9af7: goto Ead87; goto D07e9; D07e9: Efb11: goto B9b3f; B9b3f: try { goto a96cc; E2adc: $siteUpdater->installNodejsVersion(); goto c0a46; Dc032: $nodejsSettings = $form->getData(); goto a8d98; c0a46: a5607: goto d3285; a8d98: $nodejsVersion = $nodejsSettings->getNodejsVersion(); goto f2ddc; ccf9f: $domainName = $site->getDomainName(); goto fc017; f2ddc: $hasNodejsVersionChanged = $currentNodejsSettings->getNodejsVersion() != $nodejsVersion; goto fd486; Ccb17: $response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()])); goto b3b7c; A6c63: if (!(false === is_null($siteEntity))) { goto d5465; } goto Dc032; d3285: $siteUpdater->nodejsSettings(); goto e8f19; f5128: if (!(true === $hasNodejsVersionChanged)) { goto a5607; } goto E2adc; fc017: $siteEntity = $this->getSiteEntity($domainName); goto A6c63; b3b7c: return $response; goto B0974; E9346: $eventData = ["site" => $domainName, "nodejsVersion" => $nodejsVersion, "port" => $nodejsSettings->getPort()]; goto a9755; e8f19: $this->siteEntityManager->updateEntity($siteEntity); goto E9346; a9755: EventQueue::addEvent(EventQueue::EVENT_SITE_NODEJS_SETTINGS_UPDATE, $user, $eventData, $request); goto f8754; c717f: d5465: goto Ccb17; fd486: $siteUpdater = $this->getSiteUpdater($site); goto f5128; F66f9: $session = $request->getSession(); goto ccf9f; a96cc: $user = $this->getUser(); goto F66f9; f8754: $session->getFlashBag()->set("success", $this->translator->trans("Node.js Settings have been saved.")); goto c717f; B0974: } 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 b57db; b57db: Ead87: goto D74f4; D74f4: } private function handlePythonSettingsForm(Request $request, Form $form, Site $site) { goto Caa89; b943c: $this->formErrors = $this->getErrorMessages($form); goto d3487; F9d3a: E0ab6: goto d33e4; Caa89: if (true === $form->isValid()) { goto Ddfb6; } goto b943c; d3487: goto E0ab6; goto f2c61; Bf8ae: try { goto d2d43; B98b5: $domainName = $site->getDomainName(); goto b8e5b; F7b1b: EventQueue::addEvent(EventQueue::EVENT_SITE_PYTHON_SETTINGS_UPDATE, $user, $eventData, $request); goto F5fc4; F5fc4: $session->getFlashBag()->set("success", $this->translator->trans("Python Settings have been saved.")); goto Ec7c0; e58c3: $pythonVersion = $pythonSettings->getPythonVersion(); goto bc51f; f9272: return $response; goto Ff782; Ec7c0: Eebe0: goto A1f50; bc51f: $siteUpdater = $this->getSiteUpdater($site); goto a2154; A1f50: $response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()])); goto f9272; e28b0: $pythonSettings = $form->getData(); goto e58c3; b8e5b: $siteEntity = $this->getSiteEntity($domainName); goto B1a1c; ca354: $siteUpdater->pythonSettings(); goto C2f13; a2154: $siteUpdater->writePythonVersionFile(); goto ca354; d2d43: $user = $this->getUser(); goto B2dfd; B2dfd: $session = $request->getSession(); goto B98b5; cfa5e: $eventData = ["site" => $domainName, "pythonVersion" => $pythonVersion, "port" => $pythonSettings->getPort()]; goto F7b1b; C2f13: $this->siteEntityManager->updateEntity($siteEntity); goto cfa5e; B1a1c: if (!(false === is_null($siteEntity))) { goto Eebe0; } goto e28b0; Ff782: } 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 F9d3a; f2c61: Ddfb6: goto Bf8ae; d33e4: } private function handleReverseProxySettingsForm(Request $request, Form $form, Site $site) { goto F816e; cb58f: try { goto D08cd; Bbf7f: $eventData = ["site" => $domainName, "reverseProxyUrl" => $reverseProxyUrl]; goto Ee4f0; Bb3fa: $siteEntity = $this->getSiteEntity($domainName); goto E48d7; c27d1: $session = $request->getSession(); goto aba07; bd221: $siteEntity->setReverseProxyUrl($reverseProxyUrl); goto d088b; cb5a2: $response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()])); goto B04ba; d088b: $siteUpdater = $this->getSiteUpdater($site); goto F23ff; aba07: $domainName = $site->getDomainName(); goto Bb3fa; A4dd4: $session->getFlashBag()->set("success", $this->translator->trans("Reverse Proxy Settings have been saved.")); goto e3aee; D08cd: $user = $this->getUser(); goto c27d1; fa115: $reverseProxyUrl = $form->get("reverseProxyUrl")->getData(); goto d1721; B04ba: return $response; goto Fba41; F23ff: $siteUpdater->updateNginxVhostWithRollback(); goto c847c; Ee4f0: EventQueue::addEvent(EventQueue::EVENT_SITE_REVERSE_PROXY_SETTINGS_UPDATE, $user, $eventData, $request); goto A4dd4; c847c: $this->siteEntityManager->updateEntity($siteEntity); goto Bbf7f; d1721: $site->setReverseProxyUrl($reverseProxyUrl); goto bd221; e3aee: A4cad: goto cb5a2; E48d7: if (!(false === is_null($siteEntity))) { goto A4cad; } goto fa115; Fba41: } 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 ed859; bc438: c7e24: goto cb58f; ed859: C2696: goto d7d18; F816e: if (true === $form->isValid()) { goto c7e24; } goto F13df; dc310: goto C2696; goto bc438; F13df: $this->formErrors = $this->getErrorMessages($form); goto dc310; d7d18: } private function handlePhpSettingsForm(Request $request, Form $form, PhpSettings $currentPhpSettings, Site $site) { goto E069d; fde37: b451a: goto C85a0; Afeb7: F534d: goto b6994; b0b18: $this->formErrors = $this->getErrorMessages($form); goto C27e8; C27e8: goto b451a; goto Afeb7; E069d: if (true === $form->isValid()) { goto F534d; } goto b0b18; b6994: try { goto Fc6de; Dc0f9: A0c03: goto Dd50f; f3b4d: $siteUpdater->phpSettings(); goto e3233; E7d37: if (!(false === is_null($siteEntity))) { goto A0c03; } goto Afff5; b90cc: $session->getFlashBag()->set("success", $this->translator->trans("PHP Settings have been saved.")); goto Dc0f9; a012b: return $response; goto d7eb7; Dd50f: $response = $this->redirect($this->generateUrl("clp_site_settings", ["domainName" => $site->getDomainName()])); goto a012b; Fc6de: $user = $this->getUser(); goto Bbe0a; Cbad4: c1be3: goto f3b4d; c570c: $hasPhpVersionChanged = $currentPhpSettings->getPhpVersion() != $phpSettings->getPhpVersion(); goto E29e4; Bbe0a: $session = $request->getSession(); goto f0302; f0302: $domainName = $site->getDomainName(); goto F0767; Afff5: $phpSettings = $form->getData(); goto c570c; ad02d: if (!(true === $hasPhpVersionChanged)) { goto c1be3; } goto D2807; F0767: $siteEntity = $this->getSiteEntity($domainName); goto E7d37; F8b2a: $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 E8f2b; e3233: $this->siteEntityManager->updateEntity($siteEntity); goto F8b2a; E29e4: $siteUpdater = $this->getSiteUpdater($site); goto ad02d; D2807: $siteUpdater->changePhpVersion($currentPhpSettings->getPhpVersion(), $phpSettings->getPhpVersion()); goto Cbad4; E8f2b: EventQueue::addEvent(EventQueue::EVENT_SITE_PHP_SETTINGS_UPDATE, $user, $eventData, $request); goto b90cc; d7eb7: } 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 fde37; C85a0: } private function getSite(Request $request) : ?Site { goto ce522; D76a5: $site->setPageSpeedSettings($siteEntity->getPageSpeedSettings()); goto b3408; A7c59: $resolvedDomainName = $this->domainNameParser->resolveDomainName($domainName); goto c567b; Cadb4: $site->setFtpUsers($siteEntity->getFtpUsers()); goto f4481; A44c3: $siteEntity = $this->getSiteEntity($domainName); goto B5e3f; F6039: $site->setBlockedIps($siteEntity->getBlockedIps()); goto D0b90; fd3c7: $subdomain = false === empty($subdomain) ? $subdomain : null; goto Ebc22; ec312: $site->setAllowTrafficFromCloudflareOnly($siteEntity->allowTrafficFromCloudflareOnly()); goto c9008; D0d70: if (!(UserEntity::ROLE_USER == $user->getRole() && false === $user->hasSite($siteEntity))) { goto fe015; } goto C9275; Aeab3: $site->setBlockedBots($siteEntity->getBlockedBots()); goto F6039; a2f87: $site->setUser($siteEntity->getUser()); goto C4ee7; ad51e: $site->setSubdomain($subdomain); goto B0aeb; E3de5: return $site; goto Acb73; Acc8b: cd854: goto Db2a8; e05c4: $site->setBasicAuth($siteEntity->getBasicAuth()); goto Aeab3; B0aeb: $site->setRootDirectory($siteEntity->getRootDirectory()); goto e05c4; eebec: $site->setRegistrableDomain($registrableDomain); goto ad51e; Ab4c8: $site->setCronJobs($siteEntity->getCronJobs()); goto Cadb4; ce522: $user = $this->getUser(); goto A88cc; f3f38: $site->setCertificates($siteEntity->getCertificates()); goto Ab4c8; dfa0d: $site->setVhostTemplate($siteEntity->getVhostTemplate()); goto ec312; B5e3f: $site = null; goto cfb97; D620b: $siteType = $siteEntity->getType(); goto f4c12; Db2a8: if (!(false === is_null($site))) { goto C1e89; } goto A7c59; C9275: return null; goto A2051; cfb97: if (!(false === is_null($siteEntity))) { goto ecf1f; } goto D0d70; ffc16: $site->setCertificate($siteEntity->getCertificate()); goto f3f38; b3408: C1e89: goto e45d6; B93a5: f7c65: goto Acc8b; A2051: fe015: goto D620b; Ec875: $site->setSshKeys($siteEntity->getSshKeys()); goto dfa0d; Ebc22: $siteDatabases = $this->getSiteDatabases($siteEntity); goto a2f87; c9008: $site->setPageSpeedEnabled($siteEntity->getPageSpeedEnabled()); goto D76a5; A88cc: $domainName = $request->get("domainName"); goto A44c3; f4c12: switch ($siteType) { case SiteEntity::TYPE_NODEJS: goto F8e5a; F26e0: $site->setNodejsSettings($siteEntity->getNodejsSettings()); goto F40b1; F8e5a: $site = new NodejsSite(); goto F26e0; F40b1: goto cd854; goto Ed6fb; Ed6fb: case SiteEntity::TYPE_STATIC: $site = new StaticSite(); goto cd854; case SiteEntity::TYPE_PHP: goto Be8d4; cb1d9: $site->setPhpSettings($siteEntity->getPhpSettings()); goto Da633; Da633: $site->setVarnishCache($siteEntity->getVarnishCache()); goto e706c; Be8d4: $site = new PhpSite(); goto cb1d9; e706c: goto cd854; goto ed35e; ed35e: case SiteEntity::TYPE_PYTHON: goto c81d0; bd691: goto cd854; goto cf1ac; C856c: $site->setPythonSettings($siteEntity->getPythonSettings()); goto bd691; c81d0: $site = new PythonSite(); goto C856c; cf1ac: case SiteEntity::TYPE_REVERSE_PROXY: goto Afec3; c3672: goto cd854; goto Df81e; Afec3: $site = new ReverseProxySite(); goto B6550; B6550: $site->setReverseProxyUrl($siteEntity->getReverseProxyUrl()); goto c3672; Df81e: } goto B93a5; A88e5: $subdomain = $resolvedDomainName->subDomain()->toString(); goto fd3c7; c567b: $registrableDomain = $resolvedDomainName->registrableDomain()->toString(); goto A88e5; D0b90: $site->setDatabases($siteDatabases); goto ffc16; f4481: $site->setSshUsers($siteEntity->getSshUsers()); goto Ec875; C4ee7: $site->setDomainName($siteEntity->getDomainName()); goto eebec; e45d6: ecf1f: goto E3de5; Acb73: } private function getSiteDatabases(SiteEntity $siteEntity) : ?ArrayCollection { goto E17ab; E17ab: $siteDatabases = new ArrayCollection(); goto E7af8; E7af8: $activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto B4f6f; E891f: foreach ($databaseEntities as $databaseEntity) { goto Ba68a; A339a: $siteDatabases->add($databaseEntity); goto cfbc9; D1067: if (!($databaseServerEntity->getId() == $activeDatabaseServerEntity->getId())) { goto Bdc5b; } goto A339a; f76bc: B48bb: goto b00de; cfbc9: Bdc5b: goto f76bc; Ba68a: $databaseServerEntity = $databaseEntity->getDatabaseServer(); goto D1067; b00de: } goto D0bb2; D0bb2: Adf50: goto bb496; B4f6f: $databaseEntities = $siteEntity->getDatabases(); goto E891f; bb496: return $siteDatabases; goto B6890; B6890: } private function getSiteUpdater(Site $site) : ?SiteUpdater { goto e8e53; C47a0: a0607: goto d98f7; d3e19: $siteType = $site->getType(); goto Cf426; Cf426: switch ($siteType) { case SiteEntity::TYPE_NODEJS: $siteUpdater = new NodejsSiteUpdater($site); goto a2aa5; case SiteEntity::TYPE_STATIC: $siteUpdater = new StaticSiteUpdater($site); goto a2aa5; case SiteEntity::TYPE_PHP: $siteUpdater = new PhpSiteUpdater($site); goto a2aa5; case SiteEntity::TYPE_PYTHON: $siteUpdater = new PythonSiteUpdater($site); goto a2aa5; case SiteEntity::TYPE_REVERSE_PROXY: $siteUpdater = new ReverseProxySiteUpdater($site); goto a2aa5; } goto C47a0; b3da8: return $siteUpdater; goto fa129; e8e53: $siteUpdater = null; goto d3e19; d98f7: a2aa5: goto b3da8; fa129: } protected function getSiteDeleter(Site $site) : ?SiteDeleter { goto c923b; dfcc5: switch ($siteType) { case SiteEntity::TYPE_NODEJS: $siteDeleter = new NodejsSiteDeleter($site); goto Ade1b; case SiteEntity::TYPE_STATIC: $siteDeleter = new StaticSiteDeleter($site); goto Ade1b; case SiteEntity::TYPE_PHP: $siteDeleter = new PhpSiteDeleter($site); goto Ade1b; case SiteEntity::TYPE_PYTHON: $siteDeleter = new PythonSiteDeleter($site); goto Ade1b; case SiteEntity::TYPE_REVERSE_PROXY: $siteDeleter = new ReverseProxySiteDeleter($site); goto Ade1b; } goto ea7f3; ea7f3: Bd4e6: goto a3b03; a3b03: Ade1b: goto e62e6; c923b: $siteDeleter = null; goto B6605; e62e6: return $siteDeleter; goto C9f3e; B6605: $siteType = $site->getType(); goto dfcc5; C9f3e: } private function getSiteEntity(string $domainName) : ?SiteEntity { $siteEntity = $this->siteEntityManager->findOneByDomainName($domainName); return $siteEntity; } } 
 ?>

Did this file decode correctly?

Original Code

namespace App\Controller\Frontend; use Symfony\Component\Form\FormError; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\Form\Extension\Core\Type\ButtonType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Component\HttpFoundation\Cookie; use Symfony\Component\Form\Form; use Twig\Environment as Twig; use Doctrine\Common\Collections\ArrayCollection; use App\Controller\Controller; use App\Event\EventQueue; use App\Service\Crypto; use App\Service\Logger; use App\Site\Site; use App\Site\NodejsSite; use App\Site\StaticSite; use App\Site\PhpSite; use App\Site\PythonSite; use App\Site\ReverseProxySite; use App\Entity\Site as SiteEntity; use App\Entity\NodejsSettings; use App\Entity\PhpSettings; use App\Entity\PythonSettings; use App\Entity\BasicAuth as BasicAuthEntity; use App\Entity\BlockedBot as BlockedBotEntity; use App\Entity\BlockedIp as BlockedIpEntity; use App\Entity\Database as DatabaseEntity; use App\Entity\DatabaseUser as DatabaseUserEntity; use App\Entity\User as UserEntity; use App\Entity\Certificate as CertificateEntity; use App\Entity\CronJob as CronJobEntity; use App\Entity\FtpUser as FtpUserEntity; use App\Entity\SshUser as SshUserEntity; use App\Site\Updater as SiteUpdater; use App\Site\Updater\NodejsSite as NodejsSiteUpdater; use App\Site\Updater\StaticSite as StaticSiteUpdater; use App\Site\Updater\PhpSite as PhpSiteUpdater; use App\Site\Updater\PythonSite as PythonSiteUpdater; use App\Site\Updater\ReverseProxySite as ReverseProxySiteUpdater; use App\Site\Deleter as SiteDeleter; use App\Site\Deleter\NodejsSite as NodejsSiteDeleter; use App\Site\Deleter\StaticSite as StaticSiteDeleter; use App\Site\Deleter\PhpSite as PhpSiteDeleter; use App\Site\Deleter\PythonSite as PythonSiteDeleter; use App\Site\Deleter\ReverseProxySite as ReverseProxySiteDeleter; use App\Database\Manager as DatabaseManager; use App\Entity\Manager\ConfigManager; use App\Entity\Manager\SiteManager as SiteEntityManager; use App\Entity\Manager\BasicAuthManager as BasicAuthEntityManager; use App\Entity\Manager\BlockedIpManager as BlockedIpEntityManager; use App\Entity\Manager\BlockedBotManager as BlockedBotEntityManager; use App\Entity\Manager\CertificateManager as CertificateEntityManager; use App\Entity\Manager\CronJobManager as CronJobEntityManager; use App\Entity\Manager\DatabaseManager as DatabaseEntityManager; use App\Entity\Manager\DatabaseUserManager as DatabaseUserEntityManager; use App\Entity\Manager\DatabaseServerManager as DatabaseServerEntityManager; use App\Entity\Manager\NodejsSettingsManager as NodejsSettingsEntityManager; use App\Entity\Manager\FtpUserManager as FtpUserEntityManager; use App\Entity\Manager\SshUserManager as SshUserEntityManager; 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\Site\Parser\DomainName as DomainNameParser; use App\Site\Nginx\Exception\InvalidVhostException; use App\Site\Ssl\DistinguishedName; use App\Site\Ssl\Generator\RsaKeyGenerator; use App\Site\Ssl\Generator\CsrGenerator; use App\Site\Ssl\PrivateKey; use App\Site\Ssl\LetsEncryptClient; use App\Site\VarnishCache\Client as VarnishCacheClient; 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 fa247; fa247: $this->configManager = $configManager; goto Fe569; C86e9: $this->sshUserEntityManager = $sshUserEntityManager; goto Fd207; Dbdf6: $this->blockedBotEntityManager = $blockedBotEntityManager; goto e844e; Cb97d: parent::__construct($translator, $logger); goto fa3aa; d3fb6: $this->databaseUserEntityManager = $databaseUserEntityManager; goto c508a; Fd207: $this->domainNameParser = $domainNameParser; goto Cb97d; a1d94: $this->ftpUserEntityManager = $ftpUserEntityManager; goto C86e9; e844e: $this->certificateEntityManager = $certificateEntityManager; goto Bbf83; F119d: $this->basicAuthEntityManager = $basicAuthEntityManager; goto Bde08; Fe569: $this->siteEntityManager = $siteEntityManager; goto F119d; Eeccb: $this->databaseEntityManager = $databaseEntityManager; goto d3fb6; Bbf83: $this->cronJobEntityManager = $cronJobEntityManager; goto Eeccb; Bde08: $this->blockedIpEntityManager = $blockedIpEntityManager; goto Dbdf6; c508a: $this->databaseServerEntityManager = $databaseServerEntityManager; goto e5764; e5764: $this->nodejsSettingsEntityManager = $nodejsSettingsEntityManager; goto a1d94; fa3aa: } public function index(Request $request) : Response { goto F4562; Dc335: return $response; goto F0cb4; cf0b6: $response = $this->render("\x46\x72\x6f\x6e\164\x65\156\x64\57\123\x69\164\x65\57\x69\156\x64\145\x78\x2e\x68\x74\x6d\x6c\56\164\167\x69\147", ["\x75\163\145\x72" => $user, "\163\x69\164\145\x73" => $sites]); goto Dc335; Acab0: $sites = $this->siteEntityManager->getUserSites($user, ["\x64\157\155\141\151\x6e\x4e\x61\x6d\145" => "\141\163\x63"]); goto cf0b6; F4562: $user = $this->getUser(); goto Acab0; F0cb4: } public function fileManager(Request $request) : Response { goto Ab39b; De5ec: if (false === is_null($site)) { goto Eb883; } goto A2fb4; dd19a: $fileManagerUrl = sprintf("\45\163\57\146\151\x6c\145\x2d\x6d\x61\x6e\x61\147\x65\x72\57", rtrim($request->getSchemeAndHttpHost(), "\x2f")); goto de89a; f83c6: goto Ad03c; goto db930; Ab39b: $site = $this->getSite($request); goto De5ec; b6b33: $locale = $request->getLocale(); goto A1859; A1859: $cookieExpirationDate = new \DateTime("\156\x6f\x77"); goto a844a; de89a: $response = $this->render("\106\x72\x6f\x6e\x74\x65\156\144\x2f\x53\151\x74\145\57\x66\x69\x6c\x65\x2d\x6d\x61\x6e\141\147\x65\x72\x2e\150\164\155\154\x2e\164\167\151\x67", ["\x73\151\x74\145" => $site, "\146\x69\x6c\x65\x4d\x61\156\x61\147\145\x72\x55\162\154" => $fileManagerUrl, "\146\x6f\162\155\x45\x72\x72\x6f\x72\163" => $this->formErrors]); goto F72ec; F72ec: Ad03c: goto a134e; a134e: return $response; goto E018b; A2fb4: $response = $this->redirect($this->generateUrl("\143\x6c\x70\x5f\x73\x69\164\145\x73")); goto f83c6; db930: Eb883: goto a14da; a14da: $siteUser = $site->getUser(); goto E62ca; E62ca: $session = $request->getSession(); goto b6b33; f077a: $session->set("\x63\154\160\55\x66\151\x6c\145\55\x6d\x61\156\141\147\x65\x72", $data); goto dd19a; c4c87: $data = ["\165\x73\x65\162" => $siteUser, "\154\x6f\143\141\x6c\x65" => $locale]; goto f077a; a844a: $cookieExpirationDate->modify(sprintf("\53\x25\163\x20\150\x6f\165\x72\x73", self::FILE_MANAGER_COOKIE_EXPIRATION)); goto c4c87; E018b: } public function view(Request $request) : Response { goto Dbd80; Dbd80: $domainName = $request->get("\144\x6f\155\x61\x69\156\x4e\x61\155\x65"); goto C8a4f; C8a4f: $response = $this->redirect($this->generateUrl("\143\154\160\x5f\163\x69\164\x65\137\x73\145\x74\164\x69\x6e\147\x73", ["\144\x6f\x6d\x61\151\x6e\116\x61\155\x65" => $domainName])); goto D49bf; D49bf: return $response; goto F585b; F585b: } public function logs(Request $request) : Response { goto B6551; C589f: $response = $this->redirect($this->generateUrl("\x63\154\160\x5f\x73\151\164\x65\163")); goto a39bf; a39bf: goto A9d1f; goto Ee3c5; Ffe2a: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto a9885; B6551: $site = $this->getSite($request); goto de2d5; f5ce9: $response = $this->render("\x46\x72\x6f\x6e\x74\x65\x6e\x64\57\x53\151\164\145\57\154\x6f\x67\x73\x2e\x68\x74\155\x6c\56\x74\167\x69\x67", ["\x73\151\x74\145" => $site, "\146\157\162\x6d\x45\x72\162\x6f\x72\163" => $this->formErrors, "\x66\x6f\x72\x6d" => $form->createView()]); goto E14cb; de2d5: if (false === is_null($site)) { goto B98e8; } goto C589f; Fc991: return $response; goto deaaf; Ee3c5: B98e8: goto Ffe2a; E14cb: A9d1f: goto Fc991; a9885: $form = $this->createLogsForm($siteEntity); goto f5ce9; deaaf: } private function createLogsForm(SiteEntity $siteEntity) : Form { goto d1546; deaac: return $form; goto e0811; d1546: $form = $this->createForm("\x41\160\160\134\x46\157\162\x6d\x5c\123\151\x74\x65\114\157\147\x73\124\171\160\145", [], ["\x61\143\x74\151\x6f\156" => $this->generateUrl("\143\x6c\x70\137\x73\x69\164\x65\x5f\154\x6f\x67\163", ["\144\x6f\155\x61\151\156\116\141\155\145" => $siteEntity->getDomainName()]), "\x6d\145\x74\x68\157\x64" => "\x50\x4f\x53\124", "\x61\164\x74\162" => []]); goto b5f67; b5f67: $form->add("\x75\x70\144\x61\x74\x65", ButtonType::class, ["\141\x74\164\162" => ["\x63\x6c\141\x73\x73" => "\142\x74\156\x20\142\164\x6e\x2d\154\147\40\142\164\x6e\55\x62\x6c\165\145\x20\142\x74\x6e\x2d\x75\x70\x64\141\164\145"], "\x6c\141\142\x65\x6c" => "\x55\160\x64\x61\164\145"]); goto deaac; e0811: } public function logFileContent(Request $request, Twig $twig) : Response { goto B81d0; fef31: $response = $this->json($data); goto ad557; f1d24: try { goto f39c1; Ea19d: $user = $this->getUser(); goto Cbb8d; C7751: $logfileReader = new LogfileReader($logfile); goto e7e82; Df145: $logMessages = $phpFpmErrorLogParser->parse(); goto F435a; F435a: $logMessagesHtml = $twig->render("\x46\x72\157\x6e\x74\145\156\144\57\123\151\x74\x65\57\114\x6f\147\163\57\x70\150\160\x2d\x66\x70\155\x2d\x65\162\x72\x6f\x72\x2d\154\157\x67\55\x6d\x65\x73\163\x61\147\x65\x73\x2e\150\x74\155\154\56\164\167\151\x67", ["\154\x6f\x67\x4d\145\163\163\x61\147\x65\x73" => $logMessages]); goto A28f9; f0eae: $logMessagesHtml = $twig->render("\x46\162\x6f\156\x74\145\156\x64\57\123\151\x74\x65\57\x4c\157\x67\163\57\x6e\x67\151\156\170\x2d\x65\x72\x72\x6f\162\55\154\157\x67\x2d\155\x65\x73\x73\141\147\145\163\56\x68\x74\155\x6c\56\164\167\151\x67", ["\x6c\x6f\147\115\145\163\163\141\147\145\163" => $logMessages]); goto c199f; c4b2d: if ("\x61\143\143\x65\163\163\56\x6c\157\147" == substr($logfileName, 0, 10)) { goto C0695; } goto d3afc; Fa8bf: $logMessages = $nginxAccessLogParser->parse(); goto ef6f0; eb85f: $phpFpmErrorLogParser = new PhpFpmErrorLogParser($logLines); goto Df145; A28f9: A807b: goto C7d3f; e7e82: $logLines = $logfileReader->getLines($numberOfLines); goto a05e0; A7f56: $userTimezone = $user->getTimezone(); goto c4b2d; Bdef8: C0695: goto F7cfb; ef6f0: $logMessagesHtml = $twig->render("\106\x72\157\x6e\x74\145\156\x64\57\123\151\164\145\x2f\114\157\147\163\x2f\x6e\147\x69\x6e\x78\x2d\141\143\143\145\x73\x73\x2d\154\157\x67\x2d\155\x65\163\163\x61\x67\x65\163\x2e\150\164\155\x6c\56\x74\167\151\147", ["\x6c\x6f\x67\115\145\163\x73\x61\x67\x65\163" => $logMessages]); goto D235a; F05c5: $logMessages = $nginxErrorLogParser->parse(); goto f0eae; f39c1: $logfile = sprintf("\x2f\150\157\155\145\57\x25\163\x2f\154\157\147\163\57\x25\x73\x2f\x25\x73", $site->getUser(), $service, $logfileName); goto C7751; Cbb8d: if (!("\156\x67\151\156\170" == $service)) { goto E7998; } goto A7f56; d3afc: $nginxErrorLogParser = new NginxErrorLogParser($logLines); goto F05c5; D235a: D2aa1: goto Bf25a; Cfd68: $nginxAccessLogParser->setTimezone($userTimezone->getName()); goto Fa8bf; F7cfb: $nginxAccessLogParser = new NginxAccessLogParser($logLines); goto Cfd68; Bf25a: E7998: goto Dd1ef; C7d3f: $data["\x6c\x6f\147\x4d\x65\163\163\141\x67\145\x73\110\x74\x6d\x6c"] = $logMessagesHtml; goto fcd01; a05e0: $logMessagesHtml = ''; goto Ea19d; c199f: goto D2aa1; goto Bdef8; Dd1ef: if (!("\160\x68\160" == $service)) { goto A807b; } goto eb85f; fcd01: } catch (\Exception $e) { $this->logger->exception($e); } goto C5463; f9d9b: $logfileName = trim($request->get("\154\x6f\x67\106\x69\x6c\x65")); goto Aa049; Aca8c: ba359: goto fef31; c6667: $site = $this->getSite($request); goto f4049; ad557: return $response; goto D5aee; f4049: if (!(false === is_null($site))) { goto ba359; } goto b2c5f; Aa049: $numberOfLines = (int) $request->get("\156\165\155\142\x65\x72\117\146\114\x69\156\x65\x73"); goto b3a57; b2c5f: $service = trim($request->get("\163\145\162\x76\151\143\x65")); goto f9d9b; B81d0: $data = []; goto c6667; b3a57: if (!(false === empty($service) && false === empty($logfileName))) { goto A7602; } goto f1d24; C5463: A7602: goto Aca8c; D5aee: } public function loadLogfilesForService(Request $request) : Response { goto C38ca; d8c4e: return $response; goto Ff4c5; B047d: $service = trim($request->get("\163\x65\162\166\151\x63\145")); goto Fdea5; E8cb1: $site = $this->getSite($request); goto d53f5; B222b: try { goto c5e8d; c5e8d: $logfilesDirectory = sprintf("\57\x68\x6f\155\x65\x2f\x25\163\57\x6c\157\x67\163\x2f\x25\163\57", $site->getUser(), $service); goto Bc4d4; Bc4d4: $logsFinder = new LogsFinder($logfilesDirectory); goto f070c; B45a6: C3cdb: goto B4cbe; Eb6d5: if (!(false === empty($logfiles))) { goto C3cdb; } goto Eccd3; f070c: $logfiles = $logsFinder->getLogfiles(); goto Eb6d5; Eccd3: $data["\x6c\x6f\147\146\x69\x6c\145\163"] = $logfiles; goto B45a6; B4cbe: } catch (\Exception $e) { $this->logger->exception($e); } goto Fe3e4; C38ca: $data = []; goto E8cb1; f643b: Bb2c4: goto D163f; D163f: $response = $this->json($data); goto d8c4e; d53f5: if (!(false === is_null($site))) { goto Bb2c4; } goto B047d; Fe3e4: b3c27: goto f643b; Fdea5: if (!(false === empty($service))) { goto b3c27; } goto B222b; Ff4c5: } public function cronJobs(Request $request) : Response { goto B337d; A1c18: goto A00db; goto F3544; fe152: return $response; goto ade30; B337d: $site = $this->getSite($request); goto c2116; Ab54a: $response = $this->render("\x46\x72\157\x6e\x74\145\x6e\144\x2f\x53\151\164\x65\57\x63\162\157\156\55\152\157\x62\x73\56\x68\164\155\154\x2e\164\x77\x69\x67", ["\x73\x69\x74\x65" => $site, "\146\x6f\x72\155\x45\x72\162\157\162\163" => $this->formErrors]); goto bdfd1; bdfd1: A00db: goto fe152; c2116: if (false === is_null($site)) { goto D5553; } goto B4ea1; F3544: D5553: goto Ab54a; B4ea1: $response = $this->redirect($this->generateUrl("\143\154\x70\137\163\x69\x74\145\163")); goto A1c18; ade30: } public function newCronJob(Request $request) : Response { goto e658b; d481c: if (!(true === $form->isSubmitted())) { goto Cd1bd; } goto aae55; feba7: $form->handleRequest($request); goto d481c; dbb35: ade81: goto d8b2e; Ace0f: $cronJobEntity = $this->cronJobEntityManager->createEntity(); goto B75a6; bf593: return $response; goto Ac1cb; E4e37: return $response; goto f24b4; f3808: cd6ef: goto E4e37; B34cc: ecf98: goto b6bb7; dda0f: goto cd6ef; goto dbb35; e00bc: if (!(false === is_null($response))) { goto B0072; } goto bf593; Ac1cb: B0072: goto Fa975; Dc3c6: $response = $this->redirect($this->generateUrl("\x63\154\160\137\163\151\164\145\x73")); goto dda0f; aae55: $response = $this->handleCronJobForm($request, $form, $site); goto e00bc; Fa975: Cd1bd: goto B34cc; E6809: $form = $this->createCronJobForm($cronJobEntity); goto E38e5; d8b2e: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto Ace0f; E38e5: if (!(true === $request->isMethod("\x50\117\x53\124"))) { goto ecf98; } goto feba7; e9e15: if (false === is_null($site)) { goto ade81; } goto Dc3c6; B75a6: $cronJobEntity->setSite($siteEntity); goto E6809; e658b: $site = $this->getSite($request); goto e9e15; b6bb7: $response = $this->render("\106\x72\x6f\x6e\x74\x65\x6e\x64\57\x53\x69\164\x65\57\156\x65\167\55\143\162\x6f\x6e\55\x6a\157\142\x2e\150\164\155\154\56\x74\167\x69\147", ["\163\151\164\145" => $site, "\146\x6f\162\x6d" => $form->createView(), "\x66\x6f\x72\x6d\105\162\162\x6f\x72\163" => $this->formErrors]); goto f3808; f24b4: } private function createCronJobForm(CronJobEntity $cronJobEntity) : Form { goto fc358; fc358: $siteEntity = $cronJobEntity->getSite(); goto Dd086; Fc918: $form->add("\x73\165\x62\x6d\x69\x74", SubmitType::class, ["\x61\x74\164\x72" => ["\x63\x6c\141\x73\x73" => "\x62\x74\x6e\40\x62\164\156\55\142\154\165\145\x20\x62\164\x6e\x2d\154\x67"], "\154\141\142\145\154" => "\101\144\144\x20\x43\162\157\x6e\x20\x4a\157\x62"]); goto Eb701; Eb701: return $form; goto e6915; Dd086: $form = $this->createForm("\x41\160\x70\x5c\x46\x6f\162\155\x5c\123\151\x74\145\x43\162\x6f\x6e\112\157\x62\x54\171\160\x65", $cronJobEntity, ["\141\x63\164\x69\157\156" => $this->generateUrl("\143\x6c\160\137\x73\x69\164\145\x5f\143\x72\x6f\156\x5f\x6a\x6f\142\137\x6e\145\x77", ["\144\157\155\141\x69\x6e\x4e\x61\x6d\145" => $siteEntity->getDomainName()]), "\155\145\164\x68\x6f\x64" => "\120\x4f\123\x54", "\141\164\x74\x72" => []]); goto Fc918; e6915: } private function handleCronJobForm(Request $request, Form $form, Site $site) { goto B8413; B8413: if (true === $form->isValid()) { goto Be14b; } goto fc6b4; E60fe: try { goto b2619; C297b: $domainName = $site->getDomainName(); goto C6a0f; C6188: $response = $this->redirect($this->generateUrl("\x63\x6c\160\x5f\x73\151\x74\145\163")); goto F9835; dfa81: $siteUpdater = $this->getSiteUpdater($site); goto ff1bc; c8891: $this->siteEntityManager->updateEntity($siteEntity); goto dfa81; Be4f9: $eventData = ["\x73\151\164\145" => $domainName, "\143\x72\x6f\156\x74\x61\142\x45\x78\x70\162\145\x73\x73\151\x6f\x6e" => $cronJobEntity->getCrontabExpression()]; goto d37d6; C1486: $response = $this->redirect($this->generateUrl("\143\x6c\160\137\163\x69\164\145\137\x63\162\157\x6e\x5f\x6a\x6f\142\x73", ["\x64\157\155\141\151\156\x4e\141\x6d\145" => $site->getDomainName()])); goto ac55b; df7be: $cronJobEntity = $form->getData(); goto c2fa2; A27ca: cd713: goto Fbcf4; Fbcf4: $user = $this->getUser(); goto df7be; Ee038: $site->setCronJobs($siteEntity->getCronJobs()); goto c8891; f462e: $session->getFlashBag()->set("\x73\x75\x63\143\145\x73\x73", $this->translator->trans("\103\162\x6f\x6e\x20\112\157\142\40\x68\x61\x73\40\142\x65\145\156\40\x61\x64\144\x65\x64\x2e")); goto C1486; d37d6: EventQueue::addEvent(EventQueue::EVENT_SITE_CRON_JOB_ADD, $user, $eventData, $request); goto f462e; bf6be: if (false === is_null($siteEntity)) { goto cd713; } goto C6188; ac55b: Bd0fc: goto A019d; F9835: goto Bd0fc; goto A27ca; b2619: $session = $request->getSession(); goto C297b; C6a0f: $siteEntity = $this->getSiteEntity($domainName); goto bf6be; A019d: return $response; goto a77a2; c2fa2: $siteEntity->addCronJob($cronJobEntity); goto Ee038; ff1bc: $siteUpdater->updateUserCrontab(); goto Be4f9; a77a2: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\x61\156\147\x65\x72", $this->translator->trans("\101\156\40\x65\162\x72\157\x72\40\150\141\x73\40\x6f\143\143\x75\x72\x72\145\x64\x2c\40\x65\162\x72\157\162\40\155\145\163\x73\141\x67\145\x3a\40\x25\145\162\162\157\162\x4d\145\x73\x73\141\147\x65\45", ["\x25\x65\x72\162\x6f\162\x4d\x65\x73\163\141\x67\x65\x25" => $e->getMessage()])); } goto A837a; fc6b4: $this->formErrors = $this->getErrorMessages($form); goto Bcc04; Bcc04: goto B9e92; goto c2605; c2605: Be14b: goto E60fe; A837a: B9e92: goto ba161; ba161: } public function deleteCronJob(Request $request) : Response { goto e2f20; e2f20: $site = $this->getSite($request); goto Bab64; Fa1d9: e9e31: goto d8493; d8493: $response = $this->redirect($this->generateUrl("\143\x6c\160\137\x73\x69\164\145\163")); goto b43d0; Bab64: if (!(false === is_null($site))) { goto e9e31; } goto Aa09d; b43d0: return $response; goto C3b28; Aa09d: try { goto b4ab8; c9182: EventQueue::addEvent(EventQueue::EVENT_SITE_CRON_JOB_DELETE, $user, $evenData, $request); goto Ca448; ea925: if (!($siteEntity->getDomainName() == $cronJobSiteEntity->getDomainName())) { goto ac65d; } goto A230b; C8bc1: $domainName = $site->getDomainName(); goto fa43e; a501d: $cronJobEntity = $this->cronJobEntityManager->findOneById($id); goto E4e6f; ffe5a: $site->setCronJobs($siteEntity->getCronJobs()); goto E8988; E8988: $this->siteEntityManager->updateEntity($siteEntity); goto C511a; B0363: $response = $this->redirect($this->generateUrl("\x63\x6c\160\x5f\x73\151\164\x65\x5f\x63\162\157\x6e\137\x6a\x6f\142\x73", ["\144\157\x6d\x61\151\x6e\116\x61\155\x65" => $site->getDomainName()])); goto B11ff; b4ab8: $session = $request->getSession(); goto a4016; E73af: $siteUpdater->updateUserCrontab(); goto e8575; d5f5c: ac65d: goto b8540; e8575: $evenData = ["\163\x69\x74\x65" => $domainName, "\143\157\155\155\x61\156\x64" => $cronJobEntity->getCommand()]; goto c9182; E4e6f: if (!(false === is_null($siteEntity) && false === is_null($cronJobEntity))) { goto d864a; } goto a0a75; b02ab: $siteEntity->removeCronJob($cronJobEntity); goto ffe5a; A230b: $user = $this->getUser(); goto b02ab; a0a75: $cronJobSiteEntity = $cronJobEntity->getSite(); goto ea925; Ca448: $session->getFlashBag()->set("\x73\165\143\143\145\x73\163", $this->translator->trans("\103\x72\157\156\40\x4a\x6f\x62\40\x68\141\163\x20\x62\x65\145\x6e\x20\144\145\x6c\145\x74\145\x64\56")); goto B0363; C511a: $siteUpdater = $this->getSiteUpdater($site); goto E73af; b8540: d864a: goto Ffcb1; B11ff: return $response; goto d5f5c; fa43e: $siteEntity = $this->getSiteEntity($domainName); goto a501d; a4016: $id = (int) $request->get("\x69\x64"); goto C8bc1; Ffcb1: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\141\156\147\x65\162", $this->translator->trans("\x41\156\40\145\x72\x72\157\162\x20\x68\141\163\40\x6f\143\x63\165\x72\162\145\x64\54\x20\145\x72\x72\157\162\40\155\x65\163\x73\x61\147\145\x3a\40\x25\145\162\x72\157\x72\x4d\x65\163\163\141\x67\x65\x25", ["\x25\x65\x72\x72\157\162\115\145\163\x73\141\x67\145\45" => $e->getMessage()])); } goto Fa1d9; C3b28: } public function editCronJob(Request $request) : Response { goto C3c91; d8402: if (!(true === $request->isMethod("\x50\117\123\x54"))) { goto Ec8eb; } goto Cee2d; fadd6: return $response; goto e8c25; E6d59: a048d: goto fadd6; c2cbe: goto a048d; goto E30be; B4f18: if (!(false === is_null($response))) { goto D8e68; } goto a5e02; E30be: fa035: goto A3b67; c4704: if (!(true === $form->isSubmitted())) { goto Cb440; } goto e3d52; c4f43: D8e68: goto b18b5; d07d5: $response = $this->redirect($this->generateUrl("\x63\154\x70\137\x73\151\x74\x65\163")); goto c2cbe; b3fd8: $site = $this->getSite($request); goto F8e26; B7cf0: $response = $this->render("\106\x72\157\x6e\x74\145\156\x64\x2f\x53\x69\x74\x65\57\145\144\151\x74\55\x63\x72\157\156\x2d\x6a\157\142\56\150\164\155\154\x2e\x74\167\x69\147", ["\163\x69\x74\x65" => $site, "\x66\157\x72\155" => $form->createView(), "\146\x6f\162\x6d\105\x72\162\x6f\x72\x73" => $this->formErrors]); goto E6d59; e3d52: $response = $this->handleCronJobEditForm($request, $form, $site); goto B4f18; b18b5: Cb440: goto f2db1; f2db1: Ec8eb: goto B7cf0; a5e02: return $response; goto c4f43; Cee2d: $form->handleRequest($request); goto c4704; F8e26: $cronJobEntity = $this->cronJobEntityManager->findOneById($id); goto D27f6; C3c91: $id = (int) $request->get("\151\144"); goto b3fd8; D27f6: if (false === is_null($cronJobEntity) && false === is_null($site) && $cronJobEntity->getSite()->getDomainName() == $site->getDomainName()) { goto fa035; } goto d07d5; A3b67: $form = $this->createCronJobEditForm($cronJobEntity); goto d8402; e8c25: } private function createCronJobEditForm(CronJobEntity $cronJobEntity) : Form { goto a5d83; f99b0: return $form; goto d900f; a5d83: $siteEntity = $cronJobEntity->getSite(); goto ad988; E6f46: $form->add("\x73\165\x62\x6d\x69\164", SubmitType::class, ["\141\x74\x74\162" => ["\x63\154\x61\x73\x73" => "\x62\x74\x6e\x20\142\164\x6e\55\142\x6c\165\145\40\x62\x74\x6e\55\154\x67"], "\154\141\x62\145\154" => "\x53\x61\x76\145"]); goto f99b0; ad988: $form = $this->createForm("\101\x70\160\x5c\106\157\162\155\x5c\x53\x69\x74\x65\103\x72\x6f\156\x4a\x6f\142\105\x64\151\164\124\171\160\x65", $cronJobEntity, ["\141\143\164\x69\x6f\156" => $this->generateUrl("\143\x6c\x70\x5f\x73\151\164\x65\x5f\x63\162\157\x6e\137\152\x6f\142\137\145\x64\x69\x74", ["\x64\157\x6d\141\x69\156\x4e\141\x6d\145" => $siteEntity->getDomainName(), "\151\x64" => $cronJobEntity->getId()]), "\155\145\164\150\157\144" => "\120\117\x53\124", "\141\164\164\162" => []]); goto E6f46; d900f: } private function handleCronJobEditForm(Request $request, Form $form, Site $site) { goto A62f1; Ee476: Acd69: goto ea083; Fdb5a: try { goto Af7d7; c1490: F7934: goto b7198; cc149: $siteEntity = $this->getSiteEntity($domainName); goto b5ec6; C7ac1: goto F7934; goto f4b1a; ac576: $siteUpdater->updateUserCrontab(); goto ff868; e54f4: $response = $this->redirect($this->generateUrl("\143\154\x70\137\163\x69\x74\145\137\143\x72\157\x6e\x5f\x6a\x6f\x62\163", ["\144\x6f\x6d\141\151\x6e\x4e\x61\x6d\x65" => $site->getDomainName()])); goto c1490; E9ea3: EventQueue::addEvent(EventQueue::EVENT_SITE_CRON_JOB_EDIT, $user, $eventData, $request); goto eaf45; ae98a: $user = $this->getUser(); goto ad0e9; ff868: $eventData = ["\163\151\x74\145" => $domainName, "\x63\162\157\x6e\x74\141\x62\105\170\160\x72\145\163\163\x69\x6f\x6e" => $cronJobEntity->getCrontabExpression()]; goto E9ea3; c7372: $siteUpdater = $this->getSiteUpdater($site); goto ac576; Af7d7: $session = $request->getSession(); goto A72e7; A72e7: $domainName = $site->getDomainName(); goto cc149; c2055: $site->setCronJobs($siteEntity->getCronJobs()); goto daab7; daab7: $this->siteEntityManager->updateEntity($siteEntity); goto c7372; b5ec6: if (false === is_null($siteEntity)) { goto e5cf1; } goto f8870; Fd217: $siteEntity->addCronJob($cronJobEntity); goto c2055; b7198: return $response; goto d2383; ad0e9: $cronJobEntity = $form->getData(); goto Fd217; eaf45: $session->getFlashBag()->set("\x73\165\143\143\145\x73\x73", $this->translator->trans("\103\x72\x6f\156\x20\x4a\x6f\x62\40\x68\x61\163\40\142\x65\x65\156\x20\163\x61\166\x65\x64\56")); goto e54f4; f4b1a: e5cf1: goto ae98a; f8870: $response = $this->redirect($this->generateUrl("\x63\x6c\x70\137\163\151\x74\145\163")); goto C7ac1; d2383: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\x61\x6e\x67\x65\x72", $this->translator->trans("\x41\x6e\40\145\162\162\x6f\x72\x20\150\x61\163\x20\157\x63\x63\x75\x72\x72\x65\144\54\40\145\162\162\x6f\162\x20\155\x65\x73\x73\141\147\x65\x3a\x20\x25\145\162\x72\x6f\162\115\x65\x73\163\141\147\x65\45", ["\x25\x65\x72\x72\157\x72\115\145\163\x73\x61\147\145\x25" => $e->getMessage()])); } goto Ee476; C69fa: $this->formErrors = $this->getErrorMessages($form); goto F590f; a9de5: f28e3: goto Fdb5a; A62f1: if (true === $form->isValid()) { goto f28e3; } goto C69fa; F590f: goto Acd69; goto a9de5; ea083: } public function users(Request $request) : Response { goto E7aac; ae8ba: $response = $this->redirect($this->generateUrl("\143\154\x70\137\x73\x69\x74\x65\x73")); goto e6d2a; b9974: a6141: goto efc63; bdeb0: if (false === is_null($site)) { goto a6141; } goto ae8ba; e6d2a: goto Cc97b; goto b9974; fe0b1: return $response; goto Fc07d; E7aac: $site = $this->getSite($request); goto bdeb0; D959a: Cc97b: goto fe0b1; efc63: $response = $this->render("\x46\162\x6f\x6e\164\145\x6e\144\x2f\x53\x69\164\145\57\165\x73\145\x72\163\56\150\x74\x6d\x6c\56\164\x77\x69\x67", ["\163\x69\164\145" => $site, "\x66\157\x72\x6d\105\x72\x72\x6f\162\x73" => $this->formErrors]); goto D959a; Fc07d: } public function newFtpUser(Request $request) : Response { goto Cf882; Cbc84: if (!(true === $form->isSubmitted())) { goto B5a00; } goto e11f3; e11f3: $response = $this->handleFtpUserForm($request, $form, $site); goto c6be0; Cf882: $site = $this->getSite($request); goto da21f; B79e9: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto b1496; a1022: $ftpUserEntity->setSite($siteEntity); goto F6394; Ffa81: $response = $this->render("\x46\162\x6f\156\x74\145\x6e\x64\57\123\151\164\x65\57\156\145\x77\55\x66\x74\x70\x2d\165\x73\x65\x72\x2e\150\164\x6d\x6c\56\x74\167\x69\147", ["\x73\x69\164\x65" => $site, "\x66\x6f\x72\155" => $form->createView(), "\146\157\x72\x6d\105\162\162\x6f\162\163" => $this->formErrors]); goto b3c09; da21f: if (false === is_null($site)) { goto C3b35; } goto bf85f; fc0b0: B5a00: goto Ed0bb; b27b3: ab797: goto fc0b0; b3c09: d1c33: goto f7aa3; f3b6c: goto d1c33; goto Dfaad; F04ef: return $response; goto b27b3; Dfaad: C3b35: goto B79e9; bf85f: $response = $this->redirect($this->generateUrl("\x63\154\160\137\x73\151\164\x65\163")); goto f3b6c; f7aa3: return $response; goto a455b; D3e45: if (!(true === $request->isMethod("\x50\x4f\123\124"))) { goto F7e3d; } goto ab888; F6394: $form = $this->createFtpUserForm($ftpUserEntity); goto D3e45; Ed0bb: F7e3d: goto Ffa81; ab888: $form->handleRequest($request); goto Cbc84; b1496: $ftpUserEntity = $this->ftpUserEntityManager->createEntity(); goto a1022; c6be0: if (!(false === is_null($response))) { goto ab797; } goto F04ef; a455b: } private function createFtpUserForm(FtpUserEntity $ftpUserEntity) : Form { goto fab8d; fab8d: $siteEntity = $ftpUserEntity->getSite(); goto fa94e; A8feb: return $form; goto C84b0; Ff705: $form->add("\163\x75\x62\x6d\x69\164", SubmitType::class, ["\141\164\x74\162" => ["\x63\x6c\141\x73\x73" => "\x62\164\156\40\142\164\x6e\x2d\x62\154\x75\145\x20\x62\164\156\55\154\147"], "\154\141\142\x65\x6c" => "\101\x64\x64\x20\125\163\145\162"]); goto A8feb; fa94e: $form = $this->createForm("\101\x70\160\x5c\106\x6f\x72\155\x5c\x53\151\164\145\106\164\x70\125\163\145\162\x54\171\x70\145", $ftpUserEntity, ["\141\x63\164\151\x6f\x6e" => $this->generateUrl("\x63\x6c\160\137\x73\x69\x74\x65\137\x66\164\160\137\x75\x73\x65\162\137\156\x65\x77", ["\x64\157\x6d\141\151\x6e\116\x61\x6d\x65" => $siteEntity->getDomainName()]), "\155\x65\164\x68\157\144" => "\120\117\x53\x54", "\141\x74\164\x72" => []]); goto Ff705; C84b0: } private function handleFtpUserForm(Request $request, Form $form, Site $site) { goto D9488; de96a: D2acb: goto e81eb; F1be3: F0972: goto f4318; A8cf0: $this->formErrors = $this->getErrorMessages($form); goto E2c5d; D9488: if (true === $form->isValid()) { goto F0972; } goto A8cf0; f4318: try { goto ff639; F030b: $siteUpdater = $this->getSiteUpdater($site); goto f09c8; Da105: $eventData = ["\163\x69\164\145" => $domainName, "\165\163\x65\162\116\141\155\145" => $ftpUserName, "\x68\157\x6d\145\104\x69\162\x65\143\164\157\x72\x79" => $ftpUserEntity->getHomeDirectory()]; goto b939b; f09c8: $siteUpdater->createFtpUser($ftpUserEntity); goto Da105; A3412: B56d5: goto b3860; f2fa6: $this->siteEntityManager->updateEntity($siteEntity); goto F030b; b3860: $user = $this->getUser(); goto Efd2c; e9a22: $ftpUserName = $ftpUserEntity->getUserName(); goto ecca3; A41c7: goto f1f9b; goto A3412; Efd2c: $ftpUserEntity = $form->getData(); goto e9a22; b939b: EventQueue::addEvent(EventQueue::EVENT_SITE_FTP_USER_ADD, $user, $eventData, $request); goto Ed095; Abeb3: $siteEntity = $this->getSiteEntity($domainName); goto A03dc; dc560: $ftpUserEntity->setPassword($ftpUserPassword); goto Ba26f; A0ca1: $response = $this->redirect($this->generateUrl("\143\154\x70\x5f\x73\151\x74\x65\163")); goto A41c7; c39a7: $response = $this->redirect($this->generateUrl("\x63\154\160\137\x73\151\164\x65\x5f\x75\x73\x65\162\163", ["\x64\x6f\155\141\x69\x6e\116\141\155\145" => $site->getDomainName()])); goto f5833; b1ac3: return $response; goto A5324; Ed095: $session->getFlashBag()->set("\163\165\143\x63\145\x73\x73", $this->translator->trans("\125\163\145\x72\40\150\x61\x73\40\142\x65\145\x6e\x20\x61\144\x64\x65\144\56")); goto c39a7; Ba26f: $siteEntity->addFtpUser($ftpUserEntity); goto f2fa6; ff639: $session = $request->getSession(); goto e8d58; ecca3: $ftpUserPassword = $form->get("\x70\x61\x73\x73\167\x6f\162\144")->getData(); goto dc560; f5833: f1f9b: goto b1ac3; e8d58: $domainName = $site->getDomainName(); goto Abeb3; A03dc: if (false === is_null($siteEntity)) { goto B56d5; } goto A0ca1; A5324: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\141\x6e\147\x65\162", $this->translator->trans("\101\x6e\x20\x65\162\162\x6f\162\40\x68\141\x73\x20\157\x63\143\x75\x72\x72\145\144\54\x20\x65\x72\162\x6f\x72\40\155\x65\163\163\x61\x67\x65\72\x20\45\x65\162\x72\157\x72\115\145\x73\x73\141\x67\x65\45", ["\x25\x65\162\x72\x6f\x72\115\145\x73\x73\141\x67\x65\x25" => $e->getMessage()])); } goto de96a; E2c5d: goto D2acb; goto F1be3; e81eb: } public function editFtpUser(Request $request) : Response { goto d45df; D5b91: $site = $this->getSite($request); goto A9d87; c99d9: $form->handleRequest($request); goto Dd10d; C89b3: return $response; goto f3e04; d45df: $userName = $request->get("\x75\163\145\162\x4e\x61\x6d\x65"); goto D5b91; B878f: if (!(true === $request->isMethod("\120\117\x53\x54"))) { goto C3c96; } goto c99d9; Dd10d: if (!(true === $form->isSubmitted())) { goto a8908; } goto f79e1; Fc672: return $response; goto Ae2c8; Bbb42: $response = $this->redirect($this->generateUrl("\143\x6c\160\x5f\x73\x69\x74\x65\x73")); goto Cd600; bf97f: C3c96: goto Dac13; Bf02e: C42a6: goto ba730; Af871: B25b0: goto C89b3; Cd600: goto B25b0; goto Bf02e; C2c05: if (false === is_null($ftpUserEntity) && false === is_null($site) && $ftpUserEntity->getSite()->getDomainName() == $site->getDomainName()) { goto C42a6; } goto Bbb42; Dac13: $response = $this->render("\x46\x72\x6f\x6e\164\x65\x6e\144\x2f\x53\151\164\x65\x2f\145\144\x69\164\55\x66\x74\x70\55\x75\x73\145\162\x2e\150\x74\155\154\x2e\164\167\x69\x67", ["\163\x69\x74\x65" => $site, "\146\157\x72\x6d" => $form->createView(), "\146\157\x72\x6d\105\162\x72\x6f\162\x73" => $this->formErrors]); goto Af871; Ae2c8: b7f99: goto Abc3d; A9d87: $ftpUserEntity = $this->ftpUserEntityManager->findOneByUserName($userName); goto C2c05; ba730: $form = $this->createFtpUserEditForm($ftpUserEntity); goto B878f; F0e50: if (!(false === is_null($response))) { goto b7f99; } goto Fc672; f79e1: $response = $this->handleFtpUserEditForm($request, $form, $site); goto F0e50; Abc3d: a8908: goto bf97f; f3e04: } private function createFtpUserEditForm(FtpUserEntity $ftpUserEntity) : Form { goto df134; df134: $siteEntity = $ftpUserEntity->getSite(); goto Dd2a4; Dd2a4: $form = $this->createForm("\101\x70\160\x5c\x46\157\162\x6d\134\x53\x69\164\145\106\164\x70\125\163\x65\162\105\144\x69\164\124\x79\x70\x65", $ftpUserEntity, ["\141\143\164\151\157\156" => $this->generateUrl("\x63\154\x70\137\x73\x69\164\x65\x5f\x66\x74\x70\137\x75\163\x65\162\137\145\144\151\x74", ["\144\x6f\155\x61\x69\156\116\x61\155\145" => $siteEntity->getDomainName(), "\165\163\x65\162\x4e\141\x6d\x65" => $ftpUserEntity->getUserName()]), "\155\x65\164\150\x6f\x64" => "\120\x4f\123\124", "\141\164\164\162" => []]); goto Bef79; Bef79: $form->add("\x73\165\x62\x6d\151\164", SubmitType::class, ["\141\x74\x74\162" => ["\x63\154\141\x73\x73" => "\x62\x74\x6e\40\x62\x74\x6e\x2d\x62\154\165\145\x20\142\x74\156\x2d\154\147"], "\x6c\141\142\145\x6c" => "\123\141\166\x65"]); goto Dc682; Dc682: return $form; goto d660c; d660c: } private function handleFtpUserEditForm(Request $request, Form $form, Site $site) { goto daa0c; F7c67: try { goto a72d4; b8665: $response = $this->redirect($this->generateUrl("\143\x6c\x70\x5f\163\x69\x74\x65\x73")); goto bbcfb; A842b: $session->getFlashBag()->set("\x73\x75\143\x63\x65\x73\x73", $this->translator->trans("\125\163\x65\x72\x20\150\x61\x73\40\x62\x65\x65\156\x20\163\x61\166\145\144\x2e")); goto Ba980; d98d9: $siteEntity = $this->getSiteEntity($domainName); goto E8cd6; a72d4: $session = $request->getSession(); goto c988d; E0ff2: $ftpUserEntity = $form->getData(); goto f9174; fac27: $this->siteEntityManager->updateEntity($siteEntity); goto E1f75; Ac5fd: if (!(false === empty($ftpUserPassword))) { goto db0ce; } goto Ce6fa; f5a35: db0ce: goto Fa5db; bbcfb: goto Fb042; goto F4560; c620c: $user = $this->getUser(); goto E0ff2; A44e0: $siteUpdater->changeUserHomeDirectory($ftpUserName, $ftpUserHomeDirectory); goto Ac5fd; B577f: EventQueue::addEvent(EventQueue::EVENT_SITE_FTP_USER_EDIT, $user, $eventData, $request); goto A842b; Fa5db: $eventData = ["\x73\151\x74\x65" => $domainName, "\165\163\145\162\x4e\141\x6d\x65" => $ftpUserName, "\x68\x6f\x6d\145\x44\x69\x72\x65\143\164\157\162\171" => $ftpUserHomeDirectory]; goto B577f; E8cd6: if (false === is_null($siteEntity)) { goto Fd607; } goto b8665; B16e5: $ftpUserHomeDirectory = $ftpUserEntity->getHomeDirectory(); goto fac27; E1f75: $siteUpdater = $this->getSiteUpdater($site); goto A44e0; e8242: return $response; goto B5bc2; eb071: Fb042: goto e8242; Ba980: $response = $this->redirect($this->generateUrl("\x63\x6c\160\137\x73\x69\164\x65\137\165\x73\x65\162\163", ["\x64\157\155\x61\x69\x6e\x4e\141\155\145" => $site->getDomainName()])); goto eb071; F4560: Fd607: goto c620c; Ce6fa: $siteUpdater->changeUserPassword($ftpUserName, $ftpUserPassword); goto f5a35; c988d: $domainName = $site->getDomainName(); goto d98d9; f9174: $ftpUserName = $ftpUserEntity->getUserName(); goto f665f; f665f: $ftpUserPassword = $form->get("\160\x61\x73\x73\167\157\x72\x64")->getData(); goto B16e5; B5bc2: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\x61\x6e\147\x65\162", $this->translator->trans("\101\156\x20\x65\x72\162\x6f\x72\40\x68\x61\x73\x20\157\x63\x63\x75\162\x72\x65\x64\x2c\40\145\x72\162\157\x72\40\x6d\145\163\x73\x61\147\x65\72\x20\45\x65\162\x72\x6f\x72\x4d\145\163\163\x61\x67\x65\45", ["\45\145\162\x72\157\x72\115\145\163\x73\141\147\145\x25" => $e->getMessage()])); } goto F551e; a3c89: $this->formErrors = $this->getErrorMessages($form); goto E591a; F551e: A4ff9: goto b74aa; E7efa: Ba532: goto F7c67; daa0c: if (true === $form->isValid()) { goto Ba532; } goto a3c89; E591a: goto A4ff9; goto E7efa; b74aa: } public function deleteFtpUser(Request $request) : Response { goto a56cb; F4524: try { goto c63c5; e197d: e357c: goto F8aef; A00ad: $response = $this->redirect($this->generateUrl("\x63\154\160\137\x73\151\164\x65\x5f\x75\163\x65\x72\163", ["\x64\157\x6d\x61\151\x6e\x4e\x61\155\x65" => $site->getDomainName()])); goto b8445; A0a14: $session->getFlashBag()->set("\163\x75\x63\143\x65\163\163", $this->translator->trans("\125\163\145\162\40\x68\x61\x73\x20\142\145\145\156\40\x64\145\154\x65\x74\145\x64\x2e")); goto A00ad; Dfa7c: $ftpUserEntity = $this->ftpUserEntityManager->findOneByUserName($userName); goto d4b63; F8aef: Ac641: goto f76e4; Bbec6: EventQueue::addEvent(EventQueue::EVENT_SITE_FTP_USER_DELETE, $user, $evenData, $request); goto A0a14; d1e4c: $siteUpdater->deleteUser($userName, false); goto E18f1; b8445: return $response; goto e197d; D5e51: $ftpUserSiteEntity = $ftpUserEntity->getSite(); goto d503c; afaad: $user = $this->getUser(); goto Ca189; D314f: $domainName = $site->getDomainName(); goto A0f2d; C3031: $this->siteEntityManager->updateEntity($siteEntity); goto d820c; d4dec: $siteEntity->removeFtpUser($ftpUserEntity); goto C3031; d820c: $siteUpdater = $this->getSiteUpdater($site); goto d1e4c; d503c: if (!($siteEntity->getDomainName() == $ftpUserSiteEntity->getDomainName())) { goto e357c; } goto afaad; Ca189: $userName = $ftpUserEntity->getUserName(); goto d4dec; E18f1: $evenData = ["\163\151\164\145" => $domainName, "\x75\163\145\x72\x4e\x61\155\145" => $userName]; goto Bbec6; c19c9: $userName = $request->get("\165\x73\145\x72\116\141\155\x65"); goto D314f; c63c5: $session = $request->getSession(); goto c19c9; A0f2d: $siteEntity = $this->getSiteEntity($domainName); goto Dfa7c; d4b63: if (!(false === is_null($siteEntity) && false === empty($userName) && false === is_null($ftpUserEntity))) { goto Ac641; } goto D5e51; f76e4: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\x61\x6e\147\x65\162", $this->translator->trans("\x41\x6e\40\x65\162\x72\157\x72\x20\x68\x61\x73\40\x6f\143\143\165\162\x72\x65\144\54\x20\x65\x72\162\x6f\162\40\x6d\x65\163\163\141\147\x65\x3a\x20\x25\x65\x72\x72\157\x72\x4d\x65\x73\163\141\x67\145\45", ["\45\x65\x72\x72\157\162\x4d\x65\163\163\x61\147\145\x25" => $e->getMessage()])); } goto Ccb47; Ccb47: A9184: goto e2ed5; a56cb: $site = $this->getSite($request); goto D7dcd; e2ed5: $response = $this->redirect($this->generateUrl("\x63\x6c\x70\x5f\x73\151\x74\x65\x73")); goto D1b22; D7dcd: if (!(false === is_null($site))) { goto A9184; } goto F4524; D1b22: return $response; goto C1272; C1272: } public function newSshUser(Request $request) : Response { goto fd80c; c839f: $response = $this->handleSshUserForm($request, $form, $site); goto ee53e; dbfbc: $sshUserEntity->setSite($siteEntity); goto Ce808; fd80c: $site = $this->getSite($request); goto bc9cd; A2c9c: C5767: goto c49e6; Ae2e8: $form->handleRequest($request); goto d86cb; c0989: return $response; goto c57f7; F709e: $response = $this->redirect($this->generateUrl("\143\x6c\x70\137\163\x69\x74\x65\163")); goto A896d; ee53e: if (!(false === is_null($response))) { goto C5767; } goto Bd2a8; Ce808: $form = $this->createSshUserForm($sshUserEntity); goto Ddb1b; A896d: goto e003b; goto f89a7; d9024: $response = $this->render("\106\x72\x6f\x6e\164\145\156\144\x2f\x53\151\164\x65\57\x6e\145\167\x2d\163\x73\150\55\x75\163\145\162\56\x68\164\155\154\56\164\167\151\x67", ["\x73\151\164\145" => $site, "\x66\157\162\x6d" => $form->createView(), "\x66\x6f\162\155\x45\x72\x72\157\162\163" => $this->formErrors]); goto E1493; E78c6: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto D3496; D91de: B8eaf: goto d9024; E1493: e003b: goto c0989; bc9cd: if (false === is_null($site)) { goto E26c6; } goto F709e; Ddb1b: if (!(true === $request->isMethod("\x50\117\x53\124"))) { goto B8eaf; } goto Ae2e8; Bd2a8: return $response; goto A2c9c; c49e6: f8025: goto D91de; d86cb: if (!(true === $form->isSubmitted())) { goto f8025; } goto c839f; D3496: $sshUserEntity = $this->sshUserEntityManager->createEntity(); goto dbfbc; f89a7: E26c6: goto E78c6; c57f7: } private function createSshUserForm(SshUserEntity $sshUserEntity) : Form { goto A3bf7; d80d7: $form->add("\163\x75\x62\x6d\151\x74", SubmitType::class, ["\x61\x74\164\162" => ["\143\x6c\x61\163\x73" => "\x62\164\x6e\x20\142\x74\156\x2d\x62\154\165\x65\40\142\164\156\55\154\x67"], "\154\141\x62\x65\x6c" => "\x41\144\x64\x20\125\163\145\x72"]); goto Cd8b7; Be104: $form = $this->createForm("\101\x70\x70\x5c\106\157\x72\155\134\123\x69\164\145\123\x73\150\x55\163\x65\162\x54\x79\160\145", $sshUserEntity, ["\x61\143\164\x69\157\156" => $this->generateUrl("\143\154\x70\x5f\x73\151\x74\145\x5f\x73\x73\150\x5f\x75\163\145\162\137\x6e\x65\x77", ["\144\157\x6d\x61\151\x6e\x4e\141\x6d\145" => $siteEntity->getDomainName()]), "\155\x65\164\x68\157\144" => "\x50\117\x53\124", "\141\x74\x74\x72" => []]); goto d80d7; A3bf7: $siteEntity = $sshUserEntity->getSite(); goto Be104; Cd8b7: return $form; goto Fe887; Fe887: } private function handleSshUserForm(Request $request, Form $form, Site $site) { goto a2668; Ed71c: $this->formErrors = $this->getErrorMessages($form); goto F77f1; a2668: if (true === $form->isValid()) { goto a066e; } goto Ed71c; F77f1: goto c97c8; goto f737b; e8b67: c97c8: goto becb3; E9740: try { goto F7cd2; E0f3c: return $response; goto Fabc6; B0eec: $sshUserEntity = $form->getData(); goto a9898; F050f: $siteEntity = $this->getSiteEntity($domainName); goto b54b5; C0145: goto A25b9; goto Fd285; a4c1b: $response = $this->redirect($this->generateUrl("\143\x6c\160\x5f\x73\151\x74\145\x73")); goto C0145; e5390: $sshKeys = $sshUserEntity->getSshKeys(); goto b1d8f; ee325: $siteUpdater->updateUserSShKeys($sshUserName, $sshKeys); goto Fb528; Fb528: e7ec3: goto D8e4a; a9898: $sshUserName = $sshUserEntity->getUserName(); goto F1f13; F1f13: $sshUserPassword = $form->get("\160\x61\x73\163\x77\x6f\162\x64")->getData(); goto f57c3; dd3c1: EventQueue::addEvent(EventQueue::EVENT_SITE_SSH_USER_ADD, $user, $eventData, $request); goto Cfada; B6485: $this->siteEntityManager->updateEntity($siteEntity); goto d5f21; d5f21: $siteUpdater = $this->getSiteUpdater($site); goto B2481; ed9ab: $user = $this->getUser(); goto B0eec; D8e4a: $eventData = ["\x73\151\164\145" => $domainName, "\x75\163\x65\162\116\141\x6d\145" => $sshUserName, "\x73\x73\x68\113\145\x79\x73" => $sshKeys]; goto dd3c1; Cfada: $session->getFlashBag()->set("\163\165\x63\x63\x65\x73\163", $this->translator->trans("\x55\x73\x65\162\x20\150\x61\x73\x20\x62\x65\x65\x6e\40\141\144\144\x65\144\x2e")); goto c7d22; f7a5d: if (!(false === empty($sshKeys))) { goto e7ec3; } goto ee325; f57c3: $sshUserEntity->setPassword($sshUserPassword); goto e5390; eee64: A25b9: goto E0f3c; F7cd2: $session = $request->getSession(); goto C7d28; C7d28: $domainName = $site->getDomainName(); goto F050f; b1d8f: $siteEntity->addSshUser($sshUserEntity); goto B6485; c7d22: $response = $this->redirect($this->generateUrl("\x63\x6c\160\x5f\x73\x69\x74\x65\x5f\x75\x73\145\162\163", ["\x64\x6f\155\141\x69\x6e\116\x61\155\145" => $site->getDomainName()])); goto eee64; b54b5: if (false === is_null($siteEntity)) { goto ed8ca; } goto a4c1b; B2481: $siteUpdater->createSshUser($sshUserEntity); goto f7a5d; Fd285: ed8ca: goto ed9ab; Fabc6: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\x61\x6e\x67\x65\x72", $this->translator->trans("\101\156\40\145\x72\162\x6f\x72\40\x68\x61\x73\40\x6f\143\x63\x75\x72\x72\x65\x64\x2c\x20\145\x72\x72\x6f\162\x20\155\x65\163\163\141\x67\145\x3a\40\x25\145\x72\x72\x6f\x72\115\145\163\163\x61\147\145\x25", ["\45\145\x72\x72\x6f\x72\x4d\145\163\163\x61\x67\x65\x25" => $e->getMessage()])); } goto e8b67; f737b: a066e: goto E9740; becb3: } public function editSshUser(Request $request) : Response { goto af47c; e7bf1: $form = $this->createSshUserEditForm($sshUserEntity); goto D1bf0; Da724: $response = $this->render("\106\x72\157\156\164\x65\156\144\57\x53\x69\x74\x65\x2f\x65\x64\151\164\x2d\163\x73\150\x2d\165\x73\x65\x72\56\x68\x74\155\x6c\56\164\167\x69\147", ["\x73\x69\x74\x65" => $site, "\146\x6f\162\155" => $form->createView(), "\x66\x6f\162\155\105\162\162\x6f\x72\163" => $this->formErrors]); goto dc0b4; fa0f0: return $response; goto c45f8; D3109: if (false === is_null($sshUserEntity) && false === is_null($site) && $sshUserEntity->getSite()->getDomainName() == $site->getDomainName()) { goto b5312; } goto F1384; D1bf0: if (!(true === $request->isMethod("\120\117\x53\124"))) { goto Bab19; } goto D53d2; af47c: $userName = $request->get("\x75\x73\145\162\116\141\x6d\145"); goto a3d87; c84cd: goto Ca11a; goto Db839; Db839: b5312: goto e7bf1; dc0b4: Ca11a: goto fa0f0; bfea0: $response = $this->handleSshUserEditForm($request, $form, $site); goto D505c; ff048: $sshUserEntity = $this->sshUserEntityManager->findOneByUserName($userName); goto D3109; D505c: if (!(false === is_null($response))) { goto A1319; } goto Bcda6; Bcda6: return $response; goto d8416; D53d2: $form->handleRequest($request); goto edf7a; fd3d8: Bab19: goto Da724; f1892: A043a: goto fd3d8; a3d87: $site = $this->getSite($request); goto ff048; edf7a: if (!(true === $form->isSubmitted())) { goto A043a; } goto bfea0; d8416: A1319: goto f1892; F1384: $response = $this->redirect($this->generateUrl("\x63\154\160\x5f\163\151\164\x65\163")); goto c84cd; c45f8: } private function createSshUserEditForm(SshUserEntity $sshUserEntity) : Form { goto F70b7; db6b0: $form->add("\x73\x75\142\x6d\151\x74", SubmitType::class, ["\x61\x74\164\x72" => ["\x63\x6c\141\163\163" => "\x62\x74\156\x20\142\x74\x6e\x2d\142\154\x75\145\x20\x62\164\156\x2d\x6c\x67"], "\154\x61\142\145\x6c" => "\x53\x61\x76\145"]); goto aafbb; aafbb: return $form; goto ac3dc; F70b7: $siteEntity = $sshUserEntity->getSite(); goto c1e81; c1e81: $form = $this->createForm("\101\160\160\134\x46\x6f\162\155\134\x53\x69\164\x65\x53\x73\x68\125\x73\145\162\105\x64\151\164\124\171\x70\x65", $sshUserEntity, ["\x61\143\164\151\157\156" => $this->generateUrl("\x63\154\160\x5f\163\151\164\145\x5f\x73\x73\x68\137\165\x73\145\162\137\x65\144\x69\x74", ["\144\157\155\141\x69\x6e\x4e\x61\155\x65" => $siteEntity->getDomainName(), "\165\x73\x65\162\x4e\141\x6d\x65" => $sshUserEntity->getUserName()]), "\155\145\x74\150\157\x64" => "\x50\117\x53\124", "\141\x74\x74\162" => []]); goto db6b0; ac3dc: } private function handleSshUserEditForm(Request $request, Form $form, Site $site) { goto D3adf; D3adf: if (true === $form->isValid()) { goto E216b; } goto c33f7; a8e45: E216b: goto d641d; d641d: try { goto fbf88; Dc31f: $response = $this->redirect($this->generateUrl("\143\x6c\x70\137\x73\x69\164\145\x73")); goto E10a9; f75d8: EventQueue::addEvent(EventQueue::EVENT_SITE_SSH_USER_EDIT, $user, $eventData, $request); goto E70e7; A86f7: $this->siteEntityManager->updateEntity($siteEntity); goto E2742; Fe326: $siteUpdater->changeUserPassword($sshUserName, $sshUserPassword); goto B4071; Dd766: $sshUserEntity = $form->getData(); goto ee38d; Dc11d: return $response; goto a737d; Be8d8: af058: goto F5dbf; E10a9: goto e304e; goto Be8d8; A39c1: $sshUserPassword = $form->get("\160\x61\163\163\x77\x6f\162\144")->getData(); goto Ad6b4; Acfea: if (!(false === empty($sshUserPassword))) { goto D272d; } goto Fe326; E70e7: $session->getFlashBag()->set("\163\x75\143\143\x65\x73\x73", $this->translator->trans("\x55\163\145\162\40\x68\141\x73\x20\142\145\x65\156\x20\x73\141\x76\x65\144\x2e")); goto Eff31; Ad6b4: $sshKeys = false === is_null($sshUserEntity->getSshKeys()) ? $sshUserEntity->getSshKeys() : ''; goto A86f7; B4071: D272d: goto a1b2c; Eff31: $response = $this->redirect($this->generateUrl("\143\x6c\x70\137\x73\151\164\x65\x5f\x75\163\x65\x72\x73", ["\144\x6f\155\x61\151\x6e\116\x61\x6d\145" => $site->getDomainName()])); goto A8643; fbf88: $session = $request->getSession(); goto c974c; ff080: $siteEntity = $this->getSiteEntity($domainName); goto c889e; a1b2c: $siteUpdater->updateUserSShKeys($sshUserName, $sshKeys); goto f2cd3; A8643: e304e: goto Dc11d; f2cd3: $eventData = ["\163\x69\x74\x65" => $domainName, "\165\163\x65\162\116\141\x6d\145" => $sshUserName, "\163\x73\150\x4b\x65\x79\163" => $sshKeys]; goto f75d8; F5dbf: $user = $this->getUser(); goto Dd766; E2742: $siteUpdater = $this->getSiteUpdater($site); goto Acfea; c889e: if (false === is_null($siteEntity)) { goto af058; } goto Dc31f; ee38d: $sshUserName = $sshUserEntity->getUserName(); goto A39c1; c974c: $domainName = $site->getDomainName(); goto ff080; a737d: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\x61\156\147\x65\162", $this->translator->trans("\x41\156\40\145\x72\162\x6f\162\x20\150\x61\163\40\x6f\x63\x63\165\162\x72\145\x64\54\x20\x65\x72\162\x6f\x72\x20\x6d\x65\x73\163\141\x67\145\x3a\40\45\x65\x72\162\x6f\162\x4d\145\x73\x73\141\147\x65\45", ["\x25\x65\162\162\157\x72\115\145\x73\x73\x61\x67\x65\45" => $e->getMessage()])); } goto fdebf; Be820: goto e68bd; goto a8e45; c33f7: $this->formErrors = $this->getErrorMessages($form); goto Be820; fdebf: e68bd: goto Bca83; Bca83: } public function deleteSshUser(Request $request) : Response { goto D7bb2; C9986: e0a61: goto B3489; F7ee0: return $response; goto B52fb; B3489: $response = $this->redirect($this->generateUrl("\143\x6c\160\x5f\x73\x69\x74\x65\x73")); goto F7ee0; D7bb2: $site = $this->getSite($request); goto dfea3; dfea3: if (!(false === is_null($site))) { goto e0a61; } goto Ac910; Ac910: try { goto a8628; bbdcd: $response = $this->redirect($this->generateUrl("\143\x6c\160\x5f\x73\x69\164\x65\137\x75\x73\145\x72\x73", ["\x64\157\x6d\141\151\x6e\x4e\x61\155\145" => $site->getDomainName()])); goto A9a0e; bb327: $userName = $request->get("\x75\163\x65\x72\x4e\x61\x6d\145"); goto B6bc2; c7236: EventQueue::addEvent(EventQueue::EVENT_SITE_SSH_USER_DELETE, $user, $evenData, $request); goto Bdccd; db352: $this->siteEntityManager->updateEntity($siteEntity); goto c1852; Bdccd: $session->getFlashBag()->set("\x73\x75\x63\143\x65\163\163", $this->translator->trans("\125\x73\x65\x72\40\150\141\x73\40\x62\145\x65\156\x20\x64\x65\x6c\145\x74\145\x64\x2e")); goto bbdcd; Ccb9e: Caad9: goto c65a4; Dcdca: $siteUpdater->deleteUser($userName, true); goto Cee51; f4628: $siteEntity->removeSshUser($sshUserEntity); goto db352; cd1d1: $userName = $sshUserEntity->getUserName(); goto f4628; b1d7c: if (!($siteEntity->getDomainName() == $sshUserSiteEntity->getDomainName())) { goto Bef14; } goto a2f65; D0960: $sshUserEntity = $this->sshUserEntityManager->findOneByUserName($userName); goto ceb4c; c1852: $siteUpdater = $this->getSiteUpdater($site); goto Dcdca; B6bc2: $domainName = $site->getDomainName(); goto fc1ba; f15fc: $sshUserSiteEntity = $sshUserEntity->getSite(); goto b1d7c; ceb4c: if (!(false === is_null($siteEntity) && false === empty($userName) && false === is_null($sshUserEntity))) { goto Caad9; } goto f15fc; fc1ba: $siteEntity = $this->getSiteEntity($domainName); goto D0960; A9a0e: return $response; goto d01e6; Cee51: $evenData = ["\x73\151\164\145" => $domainName, "\x75\163\x65\162\116\141\155\145" => $userName]; goto c7236; a8628: $session = $request->getSession(); goto bb327; a2f65: $user = $this->getUser(); goto cd1d1; d01e6: Bef14: goto Ccb9e; c65a4: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\x61\156\x67\145\162", $this->translator->trans("\101\156\x20\x65\x72\162\157\x72\x20\150\x61\163\40\x6f\x63\x63\165\162\162\x65\x64\54\40\x65\x72\162\x6f\x72\x20\x6d\x65\x73\x73\x61\147\x65\72\40\45\145\162\x72\157\x72\x4d\x65\x73\163\141\x67\x65\45", ["\x25\145\x72\162\157\162\x4d\x65\163\163\141\147\145\x25" => $e->getMessage()])); } goto C9986; B52fb: } public function security(Request $request) : Response { goto f74c6; c30b5: D30c8: goto C465a; d2743: if (false === is_null($site)) { goto Eda41; } goto bc12a; B2951: $basicAuthEntity = $this->basicAuthEntityManager->createEntity(); goto Cabaf; B4dc2: afa05: goto c083f; D714d: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto ec5b8; a1b1e: $blockedIps = $site->getBlockedIps(); goto f90ab; D0fc8: $cloudflareForm = $this->createCloudflareForm($siteEntity, $cloudflareData); goto Bebbc; a7105: if (!(false === is_null($response))) { goto D3800; } goto F7112; F7112: return $response; goto ce482; ed25b: $basicAuthEntity->setSite($siteEntity); goto Eedf2; afa88: if (!(false === is_null($response))) { goto afa05; } goto de7cd; C465a: $response = $this->render("\106\x72\157\x6e\164\145\156\144\57\x53\x69\164\x65\x2f\x73\145\x63\x75\x72\151\x74\x79\x2e\150\164\155\x6c\56\x74\167\x69\x67", ["\163\x69\x74\145" => $site, "\142\x6c\x6f\x63\153\x65\x64\x49\160\163" => $blockedIps, "\x62\x6c\157\143\x6b\145\144\102\x6f\164\163" => $blockedBots, "\142\141\x73\x69\143\x41\165\164\x68\x46\x6f\162\x6d" => $basicAuthForm->createView(), "\x63\154\157\165\x64\146\154\x61\162\x65\x46\x6f\x72\155" => $cloudflareForm->createView(), "\146\x6f\162\x6d\105\x72\x72\x6f\x72\163" => $this->formErrors]); goto B94c9; cbb75: $response = $this->handleCloudflareForm($request, $cloudflareForm, $site); goto a7105; f74c6: $site = $this->getSite($request); goto d2743; af919: $basicAuthForm->handleRequest($request); goto F94ad; e48db: if (!(true === $basicAuthForm->isSubmitted())) { goto Ce182; } goto af727; bc12a: $response = $this->redirect($this->generateUrl("\x63\154\x70\x5f\163\151\x74\x65\163")); goto Dc333; c083f: Ce182: goto Ff28f; Cabaf: Aeee6: goto ed25b; B94c9: Cd281: goto fa906; A6eb9: $blockedBots = $site->getBlockedBots(); goto a1b1e; ce482: D3800: goto Ca9f0; Dc333: goto Cd281; goto D506b; D506b: Eda41: goto D714d; Ff28f: if (!(true === $cloudflareForm->isSubmitted())) { goto Cca40; } goto cbb75; Fddb8: if (!(true === is_null($basicAuthEntity))) { goto Aeee6; } goto B2951; de7cd: return $response; goto B4dc2; ec5b8: $cloudflareData = ["\x61\154\x6c\157\167\124\162\141\146\x66\151\x63\x46\162\x6f\155\103\154\x6f\165\x64\146\x6c\141\162\145\117\156\154\171" => $siteEntity->allowTrafficFromCloudflareOnly()]; goto A6eb9; Bebbc: if (!(true === $request->isMethod("\120\x4f\123\x54"))) { goto D30c8; } goto af919; F94ad: $cloudflareForm->handleRequest($request); goto e48db; fa906: return $response; goto a080a; f90ab: $basicAuthEntity = $site->getBasicAuth(); goto Fddb8; Ca9f0: Cca40: goto c30b5; Eedf2: $basicAuthForm = $this->createBasicAuthForm($basicAuthEntity); goto D0fc8; af727: $response = $this->handleBasicAuthForm($request, $basicAuthForm, $site); goto afa88; a080a: } private function createCloudflareForm(SiteEntity $siteEntity, array $data) : Form { goto C1b5a; B8713: return $form; goto C4d2d; C1b5a: $form = $this->createForm("\101\x70\160\134\106\x6f\162\x6d\x5c\123\151\164\x65\x43\154\x6f\165\x64\x66\x6c\x61\162\x65\x54\x79\x70\145", $data, ["\x61\143\164\x69\157\x6e" => $this->generateUrl("\143\x6c\160\137\x73\x69\164\x65\137\163\x65\x63\165\162\x69\164\171", ["\x64\157\155\141\x69\156\116\141\155\x65" => $siteEntity->getDomainName()]), "\155\x65\164\150\157\x64" => "\x50\117\x53\x54", "\x61\x74\164\162" => []]); goto C79af; C79af: $form->add("\x73\x75\142\x6d\151\164", SubmitType::class, ["\x61\164\164\x72" => ["\143\154\141\163\163" => "\142\x74\156\40\x62\x74\156\x2d\142\154\165\x65\x20\142\164\x6e\x2d\154\x67"], "\x6c\x61\x62\x65\154" => "\x53\x61\166\x65"]); goto B8713; C4d2d: } private function createBasicAuthForm(BasicAuthEntity $basicAuthEntity) : Form { goto df696; cc794: $form = $this->createForm("\101\x70\x70\134\106\157\x72\155\x5c\x53\x69\164\x65\102\141\163\151\143\x41\x75\164\150\x54\171\x70\x65", $basicAuthEntity, ["\141\143\164\x69\x6f\x6e" => $this->generateUrl("\x63\154\160\x5f\163\151\164\x65\x5f\x73\145\143\x75\x72\151\x74\171", ["\144\x6f\x6d\141\151\x6e\116\141\155\x65" => $siteEntity->getDomainName()]), "\155\x65\164\x68\157\x64" => "\120\x4f\x53\x54", "\141\x74\164\x72" => []]); goto Aaa8a; Aaa8a: $form->add("\163\x75\x62\155\x69\x74", SubmitType::class, ["\x61\164\x74\x72" => ["\x63\154\x61\163\163" => "\142\x74\156\x20\x62\164\156\55\142\154\x75\x65\40\x62\164\x6e\55\x6c\147"], "\154\141\x62\x65\154" => "\x53\141\x76\x65"]); goto ce637; ce637: return $form; goto Be0d3; df696: $siteEntity = $basicAuthEntity->getSite(); goto cc794; Be0d3: } private function handleBasicAuthForm(Request $request, Form $form, Site $site) { goto f64bd; c3ed9: try { goto E5120; Fd088: $basicAuthEntity = $form->getData(); goto A3042; E5db0: $siteUpdater->createBasicAuthFile($basicAuthEntity); goto ee1c9; A66f7: $siteUpdater->reloadNginxService(); goto d8d41; B9026: $response = $this->redirect($this->generateUrl("\143\154\160\137\x73\x69\164\x65\x73")); goto Abfbc; d5000: ea355: goto A6d7d; a9872: if (false === is_null($siteEntity)) { goto ea355; } goto B9026; deae9: $domainName = $site->getDomainName(); goto cdf45; cdf45: $siteEntity = $this->getSiteEntity($domainName); goto a9872; a9c5e: D0069: goto Cf901; A6d7d: $user = $this->getUser(); goto Fd088; Abfbc: goto D0069; goto d5000; Cf901: return $response; goto a01cf; B10bb: $siteUpdater = $this->getSiteUpdater($site); goto E5db0; D8eed: EventQueue::addEvent(EventQueue::EVENT_SITE_BASIC_AUTHENTIFICATION_SETTINGS, $user, $eventData, $request); goto Be483; E5120: $session = $request->getSession(); goto deae9; ee1c9: $siteUpdater->updateNginxVhost(); goto A66f7; a3cc9: $response = $this->redirect($this->generateUrl("\x63\x6c\160\x5f\163\x69\164\x65\x5f\163\x65\143\x75\162\151\x74\171", ["\x64\x6f\155\141\x69\156\116\141\155\x65" => $site->getDomainName()])); goto a9c5e; B63b9: $this->siteEntityManager->updateEntity($siteEntity); goto B10bb; A3042: $siteEntity->setBasicAuth($basicAuthEntity); goto bac2b; d8d41: $eventData = ["\163\151\x74\x65" => $domainName, "\x61\143\x74\x69\166\x65" => true === $basicAuthEntity->getIsActive() ? "\61" : "\x30", "\165\x73\x65\x72\116\141\155\145" => $basicAuthEntity->getUserName(), "\x77\x68\x69\164\x65\154\151\163\164\145\x64\111\160\163" => $basicAuthEntity->getWhitelistedIps()]; goto D8eed; Be483: $session->getFlashBag()->set("\163\165\x63\x63\x65\163\163", $this->translator->trans("\x42\x61\163\151\143\x20\101\165\164\x68\x65\156\x74\x69\143\141\164\151\x6f\156\40\x73\x65\164\x74\x69\x6e\x67\163\40\x68\x61\166\145\x20\142\x65\x65\156\x20\163\141\166\145\x64\x2e")); goto a3cc9; bac2b: $site->setBasicAuth($basicAuthEntity); goto B63b9; a01cf: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\x61\156\147\x65\x72", $this->translator->trans("\101\156\x20\145\162\162\157\162\40\x68\x61\x73\x20\157\x63\x63\x75\162\162\145\144\x2c\x20\x65\x72\x72\157\x72\x20\x6d\145\x73\x73\x61\147\x65\x3a\x20\x25\145\x72\x72\157\x72\115\145\x73\x73\141\x67\145\45", ["\45\145\x72\162\157\162\x4d\x65\x73\x73\x61\147\x65\x25" => $e->getMessage()])); } goto Dc380; Fcd79: $this->formErrors = $this->getErrorMessages($form); goto A4252; f64bd: if (true === $form->isValid()) { goto D7e40; } goto Fcd79; A4252: goto a3fee; goto Eeaaa; Eeaaa: D7e40: goto c3ed9; Dc380: a3fee: goto a7ec5; a7ec5: } private function handleCloudflareForm(Request $request, Form $form, Site $site) { goto f4182; A56b5: c5b82: goto d3029; ba503: $this->formErrors = $this->getErrorMessages($form); goto bb0d5; f4182: if (true === $form->isValid()) { goto A194c; } goto ba503; D411b: A194c: goto c3786; bb0d5: goto c5b82; goto D411b; c3786: try { goto e9f3c; Ef3cc: Fa737: goto b0aab; Ce98b: $eventData = ["\163\x69\x74\x65" => $domainName, "\x61\154\154\x6f\167\124\162\x61\146\146\151\x63\106\162\x6f\x6d\x43\x6c\x6f\x75\x64\146\x6c\141\x72\x65\x4f\156\x6c\171" => true === $allowTrafficFromCloudflareOnly ? "\x31" : "\x30"]; goto Cba1a; A268e: $user = $this->getUser(); goto b8ddc; Cba1a: EventQueue::addEvent(EventQueue::EVENT_SITE_CLOUDFLARE_SETTINGS, $user, $eventData, $request); goto f0550; Aefb5: goto Fa737; goto dfa67; b8ddc: $allowTrafficFromCloudflareOnly = $form->get("\x61\x6c\x6c\157\167\124\x72\141\146\146\x69\x63\x46\162\x6f\x6d\x43\x6c\157\165\x64\146\x6c\141\162\145\x4f\x6e\x6c\171")->getData(); goto a0eae; A90fc: $siteUpdater = $this->getSiteUpdater($site); goto D0d04; d0840: $siteEntity = $this->getSiteEntity($domainName); goto ac107; dfa67: e1852: goto A268e; c415c: $response = $this->redirect($this->generateUrl("\x63\154\x70\x5f\163\x69\164\145\x5f\163\145\143\165\162\x69\x74\171", ["\144\157\x6d\x61\x69\156\116\141\155\x65" => $site->getDomainName()])); goto Ef3cc; e9f3c: $session = $request->getSession(); goto c1277; f0550: $session->getFlashBag()->set("\x73\165\x63\143\x65\163\x73", $this->translator->trans("\x43\154\157\x75\x64\x66\154\141\x72\x65\x20\163\x65\x74\x74\x69\x6e\x67\163\40\150\141\166\145\40\142\x65\145\x6e\40\163\141\166\145\x64\56")); goto c415c; Fe9cd: $siteUpdater->reloadNginxService(); goto Ce98b; Addbb: $site->setAllowTrafficFromCloudflareOnly($allowTrafficFromCloudflareOnly); goto E37b8; ac107: if (false === is_null($siteEntity)) { goto e1852; } goto Ebb8f; c1277: $domainName = $site->getDomainName(); goto d0840; Ebb8f: $response = $this->redirect($this->generateUrl("\x63\154\160\137\x73\x69\164\145\163")); goto Aefb5; D0d04: $siteUpdater->updateNginxVhost(); goto Fe9cd; E37b8: $this->siteEntityManager->updateEntity($siteEntity); goto A90fc; a0eae: $siteEntity->setAllowTrafficFromCloudflareOnly($allowTrafficFromCloudflareOnly); goto Addbb; b0aab: return $response; goto Cabb2; Cabb2: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\141\x6e\147\x65\x72", $this->translator->trans("\x41\156\40\x65\x72\162\157\x72\40\150\x61\163\40\x6f\143\143\x75\162\162\x65\144\x2c\40\145\162\x72\x6f\x72\x20\x6d\x65\x73\163\x61\x67\145\72\40\x25\145\x72\162\x6f\162\x4d\x65\163\163\x61\x67\145\45", ["\x25\x65\x72\162\157\162\x4d\x65\x73\x73\141\147\x65\x25" => $e->getMessage()])); } goto A56b5; d3029: } public function newBlockedIp(Request $request) : Response { goto E2e08; f51e2: Ba159: goto e94c4; e94c4: $response = $this->render("\106\162\157\x6e\164\x65\x6e\x64\x2f\x53\151\164\145\57\156\x65\x77\x2d\142\154\x6f\x63\x6b\x65\x64\x2d\151\160\x2e\150\x74\155\154\x2e\x74\x77\151\147", ["\163\x69\164\145" => $site, "\x66\x6f\x72\155" => $form->createView(), "\x66\157\162\155\x45\x72\162\x6f\162\163" => $this->formErrors]); goto ffc9e; E9c9d: return $response; goto B81e9; Bc43f: $form->handleRequest($request); goto e66df; Bd612: $response = $this->handleBlockedIpForm($request, $form, $site); goto e3efe; ffc9e: ddc38: goto Cbd2c; B157a: $blockedIpEntity->setSite($siteEntity); goto F0365; Cbd2c: return $response; goto Eacdf; e3efe: if (!(false === is_null($response))) { goto b755c; } goto E9c9d; e6a83: $blockedIpEntity = $this->blockedIpEntityManager->createEntity(); goto B157a; bd8b7: if (false === is_null($site)) { goto b0aaf; } goto F3149; B04e2: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto e6a83; F3149: $response = $this->redirect($this->generateUrl("\x63\154\160\x5f\x73\151\x74\x65\163")); goto e5310; b66a8: if (!(true === $request->isMethod("\120\117\123\x54"))) { goto Ba159; } goto Bc43f; B8331: ef116: goto f51e2; F0365: $form = $this->createBlockedIpForm($blockedIpEntity); goto b66a8; E2e08: $site = $this->getSite($request); goto bd8b7; e66df: if (!(true === $form->isSubmitted())) { goto ef116; } goto Bd612; e4fbd: b0aaf: goto B04e2; B81e9: b755c: goto B8331; e5310: goto ddc38; goto e4fbd; Eacdf: } private function createBlockedIpForm(BlockedIpEntity $blockedIpEntity) : Form { goto D2041; d5733: $form->add("\163\165\142\155\151\164", SubmitType::class, ["\141\x74\x74\162" => ["\x63\x6c\x61\163\x73" => "\x62\x74\156\x20\x62\164\x6e\55\142\x6c\165\145\40\142\x74\x6e\x2d\154\147"], "\154\141\142\x65\154" => "\101\144\x64\x20\111\120"]); goto Da17d; Da17d: return $form; goto Eb0dd; fe29a: $form = $this->createForm("\101\160\160\x5c\x46\157\162\x6d\134\x53\x69\164\x65\x42\154\157\143\153\x65\144\111\x50\x54\171\160\x65", $blockedIpEntity, ["\x61\143\x74\x69\x6f\x6e" => $this->generateUrl("\143\154\160\x5f\163\x69\164\145\x5f\163\x65\x63\165\x72\x69\164\171\x5f\x62\154\157\143\153\145\x64\137\x69\160\x5f\156\145\x77", ["\x64\157\155\x61\151\x6e\x4e\x61\155\x65" => $siteEntity->getDomainName()]), "\x6d\145\164\x68\157\x64" => "\120\x4f\123\x54", "\141\164\164\x72" => []]); goto d5733; D2041: $siteEntity = $blockedIpEntity->getSite(); goto fe29a; Eb0dd: } private function handleBlockedIpForm(Request $request, Form $form, Site $site) { goto e6a72; Cc45f: d94aa: goto B8d97; e6a72: if (true === $form->isValid()) { goto Fd341; } goto e4467; D086c: goto d94aa; goto be57b; f9870: try { goto D2033; Ba803: $session->getFlashBag()->set("\x73\x75\143\x63\x65\x73\x73", $this->translator->trans("\111\x50\40\150\x61\163\40\142\x65\145\156\x20\141\x64\x64\145\144\56")); goto C2caa; Dd1c5: $user = $this->getUser(); goto c379b; Fbb99: $response = $this->redirect($this->generateUrl("\x63\x6c\x70\137\163\x69\164\145\163")); goto Ad75b; a5041: $siteEntity = $this->getSiteEntity($domainName); goto b4520; Ad75b: goto ad6df; goto ec758; a6fff: $siteUpdater = $this->getSiteUpdater($site); goto fe80c; D2033: $session = $request->getSession(); goto c88dc; ee9a1: $siteEntity->addBlockedIp($blockedIp); goto Ef65e; ec758: cdd96: goto Dd1c5; ca90f: EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_IP_ADD, $user, $eventData, $request); goto Ba803; C2caa: $response = $this->redirect($this->generateUrl("\x63\154\x70\x5f\x73\x69\164\x65\x5f\x73\x65\x63\x75\x72\151\164\171", ["\x64\x6f\155\141\151\x6e\x4e\x61\155\145" => $site->getDomainName()])); goto F31a3; c88dc: $domainName = $site->getDomainName(); goto a5041; b4520: if (false === is_null($siteEntity)) { goto cdd96; } goto Fbb99; d2e95: return $response; goto Fa04d; ec6c9: $siteUpdater->reloadNginxService(); goto Ebff4; Ef65e: $this->siteEntityManager->updateEntity($siteEntity); goto a6fff; fe80c: $siteUpdater->updateNginxVhost(); goto ec6c9; Ebff4: $eventData = ["\163\x69\164\145" => $domainName, "\x69\160" => $blockedIp->getIp()]; goto ca90f; F31a3: ad6df: goto d2e95; c379b: $blockedIp = $form->getData(); goto ee9a1; Fa04d: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\141\x6e\147\145\162", $this->translator->trans("\x41\156\40\145\162\162\x6f\162\40\x68\x61\163\40\x6f\x63\143\165\x72\162\145\144\54\x20\x65\x72\162\157\x72\40\155\x65\x73\x73\x61\x67\x65\72\x20\45\145\x72\x72\x6f\162\115\x65\163\x73\141\x67\145\45", ["\45\x65\x72\x72\157\x72\115\x65\163\x73\x61\147\x65\45" => $e->getMessage()])); } goto Cc45f; e4467: $this->formErrors = $this->getErrorMessages($form); goto D086c; be57b: Fd341: goto f9870; B8d97: } public function deleteBlockedIp(Request $request) : Response { goto bbd79; cc322: if (!(false === is_null($site))) { goto bbb14; } goto b1f30; a43f1: $response = $this->redirect($this->generateUrl("\143\154\x70\137\163\x69\x74\x65\163")); goto f9cdb; bbd79: $site = $this->getSite($request); goto cc322; Fad7a: bbb14: goto a43f1; b1f30: try { goto D3013; e0edb: $id = (int) $request->get("\x69\x64"); goto c463b; Bf622: EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_IP_DELETE, $user, $eventData, $request); goto fb317; A3dd3: $response = $this->redirect($this->generateUrl("\143\x6c\x70\x5f\x73\x69\164\x65\137\163\145\x63\165\x72\x69\x74\171", ["\x64\x6f\x6d\x61\151\x6e\x4e\141\x6d\145" => $site->getDomainName()])); goto Fe9eb; fa15b: $user = $this->getUser(); goto Bfe79; Fe9eb: return $response; goto e3ea9; C9c76: $siteUpdater->updateNginxVhost(); goto E683e; Bfe79: $siteEntity->removeBlockedIp($blockedIpEntity); goto E72bc; A114f: $siteUpdater = $this->getSiteUpdater($site); goto C9c76; Deb49: $siteEntity = $this->getSiteEntity($domainName); goto c36e0; D3013: $session = $request->getSession(); goto e0edb; c463b: $domainName = $site->getDomainName(); goto Deb49; Debd9: $eventData = ["\x73\x69\x74\145" => $domainName, "\x69\160" => $blockedIpEntity->getIp()]; goto Bf622; E683e: $siteUpdater->reloadNginxService(); goto Debd9; e3ea9: Ffd7f: goto D9462; c36e0: $blockedIpEntity = $this->blockedIpEntityManager->findOneById($id); goto e0ad1; E72bc: $this->siteEntityManager->updateEntity($siteEntity); goto A114f; e0ad1: if (!(false === is_null($siteEntity) && false === empty($id) && false === is_null($blockedIpEntity) && $siteEntity == $blockedIpEntity->getSite())) { goto Ffd7f; } goto fa15b; fb317: $session->getFlashBag()->set("\x73\x75\143\x63\x65\x73\163", $this->translator->trans("\111\x50\x20\150\x61\x73\x20\142\x65\145\156\40\144\x65\x6c\145\x74\x65\144\x2e")); goto A3dd3; D9462: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\x61\x6e\147\x65\162", $this->translator->trans("\x41\156\40\145\x72\x72\x6f\162\x20\150\x61\x73\x20\157\x63\x63\x75\162\x72\145\x64\54\x20\145\162\162\157\x72\x20\x6d\145\x73\163\x61\147\x65\72\x20\45\x65\x72\x72\157\162\x4d\x65\163\163\x61\x67\x65\x25", ["\x25\145\162\x72\157\x72\x4d\x65\163\163\x61\147\x65\45" => $e->getMessage()])); } goto Fad7a; f9cdb: return $response; goto B8787; B8787: } public function newBlockedBot(Request $request) : Response { goto F2215; D0246: return $response; goto Bc2e5; Ead0b: $blockedBotEntity = $this->blockedBotEntityManager->createEntity(); goto Ff76b; Ff76b: $blockedBotEntity->setSite($siteEntity); goto dcb02; Dfa3a: C032e: goto cbf85; f161b: a2712: goto D0246; A13fc: b8ea2: goto a7ef3; a6506: if (!(true === $form->isSubmitted())) { goto b8ea2; } goto c9629; f90fd: $form->handleRequest($request); goto a6506; db029: if (!(true === $request->isMethod("\x50\x4f\x53\x54"))) { goto B7848; } goto f90fd; d1714: goto a2712; goto Dfa3a; fa94c: $response = $this->redirect($this->generateUrl("\x63\154\x70\137\163\151\164\145\163")); goto d1714; dcb02: $form = $this->createBlockedBotForm($blockedBotEntity); goto db029; cbf85: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto Ead0b; F0809: if (!(false === is_null($response))) { goto C2c17; } goto D5efa; F2215: $site = $this->getSite($request); goto Ebca9; b6dd6: C2c17: goto A13fc; cde63: $response = $this->render("\106\162\x6f\156\164\145\x6e\144\x2f\123\151\x74\x65\x2f\156\145\x77\x2d\142\x6c\157\143\x6b\x65\144\x2d\x62\x6f\x74\x2e\150\x74\155\154\x2e\x74\167\151\147", ["\x73\x69\x74\x65" => $site, "\x66\x6f\x72\x6d" => $form->createView(), "\146\x6f\162\155\105\162\x72\157\x72\x73" => $this->formErrors]); goto f161b; a7ef3: B7848: goto cde63; Ebca9: if (false === is_null($site)) { goto C032e; } goto fa94c; c9629: $response = $this->handleBlockedBotForm($request, $form, $site); goto F0809; D5efa: return $response; goto b6dd6; Bc2e5: } private function createBlockedBotForm(BlockedBotEntity $blockedBotEntity) : Form { goto cff13; Bbc52: $form->add("\163\x75\142\155\x69\x74", SubmitType::class, ["\141\x74\164\162" => ["\x63\x6c\x61\x73\163" => "\x62\x74\156\40\142\x74\x6e\x2d\x62\x6c\x75\x65\x20\142\164\x6e\55\x6c\x67"], "\x6c\141\142\x65\x6c" => "\x41\144\144\x20\102\x6f\164"]); goto b9b1e; cff13: $siteEntity = $blockedBotEntity->getSite(); goto fdf6f; b9b1e: return $form; goto A081d; fdf6f: $form = $this->createForm("\101\x70\160\134\106\157\162\x6d\134\123\x69\164\x65\102\154\157\143\x6b\x65\144\102\x6f\164\x54\x79\x70\145", $blockedBotEntity, ["\141\x63\164\x69\x6f\x6e" => $this->generateUrl("\143\x6c\x70\x5f\x73\x69\x74\145\x5f\x73\x65\x63\165\162\x69\x74\x79\137\x62\154\x6f\x63\153\145\144\137\x62\x6f\x74\x5f\156\x65\x77", ["\144\x6f\155\x61\x69\x6e\x4e\x61\155\x65" => $siteEntity->getDomainName()]), "\x6d\145\x74\150\157\144" => "\120\x4f\x53\124", "\141\164\x74\x72" => []]); goto Bbc52; A081d: } private function handleBlockedBotForm(Request $request, Form $form, Site $site) { goto Aa591; fd3a4: $this->formErrors = $this->getErrorMessages($form); goto dd87a; Aa591: if (true === $form->isValid()) { goto A3a04; } goto fd3a4; ce44b: e98a6: goto ebe3b; c4ed2: try { goto f197c; B78d4: goto eead9; goto b4335; Bb2fb: $eventData = ["\163\151\164\x65" => $domainName, "\x6e\141\x6d\145" => $blockedBot->getName()]; goto F31db; F31db: EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_BOT_ADD, $user, $eventData, $request); goto cb6de; d15c6: $response = $this->redirect($this->generateUrl("\x63\154\160\x5f\x73\x69\164\145\137\163\x65\143\x75\162\151\x74\x79", ["\x64\157\x6d\x61\x69\x6e\116\x61\155\x65" => $site->getDomainName()])); goto E3337; E3337: eead9: goto Cbce4; b2055: $siteEntity = $this->getSiteEntity($domainName); goto f080d; f72db: $this->siteEntityManager->updateEntity($siteEntity); goto Efabb; a7a70: $domainName = $site->getDomainName(); goto b2055; E7f44: $blockedBot = $form->getData(); goto B4ccd; B4ccd: $siteEntity->addBlockedBot($blockedBot); goto f72db; b4335: Ab832: goto Ff1d6; Ff1d6: $user = $this->getUser(); goto E7f44; f080d: if (false === is_null($siteEntity)) { goto Ab832; } goto B2f18; Cbce4: return $response; goto e0590; B2f18: $response = $this->redirect($this->generateUrl("\143\154\x70\x5f\163\151\x74\x65\x73")); goto B78d4; cb6de: $session->getFlashBag()->set("\x73\165\x63\143\145\163\163", $this->translator->trans("\x42\157\x74\x20\150\141\x73\x20\x62\x65\145\156\40\141\144\x64\x65\x64\x2e")); goto d15c6; B56d2: $siteUpdater->updateNginxVhost(); goto A1d8c; Efabb: $siteUpdater = $this->getSiteUpdater($site); goto B56d2; A1d8c: $siteUpdater->reloadNginxService(); goto Bb2fb; f197c: $session = $request->getSession(); goto a7a70; e0590: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\141\x6e\147\145\x72", $this->translator->trans("\101\x6e\x20\145\x72\162\157\162\40\x68\141\163\x20\157\x63\143\165\x72\162\x65\x64\x2c\40\x65\x72\162\x6f\162\x20\x6d\145\x73\163\141\147\145\72\x20\x25\x65\x72\x72\x6f\162\115\145\x73\163\x61\x67\145\x25", ["\45\x65\162\162\157\162\x4d\145\x73\x73\141\x67\x65\x25" => $e->getMessage()])); } goto ce44b; dd87a: goto e98a6; goto F10a9; F10a9: A3a04: goto c4ed2; ebe3b: } public function deleteBlockedBot(Request $request) : Response { goto fee11; c3227: if (!(false === is_null($site))) { goto C48f3; } goto E7977; fee11: $site = $this->getSite($request); goto c3227; A1a4c: $response = $this->redirect($this->generateUrl("\x63\154\160\x5f\163\151\x74\145\x73")); goto Cd0f0; c8789: C48f3: goto A1a4c; Cd0f0: return $response; goto B71d7; E7977: try { goto B0371; f8780: $user = $this->getUser(); goto F9f51; C67df: $response = $this->redirect($this->generateUrl("\x63\154\160\137\x73\151\164\145\x5f\163\145\143\x75\x72\x69\164\171", ["\144\157\155\141\151\156\x4e\x61\x6d\x65" => $site->getDomainName()])); goto A8054; b0ca8: if (!(false === is_null($siteEntity) && false === empty($id) && false === is_null($blockedBotEntity) && $siteEntity == $blockedBotEntity->getSite())) { goto bb0ea; } goto f8780; A23e7: $eventData = ["\163\151\x74\145" => $domainName, "\x6e\141\x6d\145" => $blockedBotEntity->getName()]; goto e2c25; A8054: return $response; goto A0bb8; B0371: $session = $request->getSession(); goto Adfbb; f139c: $siteUpdater->updateNginxVhost(); goto cd634; C31b5: $domainName = $site->getDomainName(); goto D7d0d; be7c5: $this->siteEntityManager->updateEntity($siteEntity); goto C26ca; d2dc3: $blockedBotEntity = $this->blockedBotEntityManager->findOneById($id); goto b0ca8; D7d0d: $siteEntity = $this->getSiteEntity($domainName); goto d2dc3; cd634: $siteUpdater->reloadNginxService(); goto A23e7; A0bb8: bb0ea: goto Ab8d1; C26ca: $siteUpdater = $this->getSiteUpdater($site); goto f139c; F9f51: $siteEntity->removeBlockedBot($blockedBotEntity); goto be7c5; f9b2a: $session->getFlashBag()->set("\x73\x75\143\143\x65\x73\x73", $this->translator->trans("\102\157\x74\x20\x68\x61\x73\x20\142\x65\x65\x6e\x20\x64\x65\x6c\145\x74\x65\x64\x2e")); goto C67df; Adfbb: $id = (int) $request->get("\x69\x64"); goto C31b5; e2c25: EventQueue::addEvent(EventQueue::EVENT_SITE_BLOCKED_BOT_DELETE, $user, $eventData, $request); goto f9b2a; Ab8d1: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\141\156\x67\x65\x72", $this->translator->trans("\x41\x6e\x20\x65\162\x72\x6f\162\x20\x68\141\x73\40\157\143\x63\x75\162\x72\x65\x64\54\40\x65\x72\162\157\162\40\x6d\145\163\163\141\x67\145\72\x20\x25\145\x72\x72\157\x72\115\x65\x73\163\141\x67\145\x25", ["\x25\145\x72\x72\157\x72\x4d\145\163\x73\x61\x67\x65\x25" => $e->getMessage()])); } goto c8789; B71d7: } public function certificates(Request $request) : Response { goto bef06; cf70c: $response = $this->redirect($this->generateUrl("\143\x6c\x70\137\x73\151\x74\x65\x73")); goto d3089; E7f3e: $response = $this->render("\106\x72\157\156\x74\x65\x6e\144\x2f\x53\x69\x74\145\57\143\x65\162\x74\x69\x66\x69\143\141\x74\145\163\x2e\x68\164\x6d\154\56\x74\x77\x69\x67", ["\x73\x69\x74\x65" => $site, "\x69\156\x73\164\141\154\154\x65\x64\103\x65\x72\164\151\x66\151\143\x61\x74\x65" => $installedCertificate, "\143\145\x72\164\151\x66\151\x63\141\x74\x65\163" => $certificates]); goto a1af8; d3089: goto fb846; goto Cd0ce; d4ec3: return $response; goto eb1b4; de767: $installedCertificate = $site->getCertificate(); goto Ccec6; Cd0ce: A5bd6: goto de767; c235f: if (false === is_null($site)) { goto A5bd6; } goto cf70c; Ccec6: $certificates = $site->getCertificates(); goto E7f3e; bef06: $site = $this->getSite($request); goto c235f; a1af8: fb846: goto d4ec3; eb1b4: } public function importCertificate(Request $request) : Response { goto Bf37c; E7512: D066a: goto a8fd3; bc9de: E190d: goto B5f3b; f2394: return $response; goto E3801; b079f: $response = $this->redirect($this->generateUrl("\x63\154\160\137\163\x69\164\145\x73")); goto ae4dd; Ec371: if (false === is_null($site)) { goto E190d; } goto b079f; D6e63: $certificateEntity = $this->certificateEntityManager->createEntity(); goto efacf; aa651: $response = $this->handleImportCertificateForm($request, $form, $site); goto d2bd5; efacf: $certificateEntity->setType(CertificateEntity::TYPE_IMPORTED); goto F534f; Eefa0: $form = $this->createImportCertificateForm($certificateEntity); goto d8149; ae4dd: goto E748b; goto bc9de; cee00: ccdb3: goto a109b; F534f: $certificateEntity->setSite($siteEntity); goto Eefa0; b0a24: if (!(true === $form->isSubmitted())) { goto Ffba4; } goto aa651; c93f9: $form->handleRequest($request); goto b0a24; b15e5: E748b: goto f2394; d2bd5: if (!(false === is_null($response))) { goto D066a; } goto D7a1b; Bf37c: $site = $this->getSite($request); goto Ec371; a109b: $response = $this->render("\106\x72\157\x6e\x74\145\x6e\144\x2f\123\151\x74\x65\x2f\151\x6d\x70\x6f\x72\164\x2d\143\145\x72\x74\151\x66\151\x63\x61\164\145\56\x68\164\x6d\x6c\56\x74\x77\x69\147", ["\163\x69\x74\145" => $site, "\146\x6f\162\155" => $form->createView(), "\x66\157\162\155\105\162\162\x6f\162\x73" => $this->formErrors]); goto b15e5; D7a1b: return $response; goto E7512; d8149: if (!(true === $request->isMethod("\x50\117\123\124"))) { goto ccdb3; } goto c93f9; B5f3b: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto D6e63; a8fd3: Ffba4: goto cee00; E3801: } private function createImportCertificateForm(CertificateEntity $certificateEntity) : Form { goto A06bd; Ce9f2: $form = $this->createForm("\101\160\160\134\106\157\x72\155\x5c\x53\x69\164\x65\111\x6d\160\x6f\x72\x74\x43\x65\x72\x74\151\146\151\x63\141\164\x65\x54\171\x70\x65", $certificateEntity, ["\x61\143\x74\x69\157\x6e" => $this->generateUrl("\143\x6c\160\137\163\x69\164\145\137\x63\145\x72\x74\151\x66\151\143\x61\x74\145\137\x69\155\x70\157\x72\164", ["\x64\157\155\x61\151\x6e\116\141\x6d\x65" => $siteEntity->getDomainName()]), "\155\x65\164\150\157\x64" => "\120\117\x53\124", "\x61\164\164\162" => []]); goto C2ddd; C2ddd: $form->add("\163\165\142\155\151\x74", SubmitType::class, ["\x61\164\164\x72" => ["\143\x6c\141\163\x73" => "\x62\x74\x6e\x20\142\x74\156\x2d\x62\x6c\165\145\40\142\164\156\55\154\x67"], "\x6c\x61\x62\145\154" => "\111\x6d\x70\x6f\162\x74\x20\141\x6e\144\40\x49\x6e\163\x74\x61\x6c\154"]); goto fb699; A06bd: $siteEntity = $certificateEntity->getSite(); goto Ce9f2; fb699: return $form; goto E111a; E111a: } private function handleImportCertificateForm(Request $request, Form $form, Site $site) { goto Ddc8c; Abbf5: $this->formErrors = $this->getErrorMessages($form); goto Ef052; Ef052: goto e7f98; goto Ff8a0; Ddc8c: if (true === $form->isValid()) { goto e164a; } goto Abbf5; d0ac6: e7f98: goto D9efc; Ff8a0: e164a: goto Dc76b; Dc76b: try { goto c1f1c; Cccb7: $session->getFlashBag()->set("\x73\x75\x63\143\145\163\x73", $this->translator->trans("\x43\145\162\x74\x69\x66\151\143\x61\164\x65\40\x68\x61\x73\40\142\x65\145\156\40\x69\156\x73\x74\141\154\154\x65\x64\56")); goto C4100; a7459: $siteEntity = $this->getSiteEntity($domainName); goto b1813; C4100: $response = $this->redirect($this->generateUrl("\143\x6c\160\137\163\151\x74\145\x5f\x63\x65\162\164\151\x66\x69\143\141\164\145\x73", ["\144\x6f\155\141\151\x6e\x4e\x61\155\145" => $site->getDomainName()])); goto c546a; eb463: $siteUpdater = $this->getSiteUpdater($site); goto Ae39a; b55f8: $evenData = ["\x73\151\x74\145" => $domainName]; goto B61ef; C7dda: $user = $this->getUser(); goto e67dd; baf25: $domainName = $site->getDomainName(); goto a7459; cd2a8: $this->siteEntityManager->updateEntity($siteEntity); goto b55f8; Ab0f8: $response = $this->redirect($this->generateUrl("\143\154\160\137\x73\x69\164\145\x73")); goto da4b9; b1813: if (false === is_null($siteEntity)) { goto be288; } goto Ab0f8; c1f1c: $session = $request->getSession(); goto baf25; da4b9: goto bb043; goto ea9c3; B61ef: EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_INSTALL, $user, $evenData, $request); goto Cccb7; F95dc: return $response; goto d4c95; ea9c3: be288: goto C7dda; c546a: bb043: goto F95dc; B8bbf: $siteEntity->setCertificate($certificateEntity); goto Fa6fb; Fa6fb: $siteEntity->addCertificate($certificateEntity); goto cd2a8; e67dd: $certificateEntity = $form->getData(); goto eb463; Ae39a: $siteUpdater->installCertificate($certificateEntity); goto B8bbf; d4c95: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\x61\156\x67\x65\x72", $this->translator->trans("\x41\156\40\145\162\x72\x6f\162\40\x68\x61\163\x20\x6f\143\x63\x75\x72\x72\145\144\x2c\40\x65\162\x72\x6f\x72\x20\155\x65\163\x73\141\147\145\x3a\40\45\x65\x72\x72\157\162\x4d\145\163\x73\x61\x67\x65\45", ["\45\145\x72\x72\x6f\162\115\x65\x73\x73\x61\147\x65\45" => $e->getMessage()])); } goto d0ac6; D9efc: } public function newLetsEncryptCertificate(Request $request) : Response { goto Ff985; D9074: $domains = (array) $request->get("\144\157\155\141\151\x6e\x73"); goto C4aba; a89e9: $domains = array_map("\164\162\151\x6d", $domains); goto F593c; cd69a: $response = $this->render("\x46\x72\x6f\156\x74\x65\156\x64\57\x53\x69\x74\145\x2f\156\x65\167\55\x6c\145\164\163\55\145\156\x63\162\x79\160\x74\x2d\x63\x65\162\164\x69\146\x69\x63\141\x74\145\56\150\164\x6d\x6c\56\x74\167\x69\x67", ["\x73\151\x74\x65" => $site, "\144\157\155\x61\x69\x6e\x73" => $domains, "\x66\157\x72\x6d" => $form->createView(), "\x66\x6f\162\x6d\x45\162\x72\x6f\x72\x73" => $this->formErrors]); goto d5e8e; f08b3: $domains = []; goto b5e18; Ff985: $site = $this->getSite($request); goto ccb9f; Ce5cc: $subdomain = false === empty($subdomain) ? $subdomain : null; goto D707e; ccb9f: if (false === is_null($site)) { goto c1530; } goto bb891; bb891: $response = $this->redirect($this->generateUrl("\143\154\160\x5f\163\x69\164\x65\x73")); goto E36a1; C4aba: $domains = array_filter($domains, function ($value) { return false === empty(trim($value)); }); goto a89e9; c9aba: goto d8bc6; goto D7930; b7330: if (!(false === is_null($response))) { goto Ec9d6; } goto A21be; b5e18: if (true === $request->isMethod("\120\117\x53\x54")) { goto E9d4f; } goto f80fb; f80fb: $resolvedDomainName = $this->domainNameParser->resolveDomainName($domainName); goto c0c06; B961f: E34f8: goto a9ded; F593c: $domains = array_unique($domains); goto C405c; c0c06: $registrableDomain = $resolvedDomainName->registrableDomain()->toString(); goto d44ae; d44ae: $subdomain = $resolvedDomainName->subDomain()->toString(); goto Ce5cc; a6404: if (!(true === $form->isSubmitted())) { goto Ff859; } goto D9074; d5e8e: F27bd: goto e349e; e349e: return $response; goto B17af; ed078: $domains = [$domainName]; goto Fb76e; b69ce: $domainName = $site->getDomainName(); goto E03b3; a8a69: d8bc6: goto cd69a; a9ded: $domains = [$registrableDomain, sprintf("\167\167\167\56\45\163", $registrableDomain)]; goto Aaca7; Aaca7: bf289: goto c9aba; e0c05: c1530: goto b69ce; A21be: return $response; goto fa063; Fb76e: goto bf289; goto B961f; E1e1a: $form->handleRequest($request); goto a6404; D7930: E9d4f: goto E1e1a; E36a1: goto F27bd; goto e0c05; C405c: $response = $this->handleLetsEncryptCertificateForm($request, $form, $site, $domains); goto b7330; e03ec: Ff859: goto a8a69; E03b3: $form = $this->createLetsEncryptCertificateForm($domainName); goto f08b3; D707e: if (true === is_null($subdomain) || "\x77\167\167" == $subdomain) { goto E34f8; } goto ed078; fa063: Ec9d6: goto e03ec; B17af: } private function createLetsEncryptCertificateForm(string $domainName) : Form { goto af82f; A1a73: return $form; goto Dea58; af82f: $form = $this->createForm("\x41\x70\x70\134\106\x6f\x72\x6d\x5c\x53\x69\164\145\114\145\x74\163\105\156\x63\x72\x79\x70\164\x43\x65\x72\x74\x69\x66\151\143\x61\164\x65\124\171\x70\x65", [], ["\141\143\x74\151\157\156" => $this->generateUrl("\143\x6c\160\137\163\x69\x74\145\x5f\x6c\x65\164\x73\137\145\x6e\x63\162\x79\x70\164\137\143\x65\x72\x74\x69\146\x69\143\x61\x74\145\x5f\156\x65\x77", ["\x64\x6f\x6d\141\151\x6e\x4e\x61\155\x65" => $domainName]), "\x6d\145\164\150\157\x64" => "\x50\x4f\x53\x54", "\141\164\164\x72" => ["\x69\x64" => "\x63\x72\x65\141\x74\x65\x2d\x6c\145\164\x73\x2d\x65\156\x63\x72\171\160\164\55\143\145\162\x74\x69\146\x69\143\141\164\145\x2d\146\157\162\x6d"]]); goto F0d64; F0d64: $form->add("\x73\165\x62\x6d\151\x74", SubmitType::class, ["\141\x74\x74\162" => ["\x63\154\141\x73\x73" => "\x62\164\x6e\x20\x62\164\156\55\142\x6c\x75\x65\x20\x62\x74\156\55\154\147"], "\x6c\x61\142\145\x6c" => "\x43\162\145\x61\164\145\40\141\x6e\x64\x20\x49\x6e\163\x74\x61\154\x6c"]); goto A1a73; Dea58: } private function handleLetsEncryptCertificateForm(Request $request, Form $form, Site $site, array $domains) { goto a1430; E44fc: f7f80: goto Bcec9; a1430: if (!(true === $form->isValid())) { goto f7f80; } goto a4800; Bcec9: $this->formErrors = $this->getErrorMessages($form); goto b681a; a4800: try { goto Baa20; Ffc7f: $certificateOrder = $letsEncryptClient->requestOrder($domains); goto B7be5; Ad091: EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_INSTALL, $user, $evenData, $request); goto Af855; ba3ff: b6003: goto Bbbf8; De9da: $distinguishedName = new DistinguishedName($commonName, $distinguishedNameDomains); goto aa677; Ee196: $letsEncryptPrivateKey = $this->configManager->get("\154\145\x5f\160\x72\x69\166\141\164\145\137\x6b\x65\x79"); goto c295d; D7119: $certificateEntity->setCsr($certificate->getCsr()); goto E804a; F518a: return $response; goto da5dd; B4670: $distinguishedNameDomains = $domains; goto aed2b; fe483: $certificate = $letsEncryptClient->finalizeOrder($certificateOrder, $privateKey, $csr); goto Fdc38; Fdc38: $certificateEntity = $this->certificateEntityManager->createEntity(); goto E2d69; Fba22: $validationErrors = $letsEncryptClient->validateDomains($certificateOrder); goto D923d; c636b: $siteEntity->addCertificate($certificateEntity); goto Afa80; A9345: $response = $this->redirect($this->generateUrl("\143\154\160\137\163\x69\164\145\163")); goto fa9c1; da5dd: c88f6: goto d9829; Edb30: $response = $this->redirect($this->generateUrl("\143\154\x70\137\x73\151\x74\145\x5f\143\x65\162\x74\151\x66\151\x63\x61\164\145\x73", ["\x64\157\155\141\151\156\x4e\141\155\145" => $site->getDomainName()])); goto F518a; Ccf5c: $siteUpdater->installCertificate($certificateEntity); goto Df2fd; a46fe: $letsEncryptClient = new LetsEncryptClient($privateKey); goto F5d0b; Af855: $session->getFlashBag()->set("\x73\165\143\143\145\x73\x73", $this->translator->trans("\103\x65\162\164\151\146\151\x63\x61\x74\x65\40\x68\141\163\x20\142\145\x65\x6e\x20\x69\x6e\163\164\x61\154\x6c\x65\144\x2e")); goto Edb30; d5a91: $domainName = $site->getDomainName(); goto ee2c6; Ab57a: ce124: goto c52b6; Bbbf8: $user = $this->getUser(); goto Ee196; bbc6b: if (false === is_null($siteEntity)) { goto b6003; } goto A9345; c52b6: goto c88f6; goto fbf15; Baa20: $session = $request->getSession(); goto d5a91; Bc9b9: $csr = $csrGenerator->generate(); goto fe483; aa677: $rsaKeyGenerator = new RsaKeyGenerator(); goto E18c8; aed2b: $commonName = array_shift($distinguishedNameDomains); goto De9da; d630b: $siteUpdater = $this->getSiteUpdater($site); goto Ccf5c; Df2fd: $siteEntity->setCertificate($certificateEntity); goto c636b; df761: $siteUpdater->createLetsEncryptChallengeFiles($certificateOrder); goto Fba22; a473a: $csrGenerator = new CsrGenerator($privateKey, $distinguishedName); goto Bc9b9; Bcf6c: $siteUpdater->deleteLetsEncryptChallengeDirectory(); goto df761; A74a2: $certificateEntity->setCertificate($certificate->getCertificate()); goto C26fa; F5d0b: $letsEncryptClient->registerAccount(); goto Ffc7f; Afa80: $this->siteEntityManager->updateEntity($siteEntity); goto d4ec9; C26fa: $certificateEntity->setCertificateChain($certificate->getCertificateChain()); goto d630b; E804a: $certificateEntity->setPrivateKey($certificate->getPrivateKey()); goto A74a2; B7be5: $siteUpdater = $this->getSiteUpdater($site); goto Bcf6c; E2d69: $certificateEntity->setType(CertificateEntity::TYPE_LETS_ENCRYPT); goto e1ea0; fbf15: e6c3e: goto B4670; fdc50: foreach ($validationErrors as $domain => $validationErrorMessage) { $form->addError(new FormError(sprintf("\45\x73\72\x20\45\x73", $domain, $validationErrorMessage))); e7607: } goto Ab57a; D923d: if (true === empty($validationErrors)) { goto e6c3e; } goto fdc50; d9829: D03b5: goto E46ea; daa5d: goto D03b5; goto ba3ff; fa9c1: return $response; goto daa5d; E18c8: $privateKey = $rsaKeyGenerator->generatePrivateKey(); goto a473a; e1ea0: $certificateEntity->setSite($siteEntity); goto D7119; d4ec9: $evenData = ["\163\151\x74\145" => $domainName]; goto Ad091; c295d: $privateKey = new PrivateKey($letsEncryptPrivateKey); goto a46fe; ee2c6: $siteEntity = $this->getSiteEntity($domainName); goto bbc6b; E46ea: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\x61\156\x67\145\x72", $this->translator->trans("\101\156\40\x65\x72\162\157\162\x20\x68\x61\163\x20\157\143\x63\x75\x72\162\145\x64\x2c\x20\145\x72\162\x6f\162\x20\x6d\x65\x73\x73\x61\x67\x65\x3a\x20\45\145\x72\x72\x6f\x72\115\x65\x73\x73\141\x67\x65\45", ["\x25\x65\x72\x72\157\x72\115\145\x73\x73\x61\147\145\45" => $e->getMessage()])); } finally { if (!(true === isset($siteUpdater))) { goto ea3b5; } $siteUpdater->deleteLetsEncryptChallengeDirectory(); ea3b5: } goto E44fc; b681a: } public function installCertificate(Request $request) : Response { goto B6f71; C86da: try { goto d5235; a245b: $response = $this->redirect($this->generateUrl("\x63\x6c\160\137\163\x69\x74\x65\137\143\145\162\164\x69\146\x69\x63\141\x74\145\x73", ["\144\x6f\155\x61\151\156\x4e\x61\x6d\x65" => $site->getDomainName()])); goto Fbc01; dc8b0: if (!($siteEntity->getDomainName() == $certificateSiteEntity->getDomainName() && $siteEntity->getCertificate() != $certificateSiteEntity)) { goto Dd647; } goto E7d2c; Fbc01: return $response; goto C24d8; Aec93: F4bc9: goto ad9ec; bdc43: $uid = $request->get("\165\x69\x64"); goto Bfd8c; D581a: $siteUpdater->installCertificate($certificateEntity); goto eb728; A0659: $evenData = ["\x73\x69\x74\145" => $domainName]; goto ba3ef; D737c: if (!(false === is_null($siteEntity) && false === empty($uid) && false === is_null($certificateEntity))) { goto F4bc9; } goto dd7d3; ba3ef: EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_INSTALL, $user, $evenData, $request); goto ecd41; eb728: $siteEntity->setCertificate($certificateEntity); goto ac186; dd7d3: $certificateSiteEntity = $certificateEntity->getSite(); goto dc8b0; ea9d3: $certificateEntity = $this->certificateEntityManager->findOneByUid($uid); goto D737c; ac186: $this->siteEntityManager->updateEntity($siteEntity); goto A0659; Da812: $siteUpdater = $this->getSiteUpdater($site); goto D581a; ecd41: $session->getFlashBag()->set("\x73\x75\x63\143\145\x73\x73", $this->translator->trans("\103\145\162\164\x69\x66\151\x63\141\164\x65\40\x68\141\x73\x20\x62\145\145\x6e\40\151\x6e\163\164\x61\154\x6c\145\x64\56")); goto a245b; d5235: $session = $request->getSession(); goto bdc43; C24d8: Dd647: goto Aec93; E7d2c: $user = $this->getUser(); goto Da812; Bfd8c: $domainName = $site->getDomainName(); goto a3556; a3556: $siteEntity = $this->getSiteEntity($domainName); goto ea9d3; ad9ec: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\141\x6e\x67\145\x72", $this->translator->trans("\x41\156\x20\145\162\162\157\x72\x20\150\141\x73\x20\x6f\x63\143\165\x72\162\145\144\x2c\x20\x65\x72\162\x6f\162\40\x6d\x65\163\163\141\147\145\72\40\45\145\x72\x72\157\x72\115\x65\x73\163\x61\x67\x65\45", ["\45\x65\x72\162\157\x72\x4d\145\163\x73\x61\147\x65\45" => $e->getMessage()])); } goto c7a8a; c7a8a: Aeaf8: goto Ad1a5; B6f71: $site = $this->getSite($request); goto bf457; ba110: return $response; goto feeee; Ad1a5: $response = $this->redirect($this->generateUrl("\143\x6c\x70\x5f\163\x69\x74\145\163")); goto ba110; bf457: if (!(false === is_null($site))) { goto Aeaf8; } goto C86da; feeee: } public function deleteCertificate(Request $request) : Response { goto b81cf; a9bff: return $response; goto Cb1a8; dc325: B54f9: goto f7f5f; a573e: try { goto B34d2; F7684: $this->siteEntityManager->updateEntity($siteEntity); goto Edc69; ebaf8: $siteEntity->removeCertificate($certificateEntity); goto F7684; f94a7: if (!(false === is_null($siteEntity) && false === empty($uid) && false === is_null($certificateEntity) && false === $certificateEntity->getDefaultCertificate())) { goto f849f; } goto F47d0; B3115: $siteEntity = $this->getSiteEntity($domainName); goto Cfac6; a59d3: f849f: goto f5609; B34d2: $session = $request->getSession(); goto E7f8b; E7f8b: $uid = $request->get("\x75\151\x64"); goto a21ec; Cfac6: $certificateEntity = $this->certificateEntityManager->findOneByUid($uid); goto f94a7; Edc69: $evenData = ["\163\x69\x74\145" => $domainName]; goto dfbbd; dfbbd: EventQueue::addEvent(EventQueue::EVENT_SITE_CERTIFICATE_DELETE, $user, $evenData, $request); goto E11c9; B2864: return $response; goto ed0c1; fb0d6: $response = $this->redirect($this->generateUrl("\143\x6c\x70\137\163\x69\164\145\x5f\143\x65\x72\x74\151\x66\151\143\141\164\x65\x73", ["\144\157\155\x61\x69\156\116\x61\155\145" => $site->getDomainName()])); goto B2864; ed0c1: a51d6: goto a59d3; F47d0: $certificateSiteEntity = $certificateEntity->getSite(); goto e5ab9; B5fed: $user = $this->getUser(); goto ebaf8; e5ab9: if (!($siteEntity->getDomainName() == $certificateSiteEntity->getDomainName() && $siteEntity->getCertificate() != $certificateSiteEntity)) { goto a51d6; } goto B5fed; a21ec: $domainName = $site->getDomainName(); goto B3115; E11c9: $session->getFlashBag()->set("\x73\x75\143\143\145\x73\163", $this->translator->trans("\103\x65\162\x74\151\146\x69\143\141\164\x65\x20\x68\x61\163\40\142\145\x65\156\x20\144\x65\154\145\164\x65\144\56")); goto fb0d6; f5609: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\141\156\x67\145\x72", $this->translator->trans("\101\156\x20\x65\x72\162\x6f\x72\40\150\141\x73\x20\157\x63\143\x75\162\x72\145\x64\x2c\x20\145\x72\162\157\162\x20\155\145\x73\x73\141\147\145\72\40\x25\x65\x72\162\x6f\x72\115\145\x73\x73\x61\147\145\x25", ["\45\145\x72\162\x6f\x72\x4d\145\x73\x73\141\147\x65\x25" => $e->getMessage()])); } goto dc325; bf723: if (!(false === is_null($site))) { goto B54f9; } goto a573e; b81cf: $site = $this->getSite($request); goto bf723; f7f5f: $response = $this->redirect($this->generateUrl("\x63\154\x70\x5f\163\x69\164\x65\x73")); goto a9bff; Cb1a8: } public function databases(Request $request) : Response { goto D0f83; c1c92: foreach ($databases as $database) { $numberOfDatabaseUsers += count($database->getUsers()); C72da: } goto aa699; A23bf: d7a92: goto ea384; f57c8: b48af: goto e9d53; C43a9: goto d7a92; goto f57c8; f39f7: $numberOfDatabaseUsers = 0; goto c1c92; cc25c: if (false === is_null($site)) { goto b48af; } goto e6d1d; e9d53: $databases = $site->getDatabases(); goto C451f; e6d1d: $response = $this->redirect($this->generateUrl("\x63\154\x70\137\163\x69\164\145\x73")); goto C43a9; b0a63: $response = $this->render("\106\x72\157\x6e\x74\x65\156\144\57\x53\x69\164\145\57\144\x61\x74\x61\142\x61\163\x65\163\56\150\x74\155\x6c\x2e\164\x77\x69\147", ["\x73\151\x74\x65" => $site, "\x64\141\164\x61\142\141\163\145\x73" => $databases, "\156\165\x6d\142\145\162\117\146\x44\x61\x74\141\142\141\x73\x65\125\163\x65\x72\x73" => $numberOfDatabaseUsers, "\x64\141\x74\141\142\x61\x73\145\x53\x65\162\x76\x65\162" => $databaseServerEntity]); goto A23bf; ea384: return $response; goto Fed7c; D0f83: $site = $this->getSite($request); goto cc25c; aa699: a4656: goto b0a63; C451f: $databaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto f39f7; Fed7c: } public function newDatabase(Request $request) : Response { goto Abd64; B34fb: F84e8: goto f8309; D1058: $response = $this->redirect($this->generateUrl("\143\x6c\x70\x5f\163\151\x74\x65\163")); goto D276f; D202f: $form->handleRequest($request); goto Afdfb; D175f: return $response; goto B382e; c68a3: $databaseEntity->setSite($siteEntity); goto D076b; f7c26: return $response; goto eb94e; a2fe6: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto E011d; Afdfb: if (!(true === $form->isSubmitted())) { goto Fecda; } goto E5cf2; Abd64: $site = $this->getSite($request); goto ad0da; D276f: goto D5a7d; goto Cccc5; E011d: $databaseEntity = $this->databaseEntityManager->createEntity(); goto c68a3; af3a3: if (!(false === is_null($response))) { goto eb38b; } goto f7c26; ad0da: if (false === is_null($site)) { goto dac4c; } goto D1058; E5cf2: $response = $this->handleDatabaseForm($request, $form, $site); goto af3a3; d9498: D5a7d: goto D175f; eb94e: eb38b: goto Ee89b; f8309: $response = $this->render("\x46\162\157\x6e\164\x65\x6e\x64\x2f\x53\x69\x74\x65\x2f\x6e\x65\167\x2d\144\141\x74\141\142\x61\163\145\x2e\x68\164\155\x6c\56\164\x77\x69\x67", ["\163\x69\164\x65" => $site, "\x66\x6f\162\x6d" => $form->createView(), "\146\157\x72\x6d\105\162\x72\x6f\x72\x73" => $this->formErrors]); goto d9498; ee66e: if (!(true === $request->isMethod("\x50\117\123\124"))) { goto F84e8; } goto D202f; Cccc5: dac4c: goto a2fe6; D076b: $form = $this->createDatabaseForm($site, $databaseEntity); goto ee66e; Ee89b: Fecda: goto B34fb; B382e: } private function createDatabaseForm(Site $site, DatabaseEntity $databaseEntity) : Form { goto F8498; a7397: $form->add("\x73\165\142\x6d\x69\x74", SubmitType::class, ["\x61\164\164\162" => ["\x63\154\x61\x73\163" => "\x62\164\156\40\142\x74\156\x2d\142\154\x75\x65\x20\142\x74\156\55\x6c\x67"], "\154\141\142\x65\x6c" => "\101\x64\144\x20\x44\141\x74\x61\x62\x61\x73\x65"]); goto bfd7a; bfd7a: return $form; goto f9c9b; F8498: $form = $this->createForm("\x41\160\160\x5c\x46\157\162\x6d\134\x53\x69\164\x65\104\x61\164\x61\x62\x61\x73\x65\x54\x79\160\145", $databaseEntity, ["\141\x63\x74\151\x6f\x6e" => $this->generateUrl("\143\x6c\x70\137\163\151\x74\145\x5f\x64\x61\164\x61\x62\x61\163\145\137\x6e\x65\x77", ["\x64\x6f\155\x61\151\156\x4e\141\155\145" => $site->getDomainName()]), "\x6d\x65\x74\150\157\144" => "\120\x4f\x53\124", "\x61\x74\x74\x72" => []]); goto a7397; f9c9b: } private function handleDatabaseForm(Request $request, Form $form, Site $site) { goto F1c0d; ac37c: goto F995a; goto D0c95; F1c0d: if (true === $form->isValid()) { goto d41b7; } goto Cead5; Cff02: F995a: goto A990e; Cead5: $this->formErrors = $this->getErrorMessages($form); goto ac37c; C53e6: try { goto b0ef7; b0ef7: $user = $this->getUser(); goto Ea518; b5997: $databaseUserEntity = $this->databaseUserEntityManager->createEntity(); goto A3b40; f5268: $databaseEntity->setSite($siteEntity); goto f2c33; D9212: $activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto b9618; d64e3: $session->getFlashBag()->set("\163\165\x63\x63\145\163\x73", $this->translator->trans("\x44\141\x74\x61\142\141\163\145\40\x68\141\163\x20\142\145\145\x6e\x20\141\144\144\x65\144\x2e")); goto a3bed; C2edf: return $response; goto c1c9a; f1a5b: $databaseManager->createUser($databaseUserEntity); goto d9268; Fa163: if (false === is_null($siteEntity)) { goto af686; } goto A3818; f8b6a: $eventData = ["\163\x69\x74\145" => $domainName, "\144\141\164\141\x62\x61\x73\x65" => $databaseEntity->getName(), "\x64\141\164\x61\x62\x61\163\145\x55\x73\x65\162\x4e\x61\x6d\145" => $databaseUserEntity->getUserName()]; goto Ad44f; d9268: $this->siteEntityManager->updateEntity($siteEntity); goto f8b6a; b4da4: c94a4: goto C2edf; E2290: $domainName = $site->getDomainName(); goto B5b3f; bdd71: $databaseEntity->setDatabaseServer($activeDatabaseServerEntity); goto f5268; fcc2f: af686: goto d3cc1; f2c33: $databaseUserName = $form->get("\x75\x73\145\162\x4e\x61\155\x65")->getData(); goto c5f8b; Eb02d: $databaseManager->createDatabase($databaseEntity); goto f1a5b; B5b3f: $siteEntity = $this->getSiteEntity($domainName); goto Fa163; D8238: goto c94a4; goto fcc2f; B0242: $databaseUserEntity->setDatabase($databaseEntity); goto f9dbc; a3bed: $response = $this->redirect($this->generateUrl("\x63\x6c\x70\137\x73\151\x74\x65\x5f\x64\x61\x74\141\142\141\x73\x65\163", ["\x64\x6f\155\x61\x69\x6e\116\141\x6d\145" => $site->getDomainName()])); goto b4da4; A3b40: $databaseUserEntity->setUserName($databaseUserName); goto Abbed; f9dbc: $databaseEntity->addUser($databaseUserEntity); goto B0539; Ad44f: EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_ADD, $user, $eventData, $request); goto d64e3; A3818: $response = $this->redirect($this->generateUrl("\x63\x6c\160\x5f\163\x69\x74\x65\x5f\x64\x61\x74\141\x62\x61\x73\145\x5f\x6e\145\x77", ["\x64\157\x6d\x61\151\156\116\141\x6d\145" => $site->getDomainName()])); goto D8238; aa795: $databaseUserEntity->setPermissions(DatabaseUserEntity::PERMISSIONS_READ_WRITE); goto B0242; c5f8b: $databaseUserPassword = $form->get("\165\163\145\x72\120\141\x73\163\x77\157\162\x64")->getData(); goto b5997; B0539: $siteEntity->addDatabase($databaseEntity); goto Eb02d; Ea518: $session = $request->getSession(); goto E2290; b9618: $databaseManager = new DatabaseManager($activeDatabaseServerEntity); goto bdd71; Abbed: $databaseUserEntity->setPassword(Crypto::encrypt($databaseUserPassword)); goto aa795; d3cc1: $databaseEntity = $form->getData(); goto D9212; c1c9a: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\x61\x6e\x67\x65\162", $this->translator->trans("\x41\x6e\x20\x65\162\162\157\x72\x20\x68\x61\163\40\157\x63\143\x75\x72\162\x65\x64\54\x20\x65\x72\x72\x6f\162\x20\x6d\145\163\163\x61\147\x65\72\40\45\145\x72\162\x6f\162\x4d\145\x73\163\x61\147\x65\45", ["\x25\145\162\162\157\162\x4d\x65\163\163\x61\x67\x65\45" => $e->getMessage()])); } goto Cff02; D0c95: d41b7: goto C53e6; A990e: } public function deleteDatabase(Request $request) : Response { goto e4db7; E0ee6: $databaseEntity = $this->databaseEntityManager->findOneByName($databaseName); goto bbd6f; F2fc3: $response = $this->redirect($this->generateUrl("\143\x6c\160\137\x73\151\164\x65\x5f\144\x61\164\141\x62\141\x73\x65\x73", ["\x64\x6f\155\141\x69\x6e\x4e\x61\155\145" => $site->getDomainName()])); goto B9793; e4db7: $site = $this->getSite($request); goto b562d; b562d: if (!(false === is_null($site))) { goto a5421; } goto bbfff; E1549: d9341: goto f74cc; bbd6f: $siteEntity = $this->getSiteEntity($site->getDomainName()); goto E61a8; D42d2: return $response; goto c538a; E61a8: if (!(false === is_null($databaseEntity) && $site->getDomainName() == $databaseEntity->getSite()->getDomainName() && false === is_null($siteEntity))) { goto d9341; } goto C95a5; C95a5: try { goto B3ee5; Fa8a9: $domainName = $site->getDomainName(); goto b6c42; b1aaf: $session->getFlashBag()->set("\x73\x75\x63\143\x65\x73\163", $this->translator->trans("\x44\141\164\141\142\x61\x73\145\x20\150\x61\163\x20\x62\x65\x65\x6e\40\x64\x65\x6c\145\x74\x65\144\x2e")); goto b7e5b; e9ef7: $databaseManager->deleteDatabase($databaseEntity, true); goto C7f32; B3ee5: $user = $this->getUser(); goto F041f; F041f: $session = $request->getSession(); goto Fa8a9; Cb55c: $this->siteEntityManager->updateEntity($siteEntity); goto E2474; f6f98: EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_DELETE, $user, $eventData, $request); goto b1aaf; B17bd: $databaseManager = new DatabaseManager($databaseServerEntity); goto e9ef7; C7f32: $siteEntity->removeDatabase($databaseEntity); goto Cb55c; b6c42: $databaseServerEntity = $databaseEntity->getDatabaseServer(); goto B17bd; E2474: $eventData = ["\x73\x69\x74\145" => $domainName, "\x64\x61\x74\x61\142\x61\x73\145" => $databaseEntity->getName()]; goto f6f98; b7e5b: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\141\x6e\147\x65\162", $this->translator->trans("\x41\x6e\40\145\162\x72\x6f\162\x20\x68\141\x73\40\157\x63\143\x75\162\162\145\144\54\x20\145\x72\x72\157\x72\x20\x6d\145\x73\x73\141\147\145\72\40\x25\x65\x72\162\x6f\x72\x4d\145\x73\x73\x61\147\145\x25", ["\x25\145\162\x72\x6f\162\115\x65\163\x73\141\147\145\45" => $e->getMessage()])); } goto F2fc3; B9793: return $response; goto E1549; Aa47f: $response = $this->redirect($this->generateUrl("\x63\x6c\x70\x5f\163\x69\x74\x65\x73")); goto D42d2; bbfff: $databaseName = $request->get("\x64\x61\164\x61\142\x61\x73\x65\116\141\x6d\x65"); goto E0ee6; f74cc: a5421: goto Aa47f; c538a: } public function phpMyAdmin(Request $request) : Response { goto E6f2b; c7dda: $response->headers->clearCookie("\x53\x69\x67\x6e\x6f\x6e\x53\x65\163\x73\x69\x6f\x6e"); goto e0137; De442: if (false === is_null($domainName)) { goto f2ddb; } goto B0709; Fb567: $phpMyAdminUrl = sprintf("\150\164\164\160\163\72\x2f\57\x25\x73\x3a\45\163\x2f\x70\150\160\x6d\171\141\x64\x6d\151\156\x2f\x6c\157\147\x69\156\56\160\x68\x70\x3f\x68\157\x73\x74\75\x25\x73\46\160\x6f\162\x74\75\x25\163", $request->getHost(), $request->getPort(), $databaseServerHost, $databaseServerPort); goto Be84c; ea7f7: $databaseServerPort = $activeDatabaseServerEntity->getPort(); goto Fb567; e329b: de041: goto b650b; c1df3: if (!(false === is_null($databaseEntity) && $site->getDomainName() == $databaseEntity->getSite()->getDomainName())) { goto dd258; } goto facd8; b650b: c982c: goto C63bf; e0137: return $response; goto d37b1; Ac166: $response->headers->clearCookie("\143\x6c\160\x2d\160\x6d\x61"); goto fecb1; e3f59: dd258: goto e329b; bdd83: $phpMyAdminUrl = sprintf("\x68\x74\x74\x70\x73\72\57\57\45\x73\72\x25\x73\57\x70\150\160\155\x79\141\144\155\x69\156\57\154\157\x67\x69\156\56\160\x68\x70\x3f\x68\157\x73\164\75\x25\163\x26\160\157\x72\164\x3d\45\163", $request->getHost(), $request->getPort(), $databaseServerHost, $databaseServerPort); goto F4090; e481e: goto a25dc; goto Bf4b4; E6f2b: $domainName = $request->get("\144\x6f\155\x61\151\x6e\x4e\x61\155\145"); goto De442; Bf4b4: f2ddb: goto Ae01c; B0709: $activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto Bd2fb; Ae01c: $site = $this->getSite($request); goto B2cb8; a36ec: $databaseServerHost = urlencode(base64_encode($activeDatabaseServerEntity->getHost())); goto c2455; d37b1: F78c1: goto e481e; c2455: $databaseServerPort = $activeDatabaseServerEntity->getPort(); goto bdd83; cb4de: $cookie = new Cookie("\x63\x6c\160\x2d\160\x6d\x61", $encryptedData); goto d3525; Bd2fb: if (!(false === is_null($activeDatabaseServerEntity))) { goto F78c1; } goto a36ec; Ae451: $databaseUserName = $request->get("\144\141\164\141\x62\x61\163\x65\x55\x73\x65\162\116\x61\155\145"); goto e9991; Be84c: $data = ["\x68\157\163\x74" => $activeDatabaseServerEntity->getHost(), "\x75\x73\x65\162\116\x61\155\145" => $databaseUserEntity->getUserName(), "\160\141\163\x73\x77\157\162\x64" => $databaseUserEntity->getDecryptedPassword(), "\160\157\x72\x74" => $activeDatabaseServerEntity->getPort()]; goto fb634; fecb1: $response->headers->clearCookie("\x70\x68\160\x4d\x79\x41\144\x6d\151\x6e\x5f\x68\x74\164\160\x73"); goto D792d; B2cb8: if (!(false === is_null($site))) { goto c982c; } goto Ae451; D792d: $response->headers->clearCookie("\x70\155\x61\101\x75\164\150\x2d\61\137\150\x74\164\x70\x73"); goto c7dda; facd8: $databaseServerHost = urlencode(base64_encode($activeDatabaseServerEntity->getHost())); goto ea7f7; F4090: $response = new RedirectResponse($phpMyAdminUrl); goto Ac166; B47b6: $encryptedData = trim(base64_encode($encryptedData)); goto cb4de; Dfdca: $activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto a006c; B7fc9: $encryptedData = Crypto::encrypt($data); goto B47b6; fb634: $data = serialize($data); goto B7fc9; a006c: if (!(false === is_null($activeDatabaseServerEntity) && false === is_null($activeDatabaseServerEntity))) { goto de041; } goto Bb16c; Cf39b: return $response; goto bf62a; d3525: $response = new RedirectResponse($phpMyAdminUrl); goto c5969; ae7cb: return $response; goto e3f59; c5969: $response->headers->setCookie($cookie); goto ae7cb; e9991: $databaseUserEntity = $this->databaseUserEntityManager->findOneByUserName($databaseUserName); goto Dfdca; b1a9c: $response = $this->redirect($this->generateUrl("\143\x6c\160\x5f\x73\x69\164\x65\x73")); goto Cf39b; C63bf: a25dc: goto b1a9c; Bb16c: $databaseEntity = $databaseUserEntity->getDatabase(); goto c1df3; bf62a: } public function phpMyAdminLogout(Request $request) { goto Da4fc; Da4fc: $response = $this->redirect($this->generateUrl("\143\x6c\x70\x5f\163\x69\164\x65\163")); goto B02a5; B02a5: $response->headers->clearCookie("\143\154\x70\55\x70\155\x61"); goto a32f0; Fe8b1: return $response; goto ecf9f; a32f0: $response->headers->clearCookie("\160\x68\x70\x4d\171\x41\144\155\151\156\137\150\x74\164\x70\x73"); goto Bb924; c5902: $response->headers->clearCookie("\123\x69\x67\156\x6f\x6e\123\x65\x73\x73\x69\x6f\156"); goto Fe8b1; Bb924: $response->headers->clearCookie("\160\155\141\x41\165\x74\150\x2d\61\137\x68\164\164\160\x73"); goto c5902; ecf9f: } public function newDatabaseUser(Request $request) : Response { goto B5427; e0ea7: da654: goto Aed7b; e3481: $databaseUserEntity->setSite($siteEntity); goto B5eae; e4633: if (!(false === is_null($response))) { goto D0598; } goto f495f; B5eae: $form = $this->createDatabaseUserForm($site, $databaseUserEntity); goto C5485; c3dc2: df993: goto df5dc; F3a13: $session = $request->getSession(); goto d82e2; df5dc: $databaseUserEntity = $this->databaseUserEntityManager->createEntity(); goto e3481; f4819: $domainName = $site->getDomainName(); goto A69da; efcbe: goto da654; goto b0ab9; Bc54f: D0598: goto a00ec; a95fc: goto ad447; goto c3dc2; Ba613: $response = $this->redirect($this->generateUrl("\x63\154\x70\137\163\151\x74\x65\137\x64\x61\x74\141\x62\141\x73\x65\163", ["\144\x6f\x6d\x61\151\x6e\116\141\x6d\x65" => $site->getDomainName()])); goto a95fc; Aed7b: return $response; goto B2e59; A1d7a: $response = $this->handleDatabaseUserForm($request, $form, $site); goto e4633; B5427: $site = $this->getSite($request); goto fc12d; D53b4: $response = $this->render("\106\x72\157\x6e\164\x65\156\x64\57\x53\x69\164\x65\57\156\x65\167\x2d\144\141\164\141\x62\141\x73\x65\55\165\163\x65\x72\x2e\150\x74\x6d\x6c\56\x74\x77\151\x67", ["\x73\151\164\145" => $site, "\144\x61\x74\x61\x62\x61\163\x65\125\163\x65\162" => $databaseUserEntity, "\144\x61\x74\x61\142\x61\163\145\x73" => $databases, "\x66\157\x72\155" => $form->createView(), "\146\157\162\155\105\162\162\x6f\x72\x73" => $this->formErrors]); goto Ef068; a00ec: d1d1e: goto a644f; Ef068: ad447: goto e0ea7; D85dc: $response = $this->redirect($this->generateUrl("\x63\154\x70\137\x73\x69\x74\145\x73")); goto efcbe; f495f: return $response; goto Bc54f; dc417: if (!(true === $form->isSubmitted())) { goto d1d1e; } goto A1d7a; a0cc4: $form->handleRequest($request); goto dc417; fc12d: if (false === is_null($site)) { goto f6737; } goto D85dc; A69da: $siteEntity = $this->getSiteEntity($domainName); goto e0c20; e0c20: if (count($databases) && false === is_null($siteEntity)) { goto df993; } goto F3a13; a644f: a7367: goto D53b4; d82e2: $session->getFlashBag()->set("\144\x61\x6e\147\x65\x72", $this->translator->trans("\116\x6f\40\x64\x61\164\x61\x62\141\x73\145\x20\146\157\165\x6e\144\x3b\x20\143\162\x65\141\x74\x65\x20\141\40\144\141\164\x61\142\x61\163\145\40\x66\x69\x72\x73\164\56")); goto Ba613; b0ab9: f6737: goto Aa6e0; C5485: if (!(true === $request->isMethod("\x50\117\x53\x54"))) { goto a7367; } goto a0cc4; Aa6e0: $databases = $site->getDatabases(); goto f4819; B2e59: } private function createDatabaseUserForm(Site $site, DatabaseUserEntity $databaseUserEntity) : Form { goto B5a52; De8db: $form->add("\x73\165\142\x6d\151\164", SubmitType::class, ["\x61\164\x74\162" => ["\x63\x6c\x61\x73\163" => "\142\164\156\x20\142\164\x6e\55\x62\154\165\145\x20\x62\164\156\55\154\147"], "\x6c\x61\x62\x65\x6c" => "\x41\x64\144\40\x44\x61\x74\x61\x62\141\x73\145\40\x55\x73\145\x72"]); goto C741b; C741b: return $form; goto ddc65; B5a52: $form = $this->createForm("\x41\160\x70\x5c\106\157\162\155\x5c\123\151\164\145\x44\141\164\x61\142\141\x73\x65\x55\163\x65\162\124\x79\160\145", $databaseUserEntity, ["\141\143\x74\x69\x6f\x6e" => $this->generateUrl("\x63\154\160\x5f\x73\x69\164\145\x5f\144\141\164\x61\x62\141\x73\x65\x5f\165\163\x65\162\137\156\145\x77", ["\144\x6f\155\x61\x69\x6e\x4e\141\x6d\145" => $site->getDomainName()]), "\x6d\145\x74\x68\x6f\144" => "\x50\117\x53\x54", "\x61\164\x74\x72" => []]); goto De8db; ddc65: } private function handleDatabaseUserForm(Request $request, Form $form, Site $site) { goto e02bf; f078f: goto c113e; goto A74e3; A74e3: f0dfb: goto c1e51; a2287: c113e: goto dbca0; c1e51: try { goto Eff11; fc56c: $session->getFlashBag()->set("\x73\x75\x63\x63\145\x73\x73", $this->translator->trans("\x44\x61\x74\x61\x62\141\163\x65\40\125\163\145\x72\x20\x68\x61\163\x20\142\x65\145\156\40\141\144\x64\x65\x64\x2e")); goto E3682; Ee8f1: $encryptedPassword = Crypto::encrypt($databaseUserEntity->getPassword()); goto ecce6; da66e: return $response; goto Ff77c; E3682: $response = $this->redirect($this->generateUrl("\x63\154\x70\x5f\163\151\164\145\x5f\144\x61\164\141\x62\x61\163\145\163", ["\x64\x6f\155\141\151\x6e\x4e\141\x6d\x65" => $site->getDomainName()])); goto cc0b2; f8c79: $response = $this->redirect($this->generateUrl("\143\x6c\x70\x5f\x73\151\x74\145\137\x64\x61\164\141\x62\x61\163\x65\137\x75\x73\x65\x72\x5f\156\x65\167", ["\144\x6f\155\141\151\x6e\116\141\x6d\145" => $site->getDomainName()])); goto Fe989; E68b1: $databaseManager = new DatabaseManager($activeDatabaseServerEntity); goto a3d62; cc0b2: E9158: goto da66e; Eff11: $user = $this->getUser(); goto B74f7; e7d48: EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_USER_ADD, $user, $eventData, $request); goto fc56c; a3d62: $databaseManager->createUser($databaseUserEntity); goto D1a9d; B5b46: $domainName = $site->getDomainName(); goto bc26d; ef3af: Eb025: goto F2b08; d959b: $activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto E68b1; a314b: $databaseEntity = $databaseUserEntity->getDatabase(); goto a88d2; ecce6: $databaseUserEntity->setPassword($encryptedPassword); goto d959b; B74f7: $session = $request->getSession(); goto B5b46; F2b08: $databaseUserEntity = $form->getData(); goto Ee8f1; D1a9d: $this->databaseUserEntityManager->updateEntity($databaseUserEntity); goto a314b; Fe989: goto E9158; goto ef3af; bc26d: $siteEntity = $this->getSiteEntity($domainName); goto c8647; a61a5: $eventData = ["\x73\151\164\x65" => $domainName, "\144\x61\x74\141\x62\x61\163\145\x55\x73\x65\x72\116\x61\x6d\145" => $databaseUserEntity->getUserName(), "\160\x65\x72\x6d\x69\x73\x73\151\x6f\156\x73" => $databaseUserEntity->getPermissions(), "\144\x61\164\141\142\x61\163\145" => $databaseName]; goto e7d48; c8647: if (false === is_null($siteEntity)) { goto Eb025; } goto f8c79; a88d2: $databaseName = $databaseEntity->getName(); goto a61a5; Ff77c: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\141\156\147\x65\162", $this->translator->trans("\101\156\x20\x65\x72\x72\x6f\x72\40\150\141\x73\x20\x6f\x63\x63\165\162\162\x65\x64\54\x20\145\x72\x72\x6f\162\x20\x6d\145\163\163\x61\x67\x65\72\x20\x25\x65\162\162\x6f\162\115\145\163\x73\x61\x67\x65\45", ["\x25\x65\162\x72\157\162\115\145\x73\163\141\147\145\x25" => $e->getMessage()])); } goto a2287; e02bf: if (true === $form->isValid()) { goto f0dfb; } goto e1c53; e1c53: $this->formErrors = $this->getErrorMessages($form); goto f078f; dbca0: } public function editDatabaseUser(Request $request) : Response { goto F8482; c11bd: $response = $this->handleDatabaseUserEditForm($request, $form, $site); goto c7da5; F8482: $site = $this->getSite($request); goto c76ce; b7206: $response = $this->redirect($this->generateUrl("\143\154\160\x5f\x73\x69\164\145\x5f\x64\141\164\x61\142\141\163\x65\x73", ["\144\x6f\155\x61\151\156\116\x61\155\145" => $site->getDomainName()])); goto B97b9; d6867: $session->getFlashBag()->set("\144\x61\156\x67\x65\x72", $this->translator->trans("\x4e\157\x20\x64\x61\x74\141\142\141\163\x65\40\146\x6f\x75\156\144\73\x20\143\162\x65\141\164\145\40\141\x20\x64\x61\x74\141\x62\141\163\145\x20\x66\x69\162\x73\x74\x2e")); goto b7206; D7dea: ed9dc: goto F8642; ffe5c: a5cc9: goto Fce74; cb2ae: ac53d: goto af75e; A6026: E6734: goto c346a; cec98: $response = $this->render("\106\x72\x6f\x6e\164\x65\x6e\144\57\x53\x69\x74\x65\x2f\x65\x64\151\x74\55\x64\x61\x74\141\142\x61\x73\145\x2d\165\x73\x65\162\x2e\150\164\155\x6c\56\164\167\x69\x67", ["\x73\151\164\x65" => $site, "\144\x61\x74\x61\142\141\163\145\x55\x73\145\x72" => $databaseUserEntity, "\x66\x6f\162\155" => $form->createView(), "\x66\x6f\162\x6d\105\162\162\157\162\163" => $this->formErrors]); goto A39e4; A4532: return $response; goto e6447; B97b9: goto dc79b; goto A6026; af75e: return $response; goto d223b; fc7bf: if (!(false === is_null($databaseUserEntity))) { goto a8ac2; } goto bb927; c76ce: if (false === is_null($site)) { goto ed9dc; } goto Bddcd; bb927: $databaseUserEntity->setPassword(''); goto D4ed7; Fce74: e1c97: goto cec98; F8642: $databases = $site->getDatabases(); goto e0f70; e1c32: dc79b: goto cb2ae; e6447: aacf3: goto ffe5c; c5ce0: $databaseUserEntity = $this->databaseUserEntityManager->findOneByUserName($databaseUserName); goto fc7bf; Dd0d4: $siteEntity = $this->getSiteEntity($domainName); goto b1c1b; Bddcd: $response = $this->redirect($this->generateUrl("\x63\x6c\160\137\x73\x69\164\x65\x73")); goto ed167; A39e4: a8ac2: goto e1c32; c7da5: if (!(false === is_null($response))) { goto aacf3; } goto A4532; e0972: $session = $request->getSession(); goto d6867; ed167: goto ac53d; goto D7dea; b1c1b: if (count($databases) && false === is_null($siteEntity)) { goto E6734; } goto e0972; A1882: if (!(true === $form->isSubmitted())) { goto a5cc9; } goto c11bd; e0f70: $domainName = $site->getDomainName(); goto Dd0d4; D4ed7: $form = $this->createDatabaseUserEditForm($site, $databaseUserEntity); goto D60bc; D60bc: if (!(true === $request->isMethod("\x50\117\123\124"))) { goto e1c97; } goto ae0c1; c346a: $databaseUserName = $request->get("\144\141\x74\x61\142\141\x73\x65\125\163\x65\x72\116\x61\155\145"); goto c5ce0; ae0c1: $form->handleRequest($request); goto A1882; d223b: } private function createDatabaseUserEditForm(Site $site, DatabaseUserEntity $databaseUserEntity) : Form { goto C24a8; C24a8: $form = $this->createForm("\x41\160\160\134\x46\157\x72\x6d\x5c\x53\151\x74\145\x44\141\x74\141\142\x61\x73\145\125\x73\x65\x72\105\144\151\164\124\171\160\x65", $databaseUserEntity, ["\141\x63\x74\x69\157\x6e" => $this->generateUrl("\x63\154\x70\137\163\x69\164\145\x5f\144\141\164\x61\142\141\x73\145\137\165\163\x65\162\x5f\x65\144\151\164", ["\144\157\x6d\x61\151\x6e\116\141\155\145" => $site->getDomainName(), "\144\x61\x74\141\142\x61\163\x65\125\x73\145\162\x4e\x61\155\145" => $databaseUserEntity->getUserName()]), "\155\145\164\x68\157\x64" => "\x50\x4f\123\124", "\141\x74\164\162" => []]); goto Fe153; Fe153: $form->add("\x73\165\x62\x6d\151\164", SubmitType::class, ["\141\164\x74\x72" => ["\x63\154\x61\x73\163" => "\142\x74\x6e\x20\142\164\x6e\x2d\142\154\x75\145\x20\142\164\x6e\x2d\154\x67"], "\154\141\x62\145\x6c" => "\123\x61\x76\x65"]); goto Ae49c; Ae49c: return $form; goto C594b; C594b: } private function handleDatabaseUserEditForm(Request $request, Form $form, Site $site) { goto B7bd3; Ed8d1: try { goto c549e; cde7b: goto F3282; goto b2cbf; E81bb: $encryptedPassword = Crypto::encrypt($databaseUserEntity->getPassword()); goto e2370; f8e8f: $this->databaseUserEntityManager->updateEntity($databaseUserEntity); goto C8666; e7565: $databaseManager->createUser($databaseUserEntity); goto f8e8f; ee595: $response = $this->redirect($this->generateUrl("\143\154\160\x5f\163\x69\164\145\x5f\144\x61\164\141\x62\141\x73\x65\137\165\163\145\162\137\x6e\145\x77", ["\x64\x6f\155\x61\x69\156\x4e\141\x6d\x65" => $site->getDomainName()])); goto cde7b; Bfe63: $databaseUserEntity = $form->getData(); goto E81bb; b2cbf: C69e2: goto Bfe63; e2370: $databaseUserEntity->setPassword($encryptedPassword); goto D2aca; f55b9: if (false === is_null($siteEntity)) { goto C69e2; } goto ee595; B2374: $eventData = ["\163\151\164\x65" => $domainName, "\x64\141\164\x61\x62\141\163\x65\x55\163\x65\162\116\x61\x6d\145" => $databaseUserEntity->getUserName(), "\x70\x65\162\155\151\x73\163\151\157\x6e\x73" => $databaseUserEntity->getPermissions(), "\x64\141\164\141\142\x61\x73\x65" => $databaseName]; goto d1a01; c549e: $user = $this->getUser(); goto Bb164; d222d: $session->getFlashBag()->set("\163\x75\x63\x63\145\x73\x73", $this->translator->trans("\x44\x61\x74\x61\142\141\x73\x65\40\x55\163\x65\x72\40\150\x61\163\40\142\x65\x65\x6e\40\x75\160\x64\x61\164\x65\144\x2e")); goto Fe903; f3653: $domainName = $site->getDomainName(); goto C5776; Bb164: $session = $request->getSession(); goto f3653; D2aca: $activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto Ebf8e; C5776: $siteEntity = $this->getSiteEntity($domainName); goto f55b9; d1a01: EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_USER_EDIT, $user, $eventData, $request); goto d222d; Ebf8e: $databaseManager = new DatabaseManager($activeDatabaseServerEntity); goto e7565; d84c9: F3282: goto D3714; C8666: $databaseEntity = $databaseUserEntity->getDatabase(); goto B369a; D3714: return $response; goto f3ce0; B369a: $databaseName = $databaseEntity->getName(); goto B2374; Fe903: $response = $this->redirect($this->generateUrl("\x63\x6c\160\137\163\151\x74\x65\137\144\141\x74\x61\142\x61\163\x65\163", ["\144\157\155\x61\x69\156\116\x61\155\145" => $site->getDomainName()])); goto d84c9; f3ce0: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\141\156\147\145\162", $this->translator->trans("\x41\156\40\x65\x72\162\x6f\162\x20\x68\141\163\x20\x6f\143\143\165\162\x72\x65\x64\54\x20\145\162\x72\x6f\x72\x20\155\x65\x73\x73\141\x67\145\72\x20\45\x65\162\162\x6f\162\x4d\x65\x73\163\141\147\x65\45", ["\x25\x65\x72\162\x6f\x72\115\145\163\163\141\147\x65\x25" => $e->getMessage()])); } goto Dab77; C91db: goto F2d08; goto d86f2; d86f2: C1216: goto Ed8d1; bad62: $this->formErrors = $this->getErrorMessages($form); goto C91db; Dab77: F2d08: goto eae87; B7bd3: if (true === $form->isValid()) { goto C1216; } goto bad62; eae87: } public function deleteDatabaseUser(Request $request) : Response { goto c8fb1; E2171: return $response; goto c0bbd; d927f: $response = $this->redirect($this->generateUrl("\143\x6c\x70\137\x73\151\x74\x65\163")); goto E2171; d355d: if (!(false === is_null($databaseUserEntity))) { goto bc696; } goto B4154; C6bde: $response = $this->redirect($this->generateUrl("\143\154\x70\137\163\x69\164\x65\x5f\x64\x61\x74\x61\x62\141\163\145\x73", ["\x64\157\x6d\141\x69\x6e\x4e\141\155\145" => $site->getDomainName()])); goto c0130; B4154: try { goto Fc3ef; Ef225: $session = $request->getSession(); goto F9b5a; Ad0e8: EventQueue::addEvent(EventQueue::EVENT_SITE_DATABASE_USER_DELETE, $user, $eventData, $request); goto e951d; F8397: if (!(false === is_null($databaseEntity) && $site->getDomainName() == $databaseEntity->getSite()->getDomainName())) { goto F3187; } goto c0ea8; a13ad: $databaseManager->deleteUser($databaseUserEntity); goto d91e8; e951d: F3187: goto abe99; ca006: $databaseManager = new DatabaseManager($activeDatabaseServerEntity); goto a13ad; Bd171: $eventData = ["\x73\151\x74\x65" => $domainName, "\x64\x61\164\141\x62\141\163\x65\x55\x73\x65\x72\x4e\x61\x6d\x65" => $databaseUserName]; goto Ad0e8; ad9c9: $domainName = $site->getDomainName(); goto Ef225; Fc3ef: $databaseEntity = $databaseUserEntity->getDatabase(); goto F8397; d91e8: $this->databaseUserEntityManager->deleteEntity($databaseUserEntity); goto e0ed3; c0ea8: $user = $this->getUser(); goto ad9c9; e0ed3: $session->getFlashBag()->set("\x73\x75\x63\x63\145\x73\x73", $this->translator->trans("\x44\x61\x74\x61\x62\x61\x73\145\40\125\x73\145\x72\x20\150\141\163\x20\142\x65\x65\x6e\x20\x64\x65\x6c\x65\x74\x65\x64\x2e")); goto Bd171; F9b5a: $activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto ca006; abe99: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\141\156\147\x65\162", $this->translator->trans("\101\156\40\145\162\x72\157\162\x20\x68\x61\x73\40\157\x63\x63\165\162\x72\145\144\x2c\x20\x65\162\162\157\162\x20\155\x65\163\x73\141\x67\145\x3a\40\x25\x65\162\x72\x6f\162\115\145\163\163\x61\x67\x65\45", ["\x25\x65\162\162\x6f\x72\115\x65\x73\163\141\x67\145\x25" => $e->getMessage()])); } goto C6bde; D0d8b: bc696: goto f6301; cbdbc: if (!(false === is_null($site))) { goto D6312; } goto A4ec9; c391f: $databaseUserEntity = $this->databaseUserEntityManager->findOneByUserName($databaseUserName); goto d355d; f6301: D6312: goto d927f; c0130: return $response; goto D0d8b; c8fb1: $site = $this->getSite($request); goto cbdbc; A4ec9: $databaseUserName = $request->get("\144\141\x74\x61\x62\141\x73\x65\125\x73\145\162\x4e\141\x6d\145"); goto c391f; c0bbd: } public function varnishCache(Request $request) : Response { goto a1f87; D1e09: if (!(true === $request->isMethod("\120\117\123\x54"))) { goto cddd7; } goto c987f; E836c: if (!(true === $purgeCacheForm->isSubmitted())) { goto e4148; } goto F8f98; d6b0b: $settingsForm = $this->createVarnishCacheSettingsForm($site, $varnishCacheSettingsData); goto f36a1; C2dcb: cddd7: goto ac3f3; aede4: $response = $this->redirect($this->generateUrl("\143\x6c\x70\137\163\151\164\x65\x73")); goto C020a; c987f: $settingsForm->handleRequest($request); goto a9704; a1f94: $varnishCacheSettings = $site->getVarnishCacheSettings(); goto fe218; F8f98: $response = $this->handleVarnishCachePurgeCacheForm($request, $purgeCacheForm, $site); goto A9fde; E54e5: return $response; goto dfb81; C020a: goto b8162; goto ac5b4; ac5b4: c63ea: goto a1f94; b311e: if (!(true === $settingsForm->isSubmitted())) { goto C01eb; } goto Cd2ae; Cd2ae: $response = $this->handleVarnishCacheSettingsForm($request, $settingsForm, $site); goto f186e; a1f87: $site = $this->getSite($request); goto b058f; E4221: return $response; goto F2743; ad98c: C01eb: goto E836c; dfb81: E1e2a: goto ec2ff; A9fde: if (!(false === is_null($response))) { goto E1e2a; } goto E54e5; b058f: if (false === is_null($site) && true === $site->getVarnishCache()) { goto c63ea; } goto aede4; f36a1: $purgeCacheForm = $this->createVarnishCachePurgeCacheForm($site); goto D1e09; fe218: $varnishCacheSettingsData = ["\151\163\105\x6e\141\142\x6c\x65\x64" => true === isset($varnishCacheSettings["\145\156\x61\x62\x6c\145\x64"]) && true === $varnishCacheSettings["\145\156\141\142\154\145\144"] ? true : false, "\x73\145\162\x76\x65\162" => true === isset($varnishCacheSettings["\x73\x65\162\166\145\162"]) ? $varnishCacheSettings["\x73\x65\162\166\145\162"] : "\x31\62\x37\x2e\60\x2e\x30\x2e\x31\x3a\66\x30\x38\x31", "\x63\141\x63\x68\x65\x54\x61\147\x50\162\145\146\151\170" => true === isset($varnishCacheSettings["\143\x61\143\150\145\x54\x61\147\120\162\145\146\151\x78"]) ? $varnishCacheSettings["\x63\141\x63\150\x65\x54\141\x67\120\162\145\x66\x69\170"] : substr(md5(time()), 0, 4), "\x63\x61\143\150\x65\x4c\151\146\x65\164\151\x6d\145" => true === isset($varnishCacheSettings["\143\141\143\150\145\114\151\x66\145\x74\x69\155\x65"]) ? $varnishCacheSettings["\143\141\x63\150\x65\114\x69\146\145\x74\x69\x6d\145"] : "\66\x30\x34\70\x30\60", "\145\170\143\154\x75\x64\145\144\x50\x61\x72\x61\x6d\163" => true === isset($varnishCacheSettings["\145\170\x63\x6c\x75\x64\x65\x64\x50\141\x72\x61\x6d\x73"]) ? implode("\x2c", $varnishCacheSettings["\x65\170\x63\154\165\x64\x65\x64\120\141\162\141\155\163"]) : "\x5f\x5f\x53\111\104\x2c\x6e\x6f\103\x61\143\x68\x65\54", "\145\x78\x63\154\165\x64\145\163" => true === isset($varnishCacheSettings["\145\170\x63\x6c\165\144\145\163"]) ? implode(PHP_EOL, $varnishCacheSettings["\145\x78\x63\x6c\165\144\145\x73"]) : '']; goto d6b0b; Cd1f8: return $response; goto e251a; a9704: $purgeCacheForm->handleRequest($request); goto b311e; ec2ff: e4148: goto C2dcb; F2743: b4b34: goto ad98c; f186e: if (!(false === is_null($response))) { goto b4b34; } goto E4221; E2de5: b8162: goto Cd1f8; ac3f3: $response = $this->render("\106\x72\157\x6e\164\x65\x6e\x64\x2f\x53\151\x74\145\57\x76\x61\162\x6e\151\x73\x68\55\x63\x61\x63\x68\x65\56\x68\164\x6d\x6c\56\x74\167\151\147", ["\x73\151\x74\145" => $site, "\163\145\164\164\x69\156\147\163\106\x6f\162\155" => $settingsForm->createView(), "\160\165\x72\x67\145\103\x61\x63\150\x65\x46\x6f\162\155" => $purgeCacheForm->createView(), "\146\x6f\x72\x6d\105\x72\162\157\x72\163" => $this->formErrors]); goto E2de5; e251a: } private function createVarnishCacheSettingsForm(Site $site, array $data) : Form { goto E2f9b; E2f9b: $form = $this->createForm("\x41\x70\x70\x5c\106\x6f\162\155\x5c\123\151\x74\145\x56\x61\x72\x6e\x69\163\x68\103\x61\143\x68\x65\x53\145\164\164\x69\x6e\x67\163\124\x79\x70\145", $data, ["\141\x63\164\151\x6f\156" => $this->generateUrl("\143\x6c\160\137\163\151\164\x65\137\166\x61\162\156\151\163\x68\137\143\x61\x63\150\145", ["\x64\x6f\x6d\x61\151\156\x4e\x61\x6d\x65" => $site->getDomainName()]), "\x6d\145\x74\x68\157\144" => "\x50\117\123\124", "\141\x74\164\162" => []]); goto Bd9a4; Bd9a4: $form->add("\x73\x75\142\x6d\151\x74", SubmitType::class, ["\x61\164\x74\162" => ["\143\x6c\141\163\163" => "\x62\x74\156\x20\142\164\x6e\x2d\x62\154\165\145\40\142\x74\156\x2d\x6c\147"], "\154\x61\142\x65\154" => "\123\141\x76\145"]); goto Fe3bc; Fe3bc: return $form; goto B57ee; B57ee: } private function createVarnishCachePurgeCacheForm(Site $site) : Form { goto C21e2; C21e2: $form = $this->createForm("\x41\x70\x70\x5c\106\157\x72\x6d\x5c\x53\151\164\x65\x56\141\x72\156\x69\163\150\103\141\x63\150\145\x50\165\x72\x67\x65\103\x61\143\x68\x65\x54\171\160\x65", ["\x73\x69\164\145" => $site], ["\x61\x63\x74\x69\157\x6e" => $this->generateUrl("\x63\154\160\137\163\x69\x74\x65\x5f\x76\141\x72\156\151\x73\x68\137\x63\x61\x63\150\x65", ["\144\x6f\155\x61\151\156\x4e\141\x6d\145" => $site->getDomainName()]), "\x6d\x65\164\150\157\x64" => "\120\117\x53\x54", "\141\164\164\162" => []]); goto dc7d6; dc7d6: $form->add("\x73\165\x62\155\x69\164", SubmitType::class, ["\x61\x74\x74\162" => ["\x63\154\141\163\163" => "\x62\x74\x6e\x20\x62\x74\156\55\x62\154\165\x65\40\x62\x74\156\55\x6c\x67"], "\x6c\x61\x62\x65\154" => "\x50\x75\x72\147\145\x20\x43\141\x63\x68\145"]); goto F9c8f; F9c8f: return $form; goto c328b; c328b: } private function handleVarnishCacheSettingsForm(Request $request, Form $form, Site $site) { goto A1f9b; e742c: goto Bd62e; goto edb06; F0abd: Bd62e: goto e20f7; A8291: try { goto c29b5; B4b71: if (false === is_null($siteEntity)) { goto b1165; } goto bf4d1; c29b5: $session = $request->getSession(); goto B4135; fab6c: goto C34fa; goto Ee8d6; Fc22a: $user = $this->getUser(); goto C0889; fd704: $siteEntity = $this->getSiteEntity($domainName); goto B4b71; C94b5: $siteUpdater->writeVarnishCacheSettingsFile($varnishCacheSettings); goto A91cd; C0889: $isEnabled = $form->get("\x69\163\x45\156\x61\x62\154\x65\144")->getData(); goto B2f27; Eb483: $excludes = array_map("\x74\162\151\x6d", array_filter(explode(PHP_EOL, trim($form->get("\145\x78\x63\154\x75\144\x65\x73")->getData())))); goto f5ae4; f5ae4: $varnishCacheSettings = ["\145\x6e\x61\142\x6c\x65\x64" => $isEnabled, "\163\x65\x72\166\x65\162" => $server, "\x63\x61\143\x68\145\x54\141\x67\x50\x72\145\146\x69\170" => $cacheTagPrefix, "\x63\x61\143\150\x65\x4c\x69\x66\145\x74\151\x6d\145" => $cacheLifetime, "\145\170\143\154\165\x64\x65\x73" => $excludes, "\x65\x78\x63\154\x75\x64\x65\x64\x50\141\x72\141\x6d\163" => $excludedParams]; goto a7dbd; B4135: $domainName = $site->getDomainName(); goto fd704; Dfb3e: $response = $this->redirect($this->generateUrl("\x63\x6c\x70\137\163\x69\x74\x65\x5f\x76\x61\162\156\151\x73\x68\x5f\143\141\x63\150\145", ["\x64\x6f\155\x61\151\x6e\x4e\x61\x6d\x65" => $site->getDomainName()])); goto a9a21; ef517: $excludedParams = array_map("\164\x72\151\155", array_filter(explode("\x2c", trim($form->get("\145\170\x63\154\165\x64\145\144\x50\x61\162\x61\155\x73")->getData())))); goto Eb483; B2f27: $server = $form->get("\x73\145\162\x76\145\x72")->getData(); goto c62b1; a46ce: $session->getFlashBag()->set("\163\x75\x63\x63\x65\x73\x73", $this->translator->trans("\x56\141\x72\x6e\151\163\x68\40\x43\141\x63\x68\x65\40\123\x65\164\x74\x69\156\147\163\x20\x68\141\x76\x65\x20\x62\x65\x65\156\x20\163\x61\166\x65\144\56")); goto Dfb3e; cc144: return $response; goto F4538; B9c87: EventQueue::addEvent(EventQueue::EVENT_SITE_VARNISH_CACHE_SETTINGS_UPDATE, $user, $eventData, $request); goto a46ce; f9801: $eventData = ["\x73\151\164\x65" => $domainName, "\x76\141\x72\x6e\x69\x73\x68\x43\141\143\x68\145\x45\156\141\x62\x6c\x65\144" => $isEnabled, "\x73\x65\x72\x76\145\x72" => $server, "\143\x61\143\x68\145\x54\x61\x67\x50\x72\145\146\x69\x78" => $cacheTagPrefix, "\143\141\143\150\x65\x4c\x69\146\x65\x74\x69\x6d\145" => $cacheLifetime, "\x65\170\143\154\x75\144\x65\x73" => $excludes, "\x65\x78\143\x6c\165\x64\145\x64\x50\141\162\141\155\163" => $excludedParams]; goto B9c87; c62b1: $cacheLifetime = $form->get("\143\141\x63\150\145\x4c\151\x66\x65\164\151\155\x65")->getData(); goto D48be; a7dbd: $site->setVarnishCacheSettings($varnishCacheSettings); goto f0c6b; f0c6b: $siteUpdater = $this->getSiteUpdater($site); goto C94b5; D48be: $cacheTagPrefix = $form->get("\x63\141\x63\x68\x65\x54\141\x67\x50\x72\145\146\151\x78")->getData(); goto ef517; a9a21: C34fa: goto cc144; bf4d1: $response = $this->redirect($this->generateUrl("\x63\x6c\x70\x5f\x73\151\164\x65\x73")); goto fab6c; A91cd: $siteUpdater->phpSettings(); goto f9801; Ee8d6: b1165: goto Fc22a; F4538: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\141\x6e\147\x65\162", $this->translator->trans("\101\x6e\x20\x65\162\x72\157\x72\40\150\141\x73\40\x6f\x63\143\x75\x72\162\x65\144\54\40\145\x72\x72\x6f\162\40\155\x65\x73\163\141\147\x65\x3a\40\x25\x65\x72\x72\x6f\x72\x4d\145\x73\163\141\147\145\45", ["\x25\x65\x72\x72\157\162\x4d\x65\163\x73\141\x67\145\45" => $e->getMessage()])); } goto F0abd; A1f9b: if (true === $form->isValid()) { goto B6faa; } goto Af90d; edb06: B6faa: goto A8291; Af90d: $this->formErrors = $this->getErrorMessages($form); goto e742c; e20f7: } private function handleVarnishCachePurgeCacheForm(Request $request, Form $form, Site $site) { goto c0ff8; aa06b: $this->formErrors = $this->getErrorMessages($form); goto F85da; E72d1: try { goto ea316; d8fd8: $varnishCacheSettings = $site->getVarnishCacheSettings(); goto fd56f; b6c0d: EventQueue::addEvent(EventQueue::EVENT_SITE_VARNISH_CACHE_PURGE, $user, $eventData, $request); goto Fc26c; bc7ab: if (false === is_null($siteEntity)) { goto E769d; } goto dd25a; ecbbc: foreach ($purgeValues as $purgeValue) { goto C0326; da7ee: Cd1a5: goto cae8c; Ad80d: $varnishCacheClient->purgeTag($purgeValue); goto Af11d; E293c: Ad737: goto Dd528; a1ada: if (true === str_starts_with($purgeValue, "\x68\164\164\x70")) { goto A192b; } goto Ad80d; F7417: A192b: goto a150a; Af11d: goto Ad737; goto F7417; C0326: $purgeValue = trim($purgeValue); goto f5754; a150a: $varnishCacheClient->purgeUrl($purgeValue); goto E293c; f5754: if (!(false === empty($purgeValue))) { goto d2b7e; } goto a1ada; Dd528: d2b7e: goto da7ee; cae8c: } goto Cfd03; A5930: $user = $this->getUser(); goto d8fd8; dd25a: $response = $this->redirect($this->generateUrl("\143\154\160\x5f\x73\x69\164\x65\x73")); goto D6609; ea316: $session = $request->getSession(); goto bb9b7; Cfd03: ad878: goto fcd70; a89e4: $eventData = ["\163\x69\x74\x65" => $domainName, "\166\141\154\165\145\163" => implode("\54", $purgeValues)]; goto b6c0d; B32ac: $siteEntity = $this->getSiteEntity($domainName); goto bc7ab; e1abb: if (false === empty($purgeValues) && true === isset($varnishCacheSettings["\163\145\162\x76\x65\162"]) && false === empty($varnishCacheSettings["\163\x65\162\166\x65\x72"])) { goto D0ae2; } goto B1d9b; Abfb2: E769d: goto A5930; Cf8cb: D0ae2: goto ffacf; D6609: goto bcc02; goto Abfb2; fd56f: $purgeValues = array_map("\164\162\151\155", array_filter(explode("\x2c", trim($form->get("\166\141\154\x75\145")->getData())))); goto e1abb; fcd70: Fc43d: goto a89e4; B1d9b: throw new \Exception("\126\141\162\x6e\x69\x73\x68\x20\x43\x61\143\x68\145\40\x53\x65\164\164\x69\x6e\x67\x73\x20\143\x61\156\156\157\164\40\x62\x65\40\145\x6d\x70\164\171\56"); goto Df493; bb9b7: $domainName = $site->getDomainName(); goto B32ac; E4e23: $response = $this->redirect($this->generateUrl("\143\x6c\x70\137\x73\x69\164\x65\x5f\166\141\x72\x6e\151\x73\x68\137\x63\141\143\150\x65", ["\x64\157\x6d\x61\151\156\116\141\x6d\145" => $site->getDomainName()])); goto Dec82; Df493: goto Fc43d; goto Cf8cb; ffacf: $varnishCacheClient = new VarnishCacheClient(); goto bdc6f; bdc6f: $varnishCacheClient->setServer($varnishCacheSettings["\x73\x65\x72\166\x65\x72"]); goto ecbbc; c1d4f: return $response; goto Dedcd; Fc26c: $session->getFlashBag()->set("\x73\x75\x63\143\145\x73\163", $this->translator->trans("\126\x61\162\x6e\151\x73\x68\40\x43\x61\x63\x68\145\x20\150\x61\x73\40\x62\x65\145\x6e\40\x70\165\162\x67\145\144\x2e")); goto E4e23; Dec82: bcc02: goto c1d4f; Dedcd: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\x61\x6e\x67\x65\162", $this->translator->trans("\101\x6e\x20\x65\x72\162\157\162\40\x68\x61\x73\40\157\143\143\165\162\162\145\144\54\x20\145\x72\x72\157\162\40\155\145\x73\x73\x61\147\x65\x3a\x20\x25\x65\x72\162\x6f\162\115\x65\x73\x73\x61\x67\145\x25", ["\x25\145\x72\162\157\162\x4d\x65\x73\x73\141\147\145\x25" => $e->getMessage()])); } goto ce8bf; b5fa6: A894d: goto E72d1; ce8bf: cebba: goto b4173; F85da: goto cebba; goto b5fa6; c0ff8: if (true === $form->isValid()) { goto A894d; } goto aa06b; b4173: } public function purgeVarnishCache(Request $request) : Response { goto af2fa; af2fa: $site = $this->getSite($request); goto e223c; a01ba: return $response; goto d0381; Dff8a: try { goto C27af; E809b: $varnishCacheClient->setServer($varnishCacheSettings["\163\x65\162\x76\145\162"]); goto d9d11; d9d11: $varnishCacheClient->purgeTag($cacheTagPrefix); goto C1e14; a3c7a: $cacheTagPrefix = $varnishCacheSettings["\143\141\143\150\x65\124\x61\x67\120\x72\145\x66\151\170"]; goto Dae2d; D7305: if (!(true === isset($varnishCacheSettings["\x73\x65\162\x76\145\x72"]) && true === isset($varnishCacheSettings["\x63\141\143\x68\145\x54\141\147\x50\x72\145\x66\151\x78"]) && false === empty($varnishCacheSettings["\x63\x61\x63\150\145\x54\141\x67\x50\x72\145\146\151\x78"]))) { goto B9a0d; } goto a3c7a; C27af: $user = $this->getUser(); goto d5bcc; D4c5f: $varnishCacheSettings = $site->getVarnishCacheSettings(); goto D7305; e2097: $eventData = ["\163\151\x74\x65" => $domainName, "\x70\x75\162\x67\145" => "\x66\165\154\x6c"]; goto ac6c3; b512f: $session->getFlashBag()->set("\163\x75\143\x63\x65\163\x73", $this->translator->trans("\x56\x61\x72\x6e\x69\163\150\x20\x43\x61\143\x68\x65\x20\x68\x61\163\x20\142\145\145\x6e\x20\x70\165\162\x67\145\144\56")); goto Fc03a; Dae2d: $varnishCacheClient = new VarnishCacheClient(); goto E809b; C1e14: $varnishCacheClient->purgeHost($domainName); goto Fab99; c42f2: $domainName = $site->getDomainName(); goto D4c5f; Fab99: B9a0d: goto e2097; d5bcc: $session = $request->getSession(); goto c42f2; ac6c3: EventQueue::addEvent(EventQueue::EVENT_SITE_VARNISH_CACHE_PURGE, $user, $eventData, $request); goto b512f; Fc03a: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\x61\156\x67\x65\162", $this->translator->trans("\x41\x6e\40\145\162\162\157\162\x20\150\x61\163\x20\157\143\143\x75\x72\x72\x65\144\54\40\x65\x72\162\157\x72\40\155\x65\x73\163\141\x67\x65\72\40\45\x65\162\x72\x6f\x72\x4d\145\163\x73\141\x67\145\45", ["\45\145\x72\x72\157\x72\115\x65\163\163\141\x67\145\x25" => $e->getMessage()])); } goto B7283; fc535: $response = $this->redirect($this->generateUrl("\143\154\160\x5f\163\151\164\145\163")); goto a74b5; B7283: $response = $this->redirect($this->generateUrl("\x63\154\x70\137\x73\x69\164\x65\137\166\x61\162\156\151\x73\150\x5f\x63\141\143\150\x65", ["\144\x6f\155\x61\x69\156\x4e\141\x6d\145" => $site->getDomainName()])); goto F8a0f; F8a0f: return $response; goto B86de; a74b5: goto Ae6cb; goto fd54d; e223c: if (false === is_null($site)) { goto b0af7; } goto fc535; B86de: Ae6cb: goto a01ba; fd54d: b0af7: goto Dff8a; d0381: } public function vhost(Request $request) : Response { goto D3724; a5ea4: return $response; goto B8499; b72c5: if (false === is_null($site)) { goto ba97e; } goto D40e5; D40e5: $response = $this->redirect($this->generateUrl("\x63\154\160\137\163\151\164\145\x73")); goto D35de; ae936: $site->setVhostTemplate($vhostTemplate); goto D2ea5; fbcf6: if (!(true === $request->isMethod("\120\117\123\x54"))) { goto B6609; } goto d5c93; fdbd1: if (!(false === empty($vhostTemplate))) { goto F8501; } goto E8ff7; D2cf1: $oldVhostTemplate = $siteEntity->getVhostTemplate(); goto ae936; b923a: B6609: goto D9bc7; d5c93: $vhostTemplate = trim($request->get("\166\x68\x6f\x73\x74\55\x74\x65\x6d\160\154\141\x74\x65")); goto fdbd1; D2ea5: $response = $this->handleVhostUpdate($request, $site, $siteEntity, $oldVhostTemplate); goto dd952; e3e81: F8501: goto b923a; Aa5b4: ba97e: goto fbcf6; dd952: if (!(false === is_null($response))) { goto Ccaa5; } goto F1de1; D3724: $site = $this->getSite($request); goto b72c5; D35de: goto D542e; goto Aa5b4; Db32e: D542e: goto a5ea4; E8ff7: $domainName = $site->getDomainName(); goto E1ceb; E1ceb: $siteEntity = $this->getSiteEntity($domainName); goto D2cf1; F1de1: return $response; goto De789; D9bc7: $response = $this->render("\106\162\157\156\x74\x65\156\x64\57\123\x69\164\x65\x2f\x76\x68\157\163\164\x2e\150\x74\155\154\56\x74\167\x69\147", ["\163\151\164\145" => $site]); goto Db32e; De789: Ccaa5: goto e3e81; B8499: } private function handleVhostUpdate(Request $request, Site $site, SiteEntity $siteEntity, string $oldVhostTemplate) { try { goto Ca4be; A6d0a: return $response; goto E9fa6; Ca4be: $user = $this->getUser(); goto f188e; ac2c1: $eventData = ["\x73\x69\164\145" => $domainName, "\x76\x68\157\x73\164" => $vhostTemplate, "\157\x6c\144\126\150\157\x73\x74" => $oldVhostTemplate]; goto a2562; b6b2d: $siteUpdater = $this->getSiteUpdater($site); goto cd3bc; e99c2: $vhostTemplate = $site->getVhostTemplate(); goto b6b2d; f188e: $session = $request->getSession(); goto ed364; cd3bc: $siteUpdater->updateNginxVhostWithRollback(); goto Ee7c5; B2ad2: $session->getFlashBag()->set("\x73\165\x63\x63\x65\x73\x73", $this->translator->trans("\x56\x68\x6f\x73\x74\x20\x68\x61\x73\x20\x62\x65\145\156\x20\x73\141\x76\x65\x64\56")); goto ac2c1; a2562: EventQueue::addEvent(EventQueue::EVENT_SITE_VHOST_UPDATE, $user, $eventData, $request); goto Da7db; Ee7c5: $siteEntity->setVhostTemplate($vhostTemplate); goto B183a; ed364: $domainName = $site->getDomainName(); goto e99c2; Da7db: $response = $this->redirect($this->generateUrl("\143\x6c\160\x5f\163\151\x74\x65\137\166\x68\157\x73\x74", ["\144\x6f\x6d\141\x69\x6e\x4e\141\155\x65" => $domainName])); goto A6d0a; B183a: $this->siteEntityManager->updateEntity($siteEntity); goto B2ad2; E9fa6: } catch (InvalidVhostException $e) { $session->getFlashBag()->set("\x64\x61\x6e\147\145\x72", $this->translator->trans("\x56\x68\x6f\163\x74\40\x69\163\40\156\157\164\x20\166\x61\x6c\x69\144\54\40\145\x72\162\x6f\x72\x20\155\145\x73\x73\141\147\x65\72\x20\x25\x65\162\x72\157\162\115\x65\x73\163\141\x67\145\45", ["\45\145\x72\x72\157\x72\x4d\x65\163\x73\x61\x67\x65\45" => $e->getMessage()])); } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\x61\x6e\x67\145\162", $this->translator->trans("\101\156\40\x65\x72\x72\157\162\40\x68\x61\163\40\x6f\x63\x63\x75\162\162\145\144\x2c\40\x65\x72\162\157\162\40\x6d\x65\x73\163\x61\x67\145\72\40\45\145\x72\162\x6f\162\115\x65\163\x73\x61\147\145\x25", ["\x25\x65\x72\162\x6f\x72\x4d\x65\163\x73\141\147\x65\45" => $e->getMessage()])); } } public function settings(Request $request) : Response { goto cbd1a; c32f5: if (!(true === $request->isMethod("\x50\x4f\x53\x54"))) { goto b8df7; } goto df6b7; ba279: $domainSettingsForm = $this->createDomainSettingsForm($site, $domainSettingsData); goto Ffef7; bba31: $parameters["\160\x68\x70\123\x65\x74\164\x69\156\x67\x73\106\157\x72\x6d"] = $phpSettingsForm->createView(); goto F3644; Aa9ae: if (!(true === $reverseProxySettingsForm->isSubmitted())) { goto bb553; } goto d80f0; b21c3: Bb04e: goto A115e; A115e: $parameters["\162\x65\166\x65\162\x73\x65\120\x72\157\x78\171\123\x65\x74\164\151\156\x67\x73\106\x6f\162\x6d"] = $reverseProxySettingsForm->createView(); goto c07d8; F0f82: b8df7: goto Fe874; E8d90: $currentPhpSettings = clone $phpSettings; goto Fed33; Ee924: $phpSettings = $site->getPhpSettings(); goto Acb8d; c3db9: bf6da: goto bb9d2; B7fd7: $pythonSettingsForm->handleRequest($request); goto e38db; dddd9: $pageSpeedSettingsForm = $this->createPageSpeedSettingsForm($site, $pageSpeedSettingsData); goto B3d35; Ed94b: $siteUserSettingsData = ["\163\151\x74\x65\125\163\x65\x72" => $site->getUser(), "\x73\x73\x68\113\145\171\x73" => $site->getSshKeys()]; goto Ebff6; d238d: D6acd: goto f3f5c; C637d: $response = $this->handlePageSpeedSettingsForm($request, $pageSpeedSettingsForm, $site); goto Ae8e3; f42ad: $response = $this->handleNodejsSettingsForm($request, $nodejsSettingsForm, $currentNodeSettings, $site); goto cacad; d80f0: $response = $this->handleReverseProxySettingsForm($request, $reverseProxySettingsForm, $site); goto fdd2c; a1afb: C7d90: goto F38bf; Bc7ef: B7fdc: goto bba31; B9f6c: if (!(false === is_null($response))) { goto F4c4c; } goto C7643; e38db: if (!(true === $pythonSettingsForm->isSubmitted())) { goto D8e9a; } goto F9989; Af9d8: if (!(true === $phpSettingsForm->isSubmitted())) { goto Ecb05; } goto D4d5c; a40dd: if (!(SiteEntity::TYPE_PHP == $site->getType())) { goto A8e5e; } goto Ee924; e3f9b: return $response; goto a92cb; A997d: if (!(true === $request->isMethod("\x50\x4f\x53\124"))) { goto C7d90; } goto B7fd7; E814b: Aa52d: goto B76ec; B3d35: $siteDeleteForm = $this->createSiteDeleteForm($site, $siteDeleteData); goto c32f5; Ae8e3: D2405: goto C198d; f3f5c: if (!(true === $siteUserSettingsForm->isSubmitted())) { goto Dc7ca; } goto Dd98c; a00b5: $reverseProxySettingsForm = $this->createReverseProxySettingsForm($site); goto F7f00; Cd3a7: cf017: goto c0a32; D4d5c: $response = $this->handlePhpSettingsForm($request, $phpSettingsForm, $currentPhpSettings, $site); goto c0089; Fc23b: B4236: goto F20ce; f798e: if (!(SiteEntity::TYPE_NODEJS == $site->getType())) { goto ab2d3; } goto e22ec; Bd7c4: bb553: goto b21c3; c07d8: unset($parameters["\160\141\x67\145\123\160\x65\145\x64\x53\x65\164\x74\x69\x6e\147\163\x46\157\x72\155"]); goto c78ba; Cac0d: if (!(true === $domainSettingsForm->isSubmitted())) { goto D6acd; } goto Eebed; f2c5c: $pythonSettings = $site->getPythonSettings(); goto a0b21; Bbeba: if (!(true === $request->isMethod("\x50\117\123\124"))) { goto B7fdc; } goto E8d90; cacad: if (!(false === is_null($response))) { goto Aa52d; } goto C931c; f562b: $response = $this->render("\106\x72\157\x6e\x74\x65\156\x64\x2f\123\151\164\x65\57\x73\145\x74\164\151\156\x67\x73\56\150\164\155\154\x2e\x74\x77\x69\x67", $parameters); goto Ba1f6; ccbc6: if (false === is_null($site)) { goto ec3cf; } goto Bc0bc; F7f00: if (!(true === $request->isMethod("\120\x4f\x53\124"))) { goto Bb04e; } goto e0287; Fe874: $parameters = ["\x73\x69\x74\x65" => $site, "\x64\157\x6d\x61\151\x6e\123\145\164\x74\x69\156\x67\x73\106\157\162\x6d" => $domainSettingsForm->createView(), "\163\151\164\x65\125\x73\x65\x72\x53\x65\x74\x74\x69\x6e\147\163\106\x6f\x72\x6d" => $siteUserSettingsForm->createView(), "\160\x61\x67\145\123\160\145\145\x64\x53\145\x74\164\x69\x6e\x67\x73\x46\157\x72\x6d" => $pageSpeedSettingsForm->createView(), "\x73\151\x74\145\104\145\154\145\164\145\x46\x6f\162\155" => $siteDeleteForm->createView()]; goto f798e; caced: $currentNodeSettings = clone $nodejsSettings; goto F3bc4; C5bc1: Dc7ca: goto d2aba; Ab4a1: $siteUserSettingsForm->handleRequest($request); goto c578d; c0a32: $parameters["\156\157\x64\x65\x6a\x73\x53\x65\x74\164\x69\x6e\147\163\x46\157\x72\155"] = $nodejsSettingsForm->createView(); goto b239b; Dd98c: $response = $this->handleSiteUserSettingsForm($request, $siteUserSettingsForm, $site); goto C5bc1; c0089: if (!(false === is_null($response))) { goto B4236; } goto D1872; f39d7: return $response; goto e2445; Eebed: $response = $this->handleDomainSettingsForm($request, $domainSettingsForm, $site); goto d238d; Ce99d: ec3cf: goto df19c; C2d28: return $response; goto E3830; cbc56: if (!(false === is_null($response))) { goto b770c; } goto f39d7; D9143: if (!(SiteEntity::TYPE_PYTHON == $site->getType())) { goto bf6da; } goto f2c5c; cbd1a: $site = $this->getSite($request); goto ccbc6; Ebff6: $siteDeleteData = ["\144\x6f\155\141\x69\x6e\116\141\x6d\x65" => $site->getDomainName()]; goto c20e9; F3bc4: $nodejsSettingsForm->handleRequest($request); goto E6294; ed8b1: e27ec: goto cbc56; Ba1f6: Ee6d6: goto e3f9b; C7643: return $response; goto b49a1; fdd2c: if (!(false === is_null($response))) { goto f6e08; } goto C2d28; c20e9: $pageSpeedSettingsData = ["\151\163\x45\156\141\142\x6c\145\144" => $site->getPageSpeedEnabled(), "\x73\145\164\164\x69\156\x67\x73" => $site->getPageSpeedSettings()]; goto ba279; e2445: b770c: goto F0f82; df19c: $domainSettingsData = ["\x64\x6f\x6d\x61\151\x6e\x4e\x61\x6d\x65" => $site->getDomainName(), "\162\x6f\157\164\x44\x69\x72\145\x63\x74\x6f\162\x79" => $site->getRootDirectory()]; goto Ed94b; b87aa: $response = $this->handleSiteDeleteForm($request, $siteDeleteForm, $site); goto ed8b1; F9989: $response = $this->handlePythonSettingsForm($request, $pythonSettingsForm, $site); goto B9f6c; bb9d2: if (!(SiteEntity::TYPE_REVERSE_PROXY == $site->getType())) { goto f896f; } goto a00b5; Acb8d: $phpSettingsForm = $this->createPhpSettingsForm($site, $phpSettings); goto Bbeba; D1872: return $response; goto Fc23b; b49a1: F4c4c: goto B3e6b; E3830: f6e08: goto Bd7c4; Fed33: $phpSettingsForm->handleRequest($request); goto Af9d8; C198d: if (!(true === $siteDeleteForm->isSubmitted())) { goto e27ec; } goto b87aa; Db289: $nodejsSettingsForm = $this->createNodejsSettingsForm($site, $nodejsSettings); goto d8957; Cb3b9: $parameters["\x66\157\x72\155\x45\x72\x72\157\x72\x73"] = $this->formErrors; goto f562b; c78ba: f896f: goto Cb3b9; Ac62f: ab2d3: goto a40dd; d8957: if (!(true === $request->isMethod("\x50\x4f\x53\124"))) { goto cf017; } goto caced; E6294: if (!(true === $nodejsSettingsForm->isSubmitted())) { goto A4278; } goto f42ad; B76ec: A4278: goto Cd3a7; C931c: return $response; goto E814b; d2aba: if (!(true === $pageSpeedSettingsForm->isSubmitted())) { goto D2405; } goto C637d; B6909: $response = null; goto Cac0d; Ffef7: $siteUserSettingsForm = $this->createSiteUserSettingsForm($site, $siteUserSettingsData); goto dddd9; e75d4: $pageSpeedSettingsForm->handleRequest($request); goto B6909; df6b7: $domainSettingsForm->handleRequest($request); goto Ab4a1; c578d: $siteDeleteForm->handleRequest($request); goto e75d4; F38bf: $parameters["\160\171\164\x68\157\x6e\x53\145\x74\x74\151\156\147\x73\x46\157\162\155"] = $pythonSettingsForm->createView(); goto c3db9; a0b21: $pythonSettingsForm = $this->createPythonSettingsForm($site, $pythonSettings); goto A997d; e0287: $reverseProxySettingsForm->handleRequest($request); goto Aa9ae; B3e6b: D8e9a: goto a1afb; e00f5: goto Ee6d6; goto Ce99d; Bc0bc: $response = $this->redirect($this->generateUrl("\143\154\160\137\163\151\164\145\163")); goto e00f5; F3644: A8e5e: goto D9143; e22ec: $nodejsSettings = $site->getNodejsSettings(); goto Db289; b239b: unset($parameters["\160\141\x67\x65\123\x70\145\145\x64\123\x65\164\x74\x69\156\x67\x73\106\157\x72\155"]); goto Ac62f; F20ce: Ecb05: goto Bc7ef; a92cb: } public function purgePageSpeedCache(Request $request) : Response { goto Be8cd; Be8cd: $site = $this->getSite($request); goto c84de; fba8f: return $response; goto c5ca8; fa495: e3f14: goto fba8f; Ab110: Ee81c: goto c7614; c7614: try { goto b567f; b567f: $user = $this->getUser(); goto D24a9; da981: $eventData = ["\x73\151\164\145" => $site->getDomainName()]; goto B3497; B3497: EventQueue::addEvent(EventQueue::EVENT_SITE_PAGE_SPEED_CACHE_PURGE, $user, $eventData, $request); goto Cf201; C9346: $siteUpdater = $this->getSiteUpdater($site); goto d0da4; d0da4: $siteUpdater->purgePageSpeedCache(); goto da981; D24a9: $session = $request->getSession(); goto C9346; Cf201: $session->getFlashBag()->set("\x73\x75\x63\143\145\163\163", $this->translator->trans("\x50\141\147\145\40\x53\160\x65\x65\x64\40\x43\x61\143\150\145\x20\150\x61\163\40\x62\x65\145\x6e\x20\160\x75\x72\x67\145\144\56")); goto A97a4; A97a4: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\x61\x6e\147\145\x72", $this->translator->trans("\101\x6e\40\145\x72\162\x6f\x72\x20\x68\x61\163\40\157\x63\x63\165\162\x72\145\144\x2c\x20\145\x72\162\x6f\x72\x20\x6d\145\x73\x73\x61\147\x65\x3a\x20\x25\x65\162\162\x6f\x72\x4d\x65\163\x73\141\147\145\45", ["\x25\145\x72\162\157\x72\x4d\145\163\x73\x61\x67\145\45" => $e->getMessage()])); } goto f60b8; a97e6: goto e3f14; goto Ab110; F480a: $response = $this->redirect($this->generateUrl("\143\x6c\x70\137\163\151\x74\145\x73")); goto a97e6; f60b8: $response = $this->redirect($this->generateUrl("\x63\154\x70\x5f\163\x69\x74\145\137\x73\x65\164\x74\151\x6e\147\163", ["\144\x6f\155\x61\151\156\x4e\141\x6d\145" => $site->getDomainName()])); goto F532d; F532d: return $response; goto fa495; c84de: if (false === is_null($site)) { goto Ee81c; } goto F480a; c5ca8: } private function createDomainSettingsForm(Site $site, array $data) : Form { goto D2aa7; E8a76: return $form; goto D8a3a; C6433: $form->add("\163\x75\x62\x6d\x69\x74", SubmitType::class, ["\x61\x74\x74\x72" => ["\143\154\141\163\x73" => "\x62\164\156\40\x62\x74\x6e\55\x62\154\x75\145\x20\142\164\x6e\55\154\x67"], "\x6c\x61\142\145\x6c" => "\123\141\x76\x65"]); goto E8a76; D2aa7: $form = $this->createForm("\101\160\160\x5c\106\x6f\x72\x6d\x5c\123\x69\x74\145\104\x6f\x6d\x61\151\x6e\123\145\164\164\151\x6e\147\163\124\x79\x70\145", $data, ["\141\x63\164\x69\x6f\156" => $this->generateUrl("\143\x6c\x70\137\x73\151\164\145\x5f\163\x65\164\x74\151\x6e\x67\163", ["\x64\x6f\x6d\141\151\x6e\116\x61\x6d\x65" => $site->getDomainName()]), "\155\145\x74\150\x6f\x64" => "\120\x4f\123\124", "\141\x74\164\162" => []]); goto C6433; D8a3a: } private function createSiteUserSettingsForm(Site $site, array $data) : Form { goto f15df; f15df: $form = $this->createForm("\101\160\x70\134\x46\157\162\x6d\134\123\x69\164\x65\125\x73\x65\x72\x53\145\x74\x74\151\156\147\163\124\x79\x70\x65", $data, ["\x61\x63\164\151\x6f\156" => $this->generateUrl("\x63\x6c\160\x5f\163\x69\164\145\137\x73\x65\x74\x74\x69\156\x67\163", ["\x64\x6f\x6d\141\x69\156\116\x61\x6d\x65" => $site->getDomainName()]), "\155\x65\x74\x68\157\x64" => "\x50\117\x53\x54", "\x61\164\x74\x72" => []]); goto b18ca; c0b91: return $form; goto De662; b18ca: $form->add("\x73\165\x62\155\x69\164", SubmitType::class, ["\141\x74\164\162" => ["\x63\154\x61\163\x73" => "\142\164\x6e\40\x62\164\x6e\55\x62\154\165\x65\40\x62\164\x6e\55\x6c\147"], "\x6c\141\142\x65\154" => "\x53\x61\166\x65"]); goto c0b91; De662: } private function createPageSpeedSettingsForm(Site $site, array $data) : Form { goto c89a2; B2d84: $form->add("\163\x75\x62\155\x69\x74", SubmitType::class, ["\x61\x74\x74\162" => ["\143\x6c\141\x73\163" => "\142\164\156\x20\x62\x74\x6e\55\x62\154\165\145\40\142\x74\x6e\x2d\x6c\x67"], "\x6c\x61\x62\x65\154" => "\123\141\166\145"]); goto A1450; A1450: return $form; goto D17d6; c89a2: $form = $this->createForm("\x41\160\160\x5c\106\x6f\x72\x6d\134\x53\151\164\145\x50\x61\147\145\123\x70\145\x65\144\123\145\164\x74\x69\156\147\x73\124\x79\160\x65", $data, ["\x61\x63\164\x69\157\156" => $this->generateUrl("\x63\154\160\x5f\x73\x69\164\145\137\163\145\164\164\151\156\x67\x73", ["\144\x6f\155\141\x69\x6e\116\141\155\x65" => $site->getDomainName()]), "\155\x65\164\x68\x6f\x64" => "\x50\117\x53\124", "\141\164\x74\x72" => []]); goto B2d84; D17d6: } private function createReverseProxySettingsForm(Site $site) : Form { goto Ef39d; E6bea: return $form; goto ff168; Ad38c: $form = $this->createForm("\x41\x70\x70\134\x46\157\x72\155\134\x53\151\x74\145\122\145\166\x65\162\x73\145\x50\x72\x6f\170\x79\123\x65\x74\164\x69\x6e\147\163\x54\171\x70\145", $data, ["\x61\143\164\x69\157\156" => $this->generateUrl("\x63\154\160\137\x73\151\164\145\137\x73\145\x74\x74\151\156\x67\x73", ["\x64\x6f\x6d\x61\151\x6e\116\x61\155\x65" => $site->getDomainName()]), "\155\145\x74\x68\x6f\x64" => "\x50\x4f\x53\x54", "\x61\x74\164\x72" => ["\151\x64" => "\x72\145\166\x65\x72\x73\x65\x2d\x70\162\157\170\171\x2d\163\145\164\x74\x69\156\147\x73\x2d\146\x6f\162\155"]]); goto f2cae; f2cae: $form->add("\163\x75\142\x6d\x69\x74", SubmitType::class, ["\141\x74\x74\x72" => ["\143\154\141\x73\x73" => "\x62\164\x6e\x20\142\164\156\x2d\142\x6c\x75\145\x20\x62\164\156\55\x6c\x67"], "\154\x61\x62\x65\x6c" => "\123\x61\166\145"]); goto E6bea; Ef39d: $data = ["\x72\145\x76\145\162\163\x65\120\162\x6f\x78\x79\125\162\x6c" => $site->getReverseProxyUrl()]; goto Ad38c; ff168: } private function createNodejsSettingsForm(Site $site, NodejsSettings $nodejsSettings) : Form { goto E31e5; E31e5: $form = $this->createForm("\101\x70\160\x5c\106\157\162\155\x5c\x53\x69\164\145\116\157\x64\x65\x6a\163\123\x65\164\164\x69\x6e\147\163\124\171\x70\145", $nodejsSettings, ["\141\x63\x74\151\157\x6e" => $this->generateUrl("\x63\x6c\x70\137\163\x69\x74\145\x5f\163\145\x74\x74\x69\x6e\147\x73", ["\144\157\155\141\151\x6e\116\141\155\145" => $site->getDomainName()]), "\155\145\x74\x68\157\144" => "\120\x4f\x53\124", "\x61\164\x74\x72" => ["\x69\144" => "\156\157\x64\145\152\x73\x2d\163\145\164\x74\x69\156\x67\163\x2d\146\157\162\155"]]); goto Dd304; e6365: return $form; goto B8e17; Dd304: $form->add("\x73\165\x62\x6d\x69\164", SubmitType::class, ["\141\164\164\x72" => ["\143\x6c\x61\x73\x73" => "\x62\164\x6e\40\142\x74\x6e\x2d\142\x6c\x75\145\x20\142\164\156\x2d\x6c\147"], "\x6c\141\x62\145\x6c" => "\x53\x61\x76\x65"]); goto e6365; B8e17: } private function createPhpSettingsForm(Site $site, PhpSettings $phpSettings) : Form { goto F447b; e2bbd: return $form; goto Ffba6; fa88f: $form->add("\x73\x75\142\x6d\x69\164", SubmitType::class, ["\x61\164\x74\162" => ["\x63\154\141\163\163" => "\x62\164\156\x20\x62\x74\156\55\x62\154\165\x65\x20\x62\164\156\55\x6c\x67"], "\154\141\x62\145\x6c" => "\123\141\x76\145"]); goto e2bbd; F447b: $form = $this->createForm("\101\x70\x70\134\x46\157\x72\x6d\x5c\123\x69\164\145\x50\150\x70\x53\145\164\x74\151\156\x67\x73\124\171\x70\x65", $phpSettings, ["\x61\x63\164\x69\x6f\x6e" => $this->generateUrl("\x63\x6c\x70\x5f\x73\151\x74\145\x5f\x73\145\x74\164\x69\x6e\147\163", ["\x64\157\155\x61\151\156\116\141\155\x65" => $site->getDomainName()]), "\x6d\145\x74\150\x6f\144" => "\120\117\x53\124", "\141\164\164\162" => []]); goto fa88f; Ffba6: } private function createPythonSettingsForm(Site $site, PythonSettings $pythonSettings) : Form { goto Ed10b; cc30c: return $form; goto beafc; C24ba: $form->add("\163\x75\142\155\x69\x74", SubmitType::class, ["\x61\x74\x74\x72" => ["\143\154\141\x73\x73" => "\142\x74\156\x20\142\164\156\x2d\x62\154\165\145\40\x62\x74\x6e\55\x6c\147"], "\x6c\x61\x62\x65\x6c" => "\123\x61\x76\x65"]); goto cc30c; Ed10b: $form = $this->createForm("\101\x70\x70\134\106\157\162\x6d\134\123\151\x74\x65\120\x79\164\150\157\x6e\123\x65\164\164\x69\156\x67\163\124\x79\160\x65", $pythonSettings, ["\141\143\x74\151\157\x6e" => $this->generateUrl("\143\154\x70\137\163\x69\164\145\137\163\x65\x74\164\x69\156\x67\x73", ["\144\x6f\155\x61\151\x6e\116\141\155\x65" => $site->getDomainName()]), "\155\x65\164\150\x6f\x64" => "\x50\117\123\124", "\x61\x74\x74\x72" => []]); goto C24ba; beafc: } private function createSiteDeleteForm(Site $site, array $data) : Form { goto Dd48d; Dd48d: $form = $this->createForm("\101\160\160\x5c\x46\157\x72\155\134\123\151\164\145\x44\x65\x6c\145\x74\x65\124\x79\x70\x65", $data, ["\141\143\x74\151\x6f\x6e" => $this->generateUrl("\143\x6c\x70\x5f\163\151\x74\x65\x5f\x73\x65\164\164\x69\156\x67\163", ["\144\157\x6d\141\151\x6e\116\141\155\145" => $site->getDomainName()]), "\x6d\145\164\x68\157\x64" => "\120\x4f\123\124", "\141\164\x74\162" => []]); goto d48a2; Da50a: return $form; goto aa90d; d48a2: $form->add("\163\165\142\x6d\151\164", SubmitType::class, ["\x61\164\x74\x72" => ["\x63\x6c\141\163\163" => "\x62\x74\156\x20\x62\x74\156\x2d\x62\x6c\165\x65\40\x62\164\156\x2d\x6c\x67", "\144\x69\163\141\x62\154\x65\x64" => "\144\151\x73\x61\x62\154\x65\x64"], "\x6c\x61\142\x65\154" => "\104\145\154\x65\x74\145\x20\123\x69\164\x65"]); goto Da50a; aa90d: } private function handleDomainSettingsForm(Request $request, Form $form, Site $site) { goto Ce65c; de2c6: try { goto c3356; Cf866: return $response; goto D2beb; c8cc2: $session->getFlashBag()->set("\163\x75\143\x63\x65\163\163", $this->translator->trans("\122\157\x6f\x74\40\104\x69\x72\x65\x63\164\157\x72\171\x20\x68\141\163\40\x62\145\145\156\40\x73\141\166\145\144\x2e")); goto C44d9; b82fc: $this->siteEntityManager->updateEntity($siteEntity); goto Ee112; c846c: EventQueue::addEvent(EventQueue::EVENT_SITE_ROOT_DIRECTORY_UPDATE, $user, $eventData, $request); goto c8cc2; b8046: $session = $request->getSession(); goto A8034; Ecde1: $siteEntity = $this->getSiteEntity($domainName); goto da926; Eb9e0: $response = $this->redirect($this->generateUrl("\x63\x6c\x70\x5f\163\x69\164\145\137\163\145\164\164\151\156\x67\163", ["\144\157\155\141\151\156\x4e\141\155\145" => $site->getDomainName()])); goto Cf866; Eef84: $rootDirectory = rtrim($form->get("\162\157\x6f\x74\104\151\x72\x65\x63\x74\x6f\x72\x79")->getData(), "\x2f"); goto b9311; Bf20c: $siteUpdater->domainSettings(); goto Ac258; da926: if (!(false === is_null($siteEntity))) { goto F60da; } goto Eef84; b9311: $site->setRootDirectory($rootDirectory); goto b7735; C44d9: F60da: goto Eb9e0; Ee112: $siteUpdater = $this->getSiteUpdater($site); goto Bf20c; Ac258: $eventData = ["\x73\x69\x74\145" => $domainName, "\x72\157\157\164\x44\x69\162\x65\x63\x74\157\x72\x79" => $rootDirectory]; goto c846c; c3356: $user = $this->getUser(); goto b8046; b7735: $siteEntity->setRootDirectory($rootDirectory); goto b82fc; A8034: $domainName = $site->getDomainName(); goto Ecde1; D2beb: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\141\x6e\147\x65\x72", $this->translator->trans("\101\x6e\x20\145\162\x72\x6f\162\40\150\141\163\x20\x6f\143\x63\165\162\162\x65\x64\54\40\x65\162\162\x6f\162\x20\x6d\x65\x73\x73\x61\147\x65\x3a\x20\x25\145\162\x72\157\162\115\x65\163\x73\x61\147\145\45", ["\x25\145\162\162\x6f\162\x4d\145\163\x73\x61\x67\x65\x25" => $e->getMessage()])); } goto d6a20; E578a: F0da6: goto de2c6; b943a: goto C76d9; goto E578a; d87cf: $this->formErrors = $this->getErrorMessages($form); goto b943a; d6a20: C76d9: goto c1410; Ce65c: if (true === $form->isValid()) { goto F0da6; } goto d87cf; c1410: } private function handleSiteUserSettingsForm(Request $request, Form $form, Site $site) { goto Da4b0; Feab4: goto Aa561; goto F93b7; f3f26: Aa561: goto Aa7a4; ea8ec: try { goto Cee72; E881c: $response = $this->redirect($this->generateUrl("\143\154\160\x5f\163\151\164\145\137\x73\x65\164\x74\151\156\147\163", ["\144\x6f\155\x61\151\x6e\116\141\155\x65" => $site->getDomainName()])); goto a865c; b9e9a: $password = trim($form->get("\160\141\x73\x73\x77\157\162\144")->getData()); goto abbef; b460e: $siteUser = $site->getUser(); goto B530d; B530d: $sshKeys = trim($form->get("\x73\x73\x68\113\145\171\163")->getData()); goto b9e9a; b3fc5: if (!(false === empty($password))) { goto Bdb37; } goto D8e46; D8e46: $siteUpdater->changeUserPassword($siteUser, $password); goto B89a4; Df899: $siteUpdater->updateUserSShKeys($siteUser, $sshKeys); goto b3fc5; fb010: $siteEntity = $this->getSiteEntity($domainName); goto C1728; e6b88: EventQueue::addEvent(EventQueue::EVENT_SITE_USER_SETTINGS_UPDATE, $user, $eventData, $request); goto aef43; a2b72: $siteUpdater = $this->getSiteUpdater($site); goto Df899; abbef: $siteEntity->setSshKeys($sshKeys); goto ec862; ec862: $this->siteEntityManager->updateEntity($siteEntity); goto a2b72; B89a4: Bdb37: goto c49f9; c49f9: $eventData = ["\163\151\x74\145" => $domainName, "\163\x73\150\113\145\171\163" => $sshKeys]; goto e6b88; aef43: $session->getFlashBag()->set("\x73\x75\x63\143\145\163\163", $this->translator->trans("\x53\151\x74\145\x20\125\x73\145\x72\40\123\x65\164\x74\x69\156\x67\163\40\150\x61\x76\x65\x20\x62\x65\x65\156\x20\x73\141\166\x65\144\x2e")); goto eb0c0; Cee72: $user = $this->getUser(); goto aee70; aee70: $session = $request->getSession(); goto B00c7; C1728: if (!(false === is_null($siteEntity))) { goto a75c6; } goto b460e; B00c7: $domainName = $site->getDomainName(); goto fb010; eb0c0: a75c6: goto E881c; a865c: return $response; goto B6c65; B6c65: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\x61\156\147\x65\x72", $this->translator->trans("\x41\x6e\x20\145\x72\x72\x6f\x72\x20\150\141\x73\40\x6f\143\143\x75\162\x72\145\x64\54\x20\x65\162\x72\157\x72\x20\155\x65\x73\163\x61\x67\x65\x3a\40\x25\145\162\x72\157\x72\115\145\163\x73\x61\x67\x65\x25", ["\45\x65\x72\162\x6f\x72\115\145\163\163\x61\x67\x65\x25" => $e->getMessage()])); } goto f3f26; F93b7: c908d: goto ea8ec; Da4b0: if (true === $form->isValid()) { goto c908d; } goto Bef9b; Bef9b: $this->formErrors = $this->getErrorMessages($form); goto Feab4; Aa7a4: } private function handlePageSpeedSettingsForm(Request $request, Form $form, Site $site) { goto d4fb3; Bb5fa: Dd178: goto E99db; d4fb3: if (true === $form->isValid()) { goto F009b; } goto F3a38; f8542: try { goto d5613; ff407: $siteEntity->setPageSpeedSettings($settings); goto A2718; B96c8: $session->getFlashBag()->set("\x73\x75\143\x63\x65\163\163", $this->translator->trans("\120\141\x67\145\40\x53\x70\145\145\x64\40\123\x65\164\164\x69\156\147\x73\40\x68\141\166\145\x20\142\145\145\156\40\163\141\x76\x65\x64\x2e")); goto e004f; Fcd7e: if (!(false === is_null($siteEntity))) { goto Af724; } goto A3f4b; Cf0a3: $siteEntity = $this->getSiteEntity($domainName); goto Fcd7e; e65b1: $site->setPageSpeedEnabled($isEnabled); goto C57ef; A3f4b: $isEnabled = $form->get("\x69\x73\105\x6e\141\142\x6c\145\x64")->getData(); goto d42e8; A2718: $this->siteEntityManager->updateEntity($siteEntity); goto D628b; aa3e8: $session = $request->getSession(); goto Ede50; F4f49: $siteEntity->setPageSpeedEnabled($isEnabled); goto ff407; e004f: Af724: goto e6f51; e6f51: $response = $this->redirect($this->generateUrl("\x63\x6c\x70\x5f\163\x69\164\145\137\163\x65\x74\164\x69\156\147\x73", ["\x64\x6f\x6d\x61\151\156\x4e\x61\155\x65" => $site->getDomainName()])); goto de90b; B918f: $siteUpdater->updateNginxVhostWithRollback(); goto f460f; Ac4f2: $siteUpdater = $this->getSiteUpdater($site); goto B918f; Ede50: $domainName = $site->getDomainName(); goto Cf0a3; f460f: $siteUpdater->purgePageSpeedCache(); goto F4f49; d5613: $user = $this->getUser(); goto aa3e8; d42e8: $settings = trim($form->get("\163\145\164\x74\x69\156\147\163")->getData()); goto e65b1; f5631: EventQueue::addEvent(EventQueue::EVENT_SITE_PAGE_SPEED_SETTINGS_UPDATE, $user, $eventData, $request); goto B96c8; de90b: return $response; goto de8bb; C57ef: $site->setPageSpeedSettings($settings); goto Ac4f2; D628b: $eventData = ["\x73\151\x74\x65" => $domainName, "\x70\x61\147\145\123\160\x65\145\144\x45\156\141\142\154\145\144" => $isEnabled, "\x70\x61\147\x65\123\160\145\145\144\x53\x65\x74\x74\x69\x6e\x67\163" => $settings]; goto f5631; de8bb: } catch (InvalidVhostException $e) { $session->getFlashBag()->set("\x64\141\156\147\145\162", $this->translator->trans("\x50\x61\x67\145\x53\x70\x65\x65\x64\x20\123\145\x74\164\151\156\x67\x20\x61\x72\x65\40\x6e\x6f\x74\x20\166\141\154\151\x64\x2c\40\x65\162\162\x6f\162\40\x6d\x65\163\163\x61\147\145\x3a\x20\45\x65\162\x72\157\x72\115\x65\x73\163\141\x67\145\45", ["\x25\x65\x72\162\157\x72\x4d\x65\163\x73\x61\147\145\45" => $e->getMessage()])); } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\141\x6e\x67\x65\x72", $this->translator->trans("\x41\x6e\40\145\x72\162\x6f\x72\40\150\141\x73\40\x6f\143\143\165\162\162\145\x64\x2c\40\145\162\162\157\162\x20\155\x65\x73\x73\141\147\x65\72\40\x25\145\x72\162\157\x72\115\x65\x73\163\141\x67\145\x25", ["\45\145\162\162\x6f\162\x4d\145\x73\163\141\147\145\45" => $e->getMessage()])); } goto Bb5fa; F3a38: $this->formErrors = $this->getErrorMessages($form); goto C5f39; C5f39: goto Dd178; goto D8743; D8743: F009b: goto f8542; E99db: } private function handleSiteDeleteForm(Request $request, Form $form, Site $site) { goto Ac140; Ac140: if (true === $form->isValid()) { goto De1b9; } goto e1131; e1131: $this->formErrors = $this->getErrorMessages($form); goto C039a; B36bf: try { goto D854a; E8778: $session->getFlashBag()->set("\x73\x75\x63\143\145\x73\163", $this->translator->trans("\123\x69\x74\x65\40\150\141\163\x20\142\x65\145\156\40\x64\x65\154\145\x74\x65\x64\56")); goto Bc0ec; Fc9b0: $siteDeleter->delete(); goto Dadd5; Dadd5: $this->siteEntityManager->deleteEntity($siteEntity); goto Fa1ee; Bc0ec: De352: goto a7c05; f9ab2: return $response; goto Ee228; c70f4: $session = $request->getSession(); goto c027b; Fa1ee: $eventData = ["\163\151\164\x65" => $domainName, "\x74\x79\160\145" => $site->getType()]; goto Cd0fa; D854a: $user = $this->getUser(); goto c70f4; b3fb7: if (!(false === is_null($siteEntity))) { goto De352; } goto C0494; c027b: $domainName = $site->getDomainName(); goto d86b6; Cd0fa: EventQueue::addEvent(EventQueue::EVENT_SITE_DELETE, $user, $eventData, $request); goto E8778; d86b6: $siteEntity = $this->getSiteEntity($domainName); goto b3fb7; a7c05: $response = $this->redirect($this->generateUrl("\143\154\160\x5f\x73\151\164\145\163")); goto f9ab2; C0494: $siteDeleter = $this->getSiteDeleter($site); goto Fc9b0; Ee228: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\141\156\147\x65\162", $this->translator->trans("\101\156\40\x65\162\x72\157\162\x20\150\141\163\x20\157\x63\x63\165\x72\x72\145\x64\x2c\40\145\x72\162\x6f\162\40\x6d\x65\163\163\141\147\x65\x3a\40\x25\145\x72\x72\157\162\115\145\163\163\x61\x67\x65\x25", ["\45\145\162\162\157\162\115\x65\163\163\141\147\145\45" => $e->getMessage()])); } goto B3fb1; b6346: De1b9: goto B36bf; B3fb1: C115b: goto d8d45; C039a: goto C115b; goto b6346; d8d45: } private function handleNodejsSettingsForm(Request $request, Form $form, NodejsSettings $currentNodejsSettings, Site $site) { goto cdbdb; Fcefe: $this->formErrors = $this->getErrorMessages($form); goto E9af7; cdbdb: if (true === $form->isValid()) { goto Efb11; } goto Fcefe; E9af7: goto Ead87; goto D07e9; D07e9: Efb11: goto B9b3f; B9b3f: try { goto a96cc; E2adc: $siteUpdater->installNodejsVersion(); goto c0a46; Dc032: $nodejsSettings = $form->getData(); goto a8d98; c0a46: a5607: goto d3285; a8d98: $nodejsVersion = $nodejsSettings->getNodejsVersion(); goto f2ddc; ccf9f: $domainName = $site->getDomainName(); goto fc017; f2ddc: $hasNodejsVersionChanged = $currentNodejsSettings->getNodejsVersion() != $nodejsVersion; goto fd486; Ccb17: $response = $this->redirect($this->generateUrl("\x63\154\x70\x5f\x73\151\x74\145\137\x73\145\x74\x74\151\156\147\163", ["\x64\x6f\x6d\x61\151\x6e\116\x61\x6d\145" => $site->getDomainName()])); goto b3b7c; A6c63: if (!(false === is_null($siteEntity))) { goto d5465; } goto Dc032; d3285: $siteUpdater->nodejsSettings(); goto e8f19; f5128: if (!(true === $hasNodejsVersionChanged)) { goto a5607; } goto E2adc; fc017: $siteEntity = $this->getSiteEntity($domainName); goto A6c63; b3b7c: return $response; goto B0974; E9346: $eventData = ["\x73\x69\164\x65" => $domainName, "\156\157\x64\x65\152\163\x56\145\162\163\x69\x6f\x6e" => $nodejsVersion, "\x70\x6f\x72\164" => $nodejsSettings->getPort()]; goto a9755; e8f19: $this->siteEntityManager->updateEntity($siteEntity); goto E9346; a9755: EventQueue::addEvent(EventQueue::EVENT_SITE_NODEJS_SETTINGS_UPDATE, $user, $eventData, $request); goto f8754; c717f: d5465: goto Ccb17; fd486: $siteUpdater = $this->getSiteUpdater($site); goto f5128; F66f9: $session = $request->getSession(); goto ccf9f; a96cc: $user = $this->getUser(); goto F66f9; f8754: $session->getFlashBag()->set("\163\165\143\x63\x65\x73\x73", $this->translator->trans("\x4e\x6f\144\145\56\x6a\x73\40\123\145\164\x74\x69\156\x67\163\40\150\141\166\x65\40\142\145\x65\156\x20\x73\x61\x76\x65\x64\56")); goto c717f; B0974: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\141\156\x67\x65\162", $this->translator->trans("\x41\156\x20\145\162\162\157\162\x20\x68\x61\x73\40\157\x63\x63\x75\162\x72\x65\x64\54\x20\x65\x72\x72\157\162\40\x6d\145\163\163\x61\147\145\x3a\40\x25\x65\162\162\157\162\x4d\x65\x73\163\x61\x67\145\45", ["\x25\x65\x72\x72\x6f\x72\115\145\163\163\141\x67\x65\x25" => $e->getMessage()])); } goto b57db; b57db: Ead87: goto D74f4; D74f4: } private function handlePythonSettingsForm(Request $request, Form $form, Site $site) { goto Caa89; b943c: $this->formErrors = $this->getErrorMessages($form); goto d3487; F9d3a: E0ab6: goto d33e4; Caa89: if (true === $form->isValid()) { goto Ddfb6; } goto b943c; d3487: goto E0ab6; goto f2c61; Bf8ae: try { goto d2d43; B98b5: $domainName = $site->getDomainName(); goto b8e5b; F7b1b: EventQueue::addEvent(EventQueue::EVENT_SITE_PYTHON_SETTINGS_UPDATE, $user, $eventData, $request); goto F5fc4; F5fc4: $session->getFlashBag()->set("\x73\165\143\143\x65\x73\x73", $this->translator->trans("\120\171\164\x68\157\156\40\123\145\x74\x74\x69\156\x67\x73\x20\150\141\166\145\40\x62\145\145\x6e\40\163\x61\166\x65\144\x2e")); goto Ec7c0; e58c3: $pythonVersion = $pythonSettings->getPythonVersion(); goto bc51f; f9272: return $response; goto Ff782; Ec7c0: Eebe0: goto A1f50; bc51f: $siteUpdater = $this->getSiteUpdater($site); goto a2154; A1f50: $response = $this->redirect($this->generateUrl("\143\x6c\160\x5f\x73\x69\164\145\x5f\x73\145\164\x74\151\x6e\147\163", ["\144\x6f\x6d\x61\151\156\116\141\x6d\145" => $site->getDomainName()])); goto f9272; e28b0: $pythonSettings = $form->getData(); goto e58c3; b8e5b: $siteEntity = $this->getSiteEntity($domainName); goto B1a1c; ca354: $siteUpdater->pythonSettings(); goto C2f13; a2154: $siteUpdater->writePythonVersionFile(); goto ca354; d2d43: $user = $this->getUser(); goto B2dfd; B2dfd: $session = $request->getSession(); goto B98b5; cfa5e: $eventData = ["\x73\x69\x74\145" => $domainName, "\160\171\x74\x68\157\156\x56\145\x72\163\x69\x6f\156" => $pythonVersion, "\x70\157\x72\164" => $pythonSettings->getPort()]; goto F7b1b; C2f13: $this->siteEntityManager->updateEntity($siteEntity); goto cfa5e; B1a1c: if (!(false === is_null($siteEntity))) { goto Eebe0; } goto e28b0; Ff782: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\141\156\147\x65\x72", $this->translator->trans("\101\156\x20\x65\162\x72\x6f\162\x20\x68\x61\x73\x20\157\x63\143\165\162\162\145\x64\x2c\x20\145\162\162\x6f\x72\40\x6d\x65\x73\163\x61\147\x65\72\x20\x25\145\x72\x72\x6f\x72\x4d\x65\163\163\x61\147\x65\x25", ["\45\145\162\162\x6f\162\115\x65\163\x73\141\x67\145\45" => $e->getMessage()])); } goto F9d3a; f2c61: Ddfb6: goto Bf8ae; d33e4: } private function handleReverseProxySettingsForm(Request $request, Form $form, Site $site) { goto F816e; cb58f: try { goto D08cd; Bbf7f: $eventData = ["\x73\x69\164\145" => $domainName, "\x72\x65\166\145\x72\163\x65\x50\162\x6f\x78\x79\125\x72\154" => $reverseProxyUrl]; goto Ee4f0; Bb3fa: $siteEntity = $this->getSiteEntity($domainName); goto E48d7; c27d1: $session = $request->getSession(); goto aba07; bd221: $siteEntity->setReverseProxyUrl($reverseProxyUrl); goto d088b; cb5a2: $response = $this->redirect($this->generateUrl("\x63\x6c\x70\137\x73\x69\x74\x65\x5f\163\x65\x74\164\x69\156\x67\163", ["\144\x6f\x6d\141\x69\156\x4e\141\x6d\145" => $site->getDomainName()])); goto B04ba; d088b: $siteUpdater = $this->getSiteUpdater($site); goto F23ff; aba07: $domainName = $site->getDomainName(); goto Bb3fa; A4dd4: $session->getFlashBag()->set("\163\x75\x63\x63\145\x73\163", $this->translator->trans("\x52\x65\166\145\x72\x73\145\x20\x50\x72\157\170\171\x20\x53\145\x74\x74\x69\x6e\x67\x73\40\150\141\166\145\40\x62\x65\x65\156\40\163\x61\166\145\x64\56")); goto e3aee; D08cd: $user = $this->getUser(); goto c27d1; fa115: $reverseProxyUrl = $form->get("\x72\x65\x76\145\x72\163\145\x50\x72\157\170\171\125\x72\x6c")->getData(); goto d1721; B04ba: return $response; goto Fba41; F23ff: $siteUpdater->updateNginxVhostWithRollback(); goto c847c; Ee4f0: EventQueue::addEvent(EventQueue::EVENT_SITE_REVERSE_PROXY_SETTINGS_UPDATE, $user, $eventData, $request); goto A4dd4; c847c: $this->siteEntityManager->updateEntity($siteEntity); goto Bbf7f; d1721: $site->setReverseProxyUrl($reverseProxyUrl); goto bd221; e3aee: A4cad: goto cb5a2; E48d7: if (!(false === is_null($siteEntity))) { goto A4cad; } goto fa115; Fba41: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\141\x6e\x67\x65\x72", $this->translator->trans("\101\156\x20\145\x72\162\x6f\162\40\x68\x61\163\40\157\x63\x63\x75\162\x72\x65\144\x2c\40\x65\162\x72\x6f\162\40\x6d\145\163\163\141\x67\x65\x3a\40\45\x65\162\162\157\x72\x4d\x65\163\x73\x61\147\x65\45", ["\45\x65\x72\x72\157\x72\115\x65\163\163\141\147\x65\x25" => $e->getMessage()])); } goto ed859; bc438: c7e24: goto cb58f; ed859: C2696: goto d7d18; F816e: if (true === $form->isValid()) { goto c7e24; } goto F13df; dc310: goto C2696; goto bc438; F13df: $this->formErrors = $this->getErrorMessages($form); goto dc310; d7d18: } private function handlePhpSettingsForm(Request $request, Form $form, PhpSettings $currentPhpSettings, Site $site) { goto E069d; fde37: b451a: goto C85a0; Afeb7: F534d: goto b6994; b0b18: $this->formErrors = $this->getErrorMessages($form); goto C27e8; C27e8: goto b451a; goto Afeb7; E069d: if (true === $form->isValid()) { goto F534d; } goto b0b18; b6994: try { goto Fc6de; Dc0f9: A0c03: goto Dd50f; f3b4d: $siteUpdater->phpSettings(); goto e3233; E7d37: if (!(false === is_null($siteEntity))) { goto A0c03; } goto Afff5; b90cc: $session->getFlashBag()->set("\163\x75\143\x63\x65\x73\x73", $this->translator->trans("\120\x48\120\40\123\x65\164\x74\x69\x6e\x67\x73\40\150\141\166\x65\x20\142\x65\x65\x6e\40\163\141\x76\x65\x64\x2e")); goto Dc0f9; a012b: return $response; goto d7eb7; Dd50f: $response = $this->redirect($this->generateUrl("\x63\154\x70\x5f\163\151\x74\x65\x5f\x73\x65\164\x74\151\156\147\x73", ["\x64\x6f\x6d\141\x69\156\x4e\141\155\x65" => $site->getDomainName()])); goto a012b; Fc6de: $user = $this->getUser(); goto Bbe0a; Cbad4: c1be3: goto f3b4d; c570c: $hasPhpVersionChanged = $currentPhpSettings->getPhpVersion() != $phpSettings->getPhpVersion(); goto E29e4; Bbe0a: $session = $request->getSession(); goto f0302; f0302: $domainName = $site->getDomainName(); goto F0767; Afff5: $phpSettings = $form->getData(); goto c570c; ad02d: if (!(true === $hasPhpVersionChanged)) { goto c1be3; } goto D2807; F0767: $siteEntity = $this->getSiteEntity($domainName); goto E7d37; F8b2a: $eventData = ["\163\151\164\145" => $domainName, "\x70\150\160\126\145\x72\x73\x69\x6f\156" => $phpSettings->getPhpVersion(), "\155\145\x6d\157\162\171\137\154\x69\x6d\x69\x74" => $phpSettings->getMemoryLimit(), "\155\x61\x78\137\145\x78\x65\x63\x75\164\x69\x6f\x6e\137\164\151\x6d\145" => $phpSettings->getMaxExecutionTime(), "\x6d\141\x78\137\x69\156\x70\165\164\x5f\164\x69\155\145" => $phpSettings->getMaxInputTime(), "\155\x61\x78\x5f\151\x6e\x70\x75\x74\137\x76\x61\162\x73" => $phpSettings->getMaxInputVars(), "\x70\157\x73\x74\x5f\155\x61\170\137\x73\x69\x7a\x65" => $phpSettings->getPostMaxSize(), "\165\x70\154\157\x61\144\x5f\155\141\170\137\x66\151\154\x65\163\151\x7a\145" => $phpSettings->getUploadMaxFileSize()]; goto E8f2b; e3233: $this->siteEntityManager->updateEntity($siteEntity); goto F8b2a; E29e4: $siteUpdater = $this->getSiteUpdater($site); goto ad02d; D2807: $siteUpdater->changePhpVersion($currentPhpSettings->getPhpVersion(), $phpSettings->getPhpVersion()); goto Cbad4; E8f2b: EventQueue::addEvent(EventQueue::EVENT_SITE_PHP_SETTINGS_UPDATE, $user, $eventData, $request); goto b90cc; d7eb7: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\141\156\x67\x65\x72", $this->translator->trans("\x41\156\x20\145\x72\x72\x6f\x72\40\150\x61\163\x20\x6f\143\x63\165\x72\x72\x65\x64\54\x20\x65\x72\162\x6f\x72\40\x6d\x65\x73\163\141\147\x65\x3a\40\x25\x65\162\x72\157\162\x4d\145\163\x73\x61\x67\x65\x25", ["\x25\145\x72\162\x6f\x72\115\145\x73\x73\141\147\x65\x25" => $e->getMessage()])); } goto fde37; C85a0: } private function getSite(Request $request) : ?Site { goto ce522; D76a5: $site->setPageSpeedSettings($siteEntity->getPageSpeedSettings()); goto b3408; A7c59: $resolvedDomainName = $this->domainNameParser->resolveDomainName($domainName); goto c567b; Cadb4: $site->setFtpUsers($siteEntity->getFtpUsers()); goto f4481; A44c3: $siteEntity = $this->getSiteEntity($domainName); goto B5e3f; F6039: $site->setBlockedIps($siteEntity->getBlockedIps()); goto D0b90; fd3c7: $subdomain = false === empty($subdomain) ? $subdomain : null; goto Ebc22; ec312: $site->setAllowTrafficFromCloudflareOnly($siteEntity->allowTrafficFromCloudflareOnly()); goto c9008; D0d70: if (!(UserEntity::ROLE_USER == $user->getRole() && false === $user->hasSite($siteEntity))) { goto fe015; } goto C9275; Aeab3: $site->setBlockedBots($siteEntity->getBlockedBots()); goto F6039; a2f87: $site->setUser($siteEntity->getUser()); goto C4ee7; ad51e: $site->setSubdomain($subdomain); goto B0aeb; E3de5: return $site; goto Acb73; Acc8b: cd854: goto Db2a8; e05c4: $site->setBasicAuth($siteEntity->getBasicAuth()); goto Aeab3; B0aeb: $site->setRootDirectory($siteEntity->getRootDirectory()); goto e05c4; eebec: $site->setRegistrableDomain($registrableDomain); goto ad51e; Ab4c8: $site->setCronJobs($siteEntity->getCronJobs()); goto Cadb4; ce522: $user = $this->getUser(); goto A88cc; f3f38: $site->setCertificates($siteEntity->getCertificates()); goto Ab4c8; dfa0d: $site->setVhostTemplate($siteEntity->getVhostTemplate()); goto ec312; B5e3f: $site = null; goto cfb97; D620b: $siteType = $siteEntity->getType(); goto f4c12; Db2a8: if (!(false === is_null($site))) { goto C1e89; } goto A7c59; C9275: return null; goto A2051; cfb97: if (!(false === is_null($siteEntity))) { goto ecf1f; } goto D0d70; ffc16: $site->setCertificate($siteEntity->getCertificate()); goto f3f38; b3408: C1e89: goto e45d6; B93a5: f7c65: goto Acc8b; A2051: fe015: goto D620b; Ec875: $site->setSshKeys($siteEntity->getSshKeys()); goto dfa0d; Ebc22: $siteDatabases = $this->getSiteDatabases($siteEntity); goto a2f87; c9008: $site->setPageSpeedEnabled($siteEntity->getPageSpeedEnabled()); goto D76a5; A88cc: $domainName = $request->get("\144\x6f\x6d\141\x69\156\x4e\141\x6d\x65"); goto A44c3; f4c12: switch ($siteType) { case SiteEntity::TYPE_NODEJS: goto F8e5a; F26e0: $site->setNodejsSettings($siteEntity->getNodejsSettings()); goto F40b1; F8e5a: $site = new NodejsSite(); goto F26e0; F40b1: goto cd854; goto Ed6fb; Ed6fb: case SiteEntity::TYPE_STATIC: $site = new StaticSite(); goto cd854; case SiteEntity::TYPE_PHP: goto Be8d4; cb1d9: $site->setPhpSettings($siteEntity->getPhpSettings()); goto Da633; Da633: $site->setVarnishCache($siteEntity->getVarnishCache()); goto e706c; Be8d4: $site = new PhpSite(); goto cb1d9; e706c: goto cd854; goto ed35e; ed35e: case SiteEntity::TYPE_PYTHON: goto c81d0; bd691: goto cd854; goto cf1ac; C856c: $site->setPythonSettings($siteEntity->getPythonSettings()); goto bd691; c81d0: $site = new PythonSite(); goto C856c; cf1ac: case SiteEntity::TYPE_REVERSE_PROXY: goto Afec3; c3672: goto cd854; goto Df81e; Afec3: $site = new ReverseProxySite(); goto B6550; B6550: $site->setReverseProxyUrl($siteEntity->getReverseProxyUrl()); goto c3672; Df81e: } goto B93a5; A88e5: $subdomain = $resolvedDomainName->subDomain()->toString(); goto fd3c7; c567b: $registrableDomain = $resolvedDomainName->registrableDomain()->toString(); goto A88e5; D0b90: $site->setDatabases($siteDatabases); goto ffc16; f4481: $site->setSshUsers($siteEntity->getSshUsers()); goto Ec875; C4ee7: $site->setDomainName($siteEntity->getDomainName()); goto eebec; e45d6: ecf1f: goto E3de5; Acb73: } private function getSiteDatabases(SiteEntity $siteEntity) : ?ArrayCollection { goto E17ab; E17ab: $siteDatabases = new ArrayCollection(); goto E7af8; E7af8: $activeDatabaseServerEntity = $this->databaseServerEntityManager->getActiveDatabaseServer(); goto B4f6f; E891f: foreach ($databaseEntities as $databaseEntity) { goto Ba68a; A339a: $siteDatabases->add($databaseEntity); goto cfbc9; D1067: if (!($databaseServerEntity->getId() == $activeDatabaseServerEntity->getId())) { goto Bdc5b; } goto A339a; f76bc: B48bb: goto b00de; cfbc9: Bdc5b: goto f76bc; Ba68a: $databaseServerEntity = $databaseEntity->getDatabaseServer(); goto D1067; b00de: } goto D0bb2; D0bb2: Adf50: goto bb496; B4f6f: $databaseEntities = $siteEntity->getDatabases(); goto E891f; bb496: return $siteDatabases; goto B6890; B6890: } private function getSiteUpdater(Site $site) : ?SiteUpdater { goto e8e53; C47a0: a0607: goto d98f7; d3e19: $siteType = $site->getType(); goto Cf426; Cf426: switch ($siteType) { case SiteEntity::TYPE_NODEJS: $siteUpdater = new NodejsSiteUpdater($site); goto a2aa5; case SiteEntity::TYPE_STATIC: $siteUpdater = new StaticSiteUpdater($site); goto a2aa5; case SiteEntity::TYPE_PHP: $siteUpdater = new PhpSiteUpdater($site); goto a2aa5; case SiteEntity::TYPE_PYTHON: $siteUpdater = new PythonSiteUpdater($site); goto a2aa5; case SiteEntity::TYPE_REVERSE_PROXY: $siteUpdater = new ReverseProxySiteUpdater($site); goto a2aa5; } goto C47a0; b3da8: return $siteUpdater; goto fa129; e8e53: $siteUpdater = null; goto d3e19; d98f7: a2aa5: goto b3da8; fa129: } protected function getSiteDeleter(Site $site) : ?SiteDeleter { goto c923b; dfcc5: switch ($siteType) { case SiteEntity::TYPE_NODEJS: $siteDeleter = new NodejsSiteDeleter($site); goto Ade1b; case SiteEntity::TYPE_STATIC: $siteDeleter = new StaticSiteDeleter($site); goto Ade1b; case SiteEntity::TYPE_PHP: $siteDeleter = new PhpSiteDeleter($site); goto Ade1b; case SiteEntity::TYPE_PYTHON: $siteDeleter = new PythonSiteDeleter($site); goto Ade1b; case SiteEntity::TYPE_REVERSE_PROXY: $siteDeleter = new ReverseProxySiteDeleter($site); goto Ade1b; } goto ea7f3; ea7f3: Bd4e6: goto a3b03; a3b03: Ade1b: goto e62e6; c923b: $siteDeleter = null; goto B6605; e62e6: return $siteDeleter; goto C9f3e; B6605: $siteType = $site->getType(); goto dfcc5; C9f3e: } private function getSiteEntity(string $domainName) : ?SiteEntity { $siteEntity = $this->siteEntityManager->findOneByDomainName($domainName); return $siteEntity; } }

Function Calls

None

Variables

None

Stats

MD5 819fc9826e2e78ca1e36e66fe6f3e707
Eval Count 0
Decode Time 176 ms