Exploit database

GH-25ed919a3c63ff26fc49a3fe47dc7565

datackmy/fallingskies-cve-2023-35885

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2023-35885

4 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files13

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

src/Controller/Admin/DoController.php

PHP · 21,393 bytes
<?php
 namespace App\Controller\Admin; use Symfony\Component\Form\FormError; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Form; use Twig\Environment as Twig; use App\Controller\Controller; use App\Entity\Manager\ConfigManager; use App\CloudPanel\Environment as CloudPanelEnvironment; use App\Event\EventQueue; class DoController extends Controller { public function settings(Request $request, ConfigManager $configManager) : Response { goto C3af6; bd822: Bf4dd: goto A2e5e; bbaf2: E917b: goto Dfd00; b4b3e: $accessTokenForm = $this->createAccessTokenForm($accessToken); goto Cb522; C3af6: $cloud = $configManager->get("\x63\x6c\x6f\x75\x64"); goto d4504; A091a: return $this->redirect($this->generateUrl("\x63\154\x70\137\141\x64\155\151\x6e\x5f\x75\163\145\162\163")); goto bd822; b56ea: $response = $this->render("\x41\x64\x6d\x69\156\x2f\104\x6f\x2f\123\x65\164\164\151\x6e\147\x73\x2f\151\156\x64\x65\x78\x2e\150\164\x6d\x6c\56\x74\167\x69\x67", ["\x61\143\x63\145\x73\163\124\157\x6b\x65\x6e\x46\157\x72\155" => $accessTokenForm->createView(), "\x73\x6e\141\x70\163\150\x6f\164\163\123\x65\x74\164\151\x6e\147\163\x46\x6f\162\x6d" => $snapshotsSettingsForm->createView(), "\146\157\x72\155\x45\x72\x72\157\162\x73" => $this->formErrors]); goto Bb02d; B8bdc: if (!(true === $request->isMethod("\120\x4f\123\124"))) { goto Aaddb; } goto c75a4; f59dc: $response = $this->handleAccessTokenForm($request, $accessTokenForm, $configManager); goto E8f54; Cb522: $snapshotsSettingsForm = $this->createSnapshotsSettingsForm($snapshotsSettings); goto B8bdc; b7a0e: if (!(true === $accessTokenForm->isSubmitted())) { goto Ab6f1; } goto f59dc; A2e5e: $accessToken = ["\x61\143\143\x65\x73\163\124\157\153\x65\x6e" => true === empty($configManager->get("\x64\157\x5f\141\143\x63\145\x73\x73\x5f\164\x6f\153\x65\x6e")) ? '' : sprintf("\x25\x73\x2a\52\52\52\x2a\52\x2a\x2a\x2a\x2a\52\x2a\52\52\x2a\52\x2a\x2a\52\x2a", substr($configManager->get("\x64\x6f\x5f\141\143\x63\x65\163\x73\137\x74\x6f\x6b\x65\156"), 0, -20))]; goto Dd345; d4504: if (!(CloudPanelEnvironment::CLOUD_PROVIDER_DO != $cloud)) { goto Bf4dd; } goto A091a; a0d74: Ab6f1: goto b6d2c; B4372: $snapshotsSettingsForm->handleRequest($request); goto b7a0e; e6544: if (!(false === is_null($response))) { goto Bf764; } goto F042e; b8985: B9047: goto a0d74; C397c: Bf764: goto bbaf2; c222e: return $response; goto b8985; Dfd00: Aaddb: goto b56ea; bb130: $response = $this->handleSnapshotsSettingsForm($request, $snapshotsSettingsForm, $configManager); goto e6544; F042e: return $response; goto C397c; Bb02d: return $response; goto a5827; c75a4: $accessTokenForm->handleRequest($request); goto B4372; E8f54: if (!(false === is_null($response))) { goto B9047; } goto c222e; Dd345: $snapshotsSettings = ["\x61\x75\164\157\155\x61\164\151\143\123\x6e\x61\160\x73\x68\x6f\x74\163" => (bool) $configManager->get("\144\x6f\137\141\x75\164\157\155\141\x74\151\x63\x5f\163\156\141\160\x73\x68\x6f\164\163"), "\146\x72\145\x71\165\145\156\143\171" => false === is_null($configManager->get("\144\157\137\163\156\141\x70\x73\x68\157\164\163\137\x66\x72\x65\x71\x75\x65\156\143\x79")) ? (int) $configManager->get("\x64\x6f\137\x73\x6e\141\x70\163\x68\x6f\x74\x73\137\146\162\x65\x71\x75\145\156\143\x79") : 12, "\162\145\x74\145\156\164\151\157\156\120\x65\x72\151\157\x64" => false === is_null($configManager->get("\x64\x6f\137\163\x6e\141\160\163\150\x6f\164\x73\137\x72\x65\x74\x65\x6e\164\151\157\x6e\x5f\160\145\x72\151\x6f\x64")) ? (int) $configManager->get("\144\157\137\163\156\141\x70\163\150\x6f\164\x73\137\x72\x65\x74\145\x6e\x74\x69\157\156\137\x70\145\162\151\157\x64") : 7]; goto b4b3e; b6d2c: if (!(true === $snapshotsSettingsForm->isSubmitted())) { goto E917b; } goto bb130; a5827: } private function createAccessTokenForm(array $data) : Form { goto e030d; e030d: $form = $this->createForm("\101\160\160\134\106\x6f\x72\x6d\134\101\x64\x6d\151\x6e\x44\x6f\x41\143\x63\x65\x73\x73\124\x6f\x6b\145\156\x54\x79\160\145", $data, ["\x61\x63\x74\151\x6f\156" => $this->generateUrl("\143\154\160\137\141\x64\x6d\151\156\x5f\144\x6f\x5f\x73\145\x74\x74\x69\156\x67\163"), "\155\145\x74\150\x6f\144" => "\x50\x4f\x53\124", "\x61\164\x74\x72" => []]); goto db576; f9f2f: return $form; goto Cd443; db576: $form->add("\163\165\142\x6d\151\x74", SubmitType::class, ["\x61\x74\164\x72" => ["\x63\154\x61\163\163" => "\x62\164\x6e\40\x62\x74\x6e\55\x62\154\165\x65\x20\142\x74\156\x2d\x6c\147"], "\x6c\141\142\145\154" => "\x53\x61\x76\145"]); goto f9f2f; Cd443: } private function handleAccessTokenForm(Request $request, Form $form, ConfigManager $configManager) { goto ff47c; b3c1f: c8a74: goto ab8f0; cde18: goto c8a74; goto A2afd; A2afd: b2a1a: goto f8d25; ff47c: $token = $form->get("\141\x63\x63\x65\x73\163\x54\x6f\153\145\x6e")->getData(); goto E79d4; a2a35: if (!(false === $isAccessTokenValid)) { goto a5a6e; } goto bc949; E79d4: $isAccessTokenValid = $this->validateAccessToken($request, $token); goto a2a35; f8d25: try { goto Fbc0f; fb1a7: $session = $request->getSession(); goto Bf394; ca1f7: $session->getFlashBag()->set("\x73\165\143\143\145\x73\163", $this->translator->trans("\x41\x63\x63\145\x73\x73\40\124\x6f\153\x65\156\x20\150\x61\163\40\x62\x65\x65\x6e\x20\163\141\x76\x65\x64\x2e")); goto c22d9; c22d9: $response = $this->redirect($this->generateUrl("\x63\x6c\x70\137\x61\144\155\x69\x6e\137\144\x6f\137\163\145\x74\x74\151\156\147\x73")); goto C6b49; Db639: EventQueue::addEvent(EventQueue::EVENT_DO_ACCESS_TOKEN_UPDATE, $user, $eventData, $request); goto ca1f7; a4d8f: $eventData = ["\x61\x63\x63\x65\x73\163\x54\157\153\145\x6e" => sprintf("\x25\163\x2a\52\x2a\x2a", substr($token, 0, -4))]; goto Db639; Fbc0f: $user = $this->getUser(); goto fb1a7; C6b49: return $response; goto Ec2ee; Bf394: $configManager->set("\144\x6f\137\x61\x63\x63\145\x73\163\x5f\x74\157\x6b\145\x6e", $token); goto a4d8f; Ec2ee: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\x61\156\147\145\162", $this->translator->trans("\x41\x6e\40\145\162\x72\157\x72\40\x68\141\x73\x20\157\143\x63\x75\x72\x72\x65\144\x2c\x20\145\162\162\x6f\162\40\155\145\163\x73\141\147\145\x3a\40\45\145\x72\162\157\x72\x4d\145\x73\163\x61\147\x65\45", ["\x25\145\x72\162\157\x72\x4d\145\163\x73\x61\x67\x65\45" => $e->getMessage()])); } goto b3c1f; bc949: $form->addError(new FormError($this->translator->trans("\101\143\x63\145\x73\x73\40\x54\x6f\x6b\x65\x6e\x20\151\x73\x20\x6e\x6f\x74\40\x76\x61\154\x69\x64\56"))); goto dc9e8; D4a94: if (true === $form->isValid()) { goto b2a1a; } goto ab064; ab064: $this->formErrors = $this->getErrorMessages($form); goto cde18; dc9e8: a5a6e: goto D4a94; ab8f0: } private function createSnapshotsSettingsForm(array $data) : Form { goto e1e90; ecdb6: $form->add("\163\x75\x62\155\x69\164", SubmitType::class, ["\141\x74\164\162" => ["\x63\x6c\141\x73\x73" => "\x62\164\x6e\40\x62\x74\156\x2d\142\x6c\165\145\x20\x62\x74\156\x2d\154\147"], "\154\141\142\x65\154" => "\123\x61\x76\145"]); goto B126b; e1e90: $form = $this->createForm("\x41\x70\x70\134\106\157\x72\x6d\134\101\144\x6d\x69\x6e\x44\157\x53\156\141\160\x73\150\x6f\x74\163\123\x65\x74\164\151\156\x67\x73\x54\171\160\x65", $data, ["\141\x63\164\151\x6f\x6e" => $this->generateUrl("\143\x6c\x70\137\x61\144\155\151\x6e\137\144\x6f\x5f\x73\x65\164\x74\x69\156\147\163"), "\x6d\145\x74\150\x6f\144" => "\x50\117\x53\x54", "\141\x74\164\162" => []]); goto ecdb6; B126b: return $form; goto Fbcad; Fbcad: } private function handleSnapshotsSettingsForm(Request $request, Form $form, ConfigManager $configManager) { goto C8241; e543e: goto a9ca8; goto E1401; E22de: a9ca8: goto a5685; C8241: if (true === $form->isValid()) { goto e3c8a; } goto eab34; eab34: $this->formErrors = $this->getErrorMessages($form); goto e543e; E1401: e3c8a: goto Aff05; Aff05: try { goto dfdcc; b172d: $response = $this->redirect($this->generateUrl("\143\154\x70\137\141\x64\155\x69\x6e\137\144\x6f\x5f\x73\145\x74\x74\x69\x6e\147\x73")); goto Ba157; B4a60: $eventData = ["\141\165\164\157\155\141\x74\151\143\123\156\141\x70\x73\150\157\164\x73" => $automaticSnapshots, "\146\x72\145\161\x75\145\156\x63\171" => $frequency, "\162\x65\x74\x65\156\x74\151\157\156\120\145\162\151\157\144" => $retentionPeriod]; goto c22ce; Ba157: return $response; goto C9404; C66f2: $configManager->set("\144\x6f\137\x73\156\x61\x70\163\x68\x6f\x74\163\x5f\146\162\x65\x71\x75\145\x6e\x63\171", $frequency); goto b669e; F009a: $frequency = (int) $form->get("\146\x72\145\x71\x75\145\156\x63\x79")->getData(); goto Add78; Add78: $retentionPeriod = (int) $form->get("\162\x65\x74\x65\x6e\164\x69\x6f\156\120\145\162\151\x6f\x64")->getData(); goto ace94; D3ff4: $automaticSnapshots = (int) $form->get("\141\x75\164\157\x6d\141\164\x69\143\123\x6e\x61\160\x73\150\157\x74\163")->getData(); goto F009a; ab089: $session = $request->getSession(); goto D3ff4; ace94: $configManager->set("\144\x6f\137\141\165\164\x6f\x6d\x61\164\151\143\x5f\x73\x6e\x61\x70\163\150\157\x74\x73", $automaticSnapshots); goto C66f2; dfdcc: $user = $this->getUser(); goto ab089; b669e: $configManager->set("\144\157\x5f\x73\156\141\160\x73\150\157\x74\163\137\162\145\164\x65\x6e\x74\x69\157\156\x5f\x70\x65\162\151\157\x64", $retentionPeriod); goto B4a60; c22ce: EventQueue::addEvent(EventQueue::EVENT_DO_SNAPSHOTS_SETTINGS_UPDATE, $user, $eventData, $request); goto F41f9; F41f9: $session->getFlashBag()->set("\x73\x75\x63\143\145\x73\163", $this->translator->trans("\123\x6e\141\160\x73\x68\x6f\164\163\40\x53\x65\x74\x74\151\x6e\x67\163\40\x68\141\x76\x65\x20\142\145\145\156\x20\x73\141\x76\145\144\56")); goto b172d; C9404: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\144\x61\x6e\x67\145\x72", $this->translator->trans("\101\156\40\x65\162\x72\x6f\x72\40\x68\x61\163\40\x6f\x63\x63\x75\x72\162\x65\144\54\x20\145\x72\x72\x6f\x72\x20\x6d\145\163\163\x61\x67\x65\x3a\x20\45\x65\x72\162\157\162\x4d\145\x73\x73\x61\x67\x65\x25", ["\x25\x65\x72\162\x6f\x72\x4d\x65\x73\x73\x61\x67\x65\x25" => $e->getMessage()])); } goto E22de; a5685: } public function snapshots(Request $request, ConfigManager $configManager) : Response { goto Aa121; Bc0e7: return $response; goto Bb8df; Aa121: $cloud = $configManager->get("\143\x6c\x6f\165\x64"); goto Eaefd; E84b3: return $this->redirect($this->generateUrl("\143\154\x70\x5f\x61\144\155\x69\156\137\165\163\x65\162\163")); goto Aab59; aec3f: $response = $this->render("\101\x64\x6d\x69\156\x2f\x44\157\x2f\123\x6e\141\x70\x73\150\157\x74\x73\57\151\156\x64\145\x78\56\x68\164\155\154\x2e\x74\167\x69\147", ["\146\x6f\162\x6d\105\x72\x72\x6f\x72\163" => $this->formErrors]); goto Bc0e7; Eaefd: if (!(CloudPanelEnvironment::CLOUD_PROVIDER_DO != $cloud)) { goto cc060; } goto E84b3; Aab59: cc060: goto aec3f; Bb8df: } public function loadSnapshots(Request $request, ConfigManager $configManager, Twig $twig) : Response { goto c295d; F0f9c: return $this->json($data); goto dec6c; dce7b: B2cb0: goto F0f9c; f5777: if (!(true === $request->isXmlHttpRequest())) { goto B2cb0; } goto E8705; c295d: $data = []; goto f5777; E8705: try { goto E68dd; fc1be: $snapshots = $doClient->getSnapshotsForDroplet(); goto c8c27; e5581: if (!(false === empty($accessToken))) { goto cfd5a; } goto c74b4; be311: $doClient = $instance->getDoClient(); goto fc1be; c74b4: $instance = $request->attributes->get("\151\x6e\x73\x74\x61\x6e\143\x65"); goto be311; A2e19: cfd5a: goto ee1ad; E68dd: $user = $this->getUser(); goto af4da; A5266: $data["\x73\x6e\x61\160\x73\150\157\164\163\110\164\155\x6c"] = $snapshotsHtml; goto ec115; af4da: $snapshots = []; goto A1a11; c8c27: usort($snapshots, function ($a, $b) { return $a->getCreatedAt() < $b->getCreatedAt(); }); goto A2e19; ee1ad: $snapshotsHtml = $twig->render("\x41\144\155\x69\x6e\x2f\104\157\x2f\123\156\x61\160\x73\150\157\164\163\57\163\156\141\160\163\x68\157\x74\163\55\x6c\x69\163\x74\x2e\x68\164\x6d\154\56\x74\x77\x69\x67", ["\x75\x73\145\x72" => $user, "\x73\156\x61\160\163\x68\x6f\164\163" => $snapshots]); goto A5266; A1a11: $accessToken = $configManager->get("\144\x6f\137\141\x63\x63\x65\x73\163\137\x74\x6f\x6b\x65\156"); goto e5581; ec115: } catch (\Exception $e) { $errorMessage = $twig->render("\x41\x64\x6d\151\x6e\57\104\157\57\120\x61\162\164\151\141\x6c\57\x65\162\162\x6f\x72\55\x6d\x65\163\163\x61\x67\145\56\150\164\155\154\56\x74\x77\151\x67", ["\x65\x72\x72\157\x72\x4d\145\163\163\141\147\x65" => $e->getMessage()]); $data["\x65\162\x72\157\x72\115\x65\x73\x73\x61\147\145"] = $errorMessage; } goto dce7b; dec6c: } public function createSnapshot(Request $request, ConfigManager $configManager) : Response { goto Ced8f; F5a17: $response = $this->handleCreateSnapshotForm($request, $form, $configManager); goto d759d; D40e0: return $this->redirect($this->generateUrl("\143\x6c\160\x5f\x61\x64\x6d\x69\156\x5f\165\163\145\162\x73")); goto f9f4c; Eb631: if (!(CloudPanelEnvironment::CLOUD_PROVIDER_DO != $cloud)) { goto ad6a8; } goto D40e0; a0c33: if (!(true === $request->isMethod("\120\x4f\x53\124"))) { goto b14c2; } goto e59a4; E7e01: return $response; goto D3332; a15f8: abd60: goto Cc773; e6289: try { goto aef6f; e4f85: cb2e1: goto adb22; Bbcf1: $doClient = $instance->getDoClient(); goto f8c86; C2a10: if (false === empty($dropletName)) { goto cb2e1; } goto a9827; af039: $dropletId = $droplet->getId(); goto e6b86; C1822: goto ff12f; goto e4f85; e6b86: $dateTime = new \DateTime(); goto b7ea9; f8c86: $droplet = $doClient->getDroplet(); goto af039; aef6f: $session = $request->getSession(); goto Bbcf1; B24f3: ff12f: goto Fd110; a9827: $data["\x6e\x61\x6d\145"] = sprintf("\45\163\55\x25\163", $dropletId, $dateTime->getTimestamp()); goto C1822; adb22: $data["\156\x61\x6d\x65"] = sprintf("\x25\x73\x2d\x25\x73", $dropletName, $dateTime->getTimestamp()); goto B24f3; b7ea9: $dropletName = $droplet->getName(); goto C2a10; Fd110: } catch (\Exception $e) { goto B846e; D196f: return $response; goto D5e47; D5e47: ef717: goto F7da1; B9445: $response = $this->redirect($this->generateUrl("\143\154\160\137\141\144\155\x69\156\x5f\x64\x6f\137\x73\145\164\x74\x69\156\147\x73")); goto D196f; B846e: if (!(401 == $e->getCode())) { goto ef717; } goto fb9e9; fb9e9: $session->getFlashBag()->set("\x64\141\156\x67\x65\x72", $this->translator->trans("\x41\x63\143\145\x73\163\x20\x54\x6f\x6b\145\156\40\151\163\x20\156\x6f\x74\40\x76\x61\x6c\151\x64\x2e")); goto B9445; F7da1: } goto Bab64; B49d1: if (!(true === $form->isSubmitted())) { goto abd60; } goto F5a17; Ce5a0: $instance = $request->attributes->get("\x69\x6e\x73\x74\141\156\x63\x65"); goto A9915; e59a4: $form->handleRequest($request); goto B49d1; E2aab: return $response; goto d017e; Ced8f: $cloud = $configManager->get("\x63\x6c\x6f\165\144"); goto Eb631; d759d: if (!(false === is_null($response))) { goto c8f2c; } goto E2aab; c476d: $data = []; goto Ce5a0; Bab64: fc4a2: goto b33cb; b33cb: $form = $this->createSnapshotForm($data); goto a0c33; E1b58: $response = $this->render("\101\x64\155\151\x6e\x2f\x44\157\x2f\x53\156\141\x70\163\x68\x6f\x74\163\x2f\143\x72\x65\x61\164\145\x2e\150\x74\155\x6c\56\x74\167\151\147", ["\146\x6f\x72\155\105\x72\162\157\162\x73" => $this->formErrors, "\146\157\162\x6d" => $form->createView()]); goto E7e01; A9915: if (!(false === $request->isMethod("\120\x4f\123\124"))) { goto fc4a2; } goto e6289; d017e: c8f2c: goto a15f8; Cc773: b14c2: goto E1b58; f9f4c: ad6a8: goto c476d; D3332: } private function createSnapshotForm(array $data) : Form { goto ea0a8; c3a82: $form->add("\x73\x75\142\x6d\151\x74", SubmitType::class, ["\141\x74\164\x72" => ["\x63\154\x61\163\163" => "\142\164\156\x20\x62\164\x6e\x2d\x62\154\x75\x65\x20\142\x74\x6e\x2d\x6c\147"], "\x6c\141\x62\x65\x6c" => "\x43\162\145\141\164\x65"]); goto B1e7f; ea0a8: $form = $this->createForm("\101\160\x70\134\106\x6f\x72\155\134\101\144\155\x69\156\104\157\123\x6e\141\x70\163\150\157\x74\124\x79\160\145", $data, ["\x61\x63\x74\x69\x6f\156" => $this->generateUrl("\143\x6c\x70\x5f\x61\x64\x6d\151\156\137\144\x6f\137\x73\156\141\x70\x73\x68\x6f\x74\137\143\x72\145\x61\164\145"), "\x6d\145\164\150\157\x64" => "\x50\117\x53\124", "\141\x74\164\162" => []]); goto c3a82; B1e7f: return $form; goto c3165; c3165: } private function handleCreateSnapshotForm(Request $request, Form $form, ConfigManager $configManager) { goto B4dd1; B1164: $this->formErrors = $this->getErrorMessages($form); goto A7e8f; B4dd1: if (true === $form->isValid()) { goto aa611; } goto B1164; A7e8f: goto bb445; goto e250a; Ed5c2: bb445: goto D9438; e250a: aa611: goto C2966; C2966: try { goto e0be5; F7134: $eventData = ["\163\156\x61\x70\163\x68\157\164\116\141\x6d\x65" => $snapshotName]; goto e5fcd; Ac8cb: be955: goto De080; e0be5: $user = $this->getUser(); goto ef31c; A85e6: $droplet = $doClient->getDroplet(); goto f1121; d657a: return $response; goto F41ef; B9c2d: $response = $this->redirect($this->generateUrl("\x63\154\x70\x5f\x61\x64\155\x69\156\x5f\144\157\137\163\156\x61\160\163\x68\x6f\x74\x73")); goto d657a; Bdcbe: if (!(false === empty($dropletVolumeIds))) { goto c4adc; } goto bd475; ef31c: $session = $request->getSession(); goto Ac861; aa9ff: $doClient->createDropletSnapshot($snapshotName); goto f5d80; f1121: $snapshotName = $form->get("\x6e\141\x6d\x65")->getData(); goto aa9ff; Ac861: $instance = $request->attributes->get("\151\x6e\x73\164\141\156\143\x65"); goto Fd232; Fd232: $doClient = $instance->getDoClient(); goto A85e6; Add43: $session->getFlashBag()->set("\163\x75\x63\143\145\163\163", $this->translator->trans("\x53\156\141\x70\x73\x68\157\x74\40\x69\163\x20\x62\145\x69\x6e\x67\40\143\x72\x65\141\164\x65\144\56")); goto B9c2d; bd475: foreach ($dropletVolumeIds as $dropletVolumeId) { $doClient->createVolumeSnapshot($dropletVolumeId); F2888: } goto Ac8cb; e5fcd: EventQueue::addEvent(EventQueue::EVENT_DO_SNAPSHOT_CREATE, $user, $eventData, $request); goto Add43; f5d80: $dropletVolumeIds = $droplet->getVolumeIds(); goto Bdcbe; De080: c4adc: goto F7134; F41ef: } catch (\Exception $e) { $this->logger->exception($e); $session->getFlashBag()->set("\x64\x61\x6e\147\x65\x72", $this->translator->trans("\x41\156\40\145\162\x72\x6f\x72\40\150\x61\163\x20\157\143\143\x75\162\x72\145\144\x2c\x20\x65\162\x72\x6f\162\x20\155\x65\x73\163\141\x67\145\72\x20\45\x65\x72\x72\x6f\162\x4d\x65\163\163\x61\x67\145\45", ["\45\x65\162\x72\x6f\x72\115\145\163\x73\x61\147\x65\45" => $e->getMessage()])); } goto Ed5c2; D9438: } public function deleteSnapshot(Request $request, ConfigManager $configManager) : Response { goto a6d75; ed01d: if (!(CloudPanelEnvironment::CLOUD_PROVIDER_DO != $cloud)) { goto C10ed; } goto B8fc2; D8792: if (!(false === empty($id))) { goto b639d; } goto db254; A07ac: b639d: goto F709d; E965d: C10ed: goto Efada; f07f0: return $response; goto C6aeb; db254: try { goto B3497; E78ad: $instance = $request->attributes->get("\151\156\x73\x74\x61\x6e\x63\x65"); goto C00e2; dddf7: if (!(false === is_null($snapshot))) { goto Dc657; } goto cfe1c; E135d: $session->getFlashBag()->set("\x73\x75\x63\x63\x65\x73\163", $this->translator->trans("\x53\156\x61\160\163\x68\x6f\164\40\x69\163\40\x62\x65\x69\x6e\147\x20\x64\145\x6c\x65\164\x65\144\56")); goto f2582; D0110: $snapshot = $doClient->getDropletSnapshot($id); goto dddf7; C00e2: $doClient = $instance->getDoClient(); goto D0110; cfe1c: $doClient->deleteDropletSnapshot($id); goto Ef037; f2582: Dc657: goto C71ee; d3ca5: EventQueue::addEvent(EventQueue::EVENT_DO_SNAPSHOT_DELETE, $user, $eventData, $request); goto E135d; e39f8: $user = $this->getUser(); goto E78ad; Ef037: $eventData = ["\163\x6e\141\160\163\x68\157\164\111\144" => $snapshot->getId(), "\163\x6e\141\x70\163\150\157\164\116\x61\x6d\x65" => $snapshot->getName()]; goto d3ca5; B3497: $session = $request->getSession(); goto e39f8; C71ee: } catch (\Exception $e) { $session->getFlashBag()->set("\144\x61\156\147\145\162", $this->translator->trans("\101\x6e\40\145\162\x72\x6f\x72\40\150\141\163\x20\x6f\143\x63\x75\x72\162\x65\x64\54\40\x65\x72\x72\157\x72\40\x6d\145\x73\x73\141\147\145\x3a\40\x25\x65\x72\x72\157\x72\x4d\145\x73\163\x61\x67\x65\45", ["\x25\x65\162\x72\x6f\162\115\x65\163\163\x61\x67\145\45" => $e->getMessage()])); } goto A07ac; B8fc2: return $this->redirect($this->generateUrl("\x63\154\160\x5f\141\144\155\x69\x6e\137\165\163\x65\x72\163")); goto E965d; Efada: $id = trim($request->get("\x69\x64")); goto D8792; a6d75: $cloud = $configManager->get("\143\154\157\165\x64"); goto ed01d; F709d: $response = $this->redirect($this->generateUrl("\143\x6c\x70\137\141\144\x6d\x69\x6e\137\144\157\137\163\x6e\141\x70\163\150\x6f\x74\163")); goto f07f0; C6aeb: } private function validateAccessToken(Request $request, $token) : bool { try { goto e5078; A0e38: d9ecb: goto F7472; a864e: $instance = $request->attributes->get("\x69\x6e\163\164\141\156\x63\x65"); goto f346c; f346c: $doClient = clone $instance->getDoClient(); goto B7d18; e5078: $isAccessTokenValid = false; goto a864e; D8a6b: $dropletData = $doClient->getDroplet(); goto a490a; af017: $isAccessTokenValid = true; goto A0e38; B7d18: $doClient->unsetHttpClient(); goto d38b3; a490a: if (!(false === empty($dropletData))) { goto d9ecb; } goto af017; d38b3: $doClient->setToken($token); goto D8a6b; F7472: } catch (\Exception $e) { } return $isAccessTokenValid; } }