⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.247
Server IP:
45.79.8.107
Server:
Linux localhost 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.2-1ubuntu2.21
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
452945
/
root
/
usr
/
share
/
php
/
Twig
/
Extension
/
View File Name :
SandboxExtension.php
policy = $policy; $this->sandboxedGlobally = $sandboxed; } public function getTokenParsers(): array { return [new SandboxTokenParser()]; } public function getNodeVisitors(): array { return [new SandboxNodeVisitor()]; } public function enableSandbox(): void { $this->sandboxed = true; } public function disableSandbox(): void { $this->sandboxed = false; } public function isSandboxed(): bool { return $this->sandboxedGlobally || $this->sandboxed; } public function isSandboxedGlobally(): bool { return $this->sandboxedGlobally; } public function setSecurityPolicy(SecurityPolicyInterface $policy) { $this->policy = $policy; } public function getSecurityPolicy(): SecurityPolicyInterface { return $this->policy; } public function checkSecurity($tags, $filters, $functions): void { if ($this->isSandboxed()) { $this->policy->checkSecurity($tags, $filters, $functions); } } public function checkMethodAllowed($obj, $method, int $lineno = -1, Source $source = null): void { if ($this->isSandboxed()) { try { $this->policy->checkMethodAllowed($obj, $method); } catch (SecurityNotAllowedMethodError $e) { $e->setSourceContext($source); $e->setTemplateLine($lineno); throw $e; } } } public function checkPropertyAllowed($obj, $method, int $lineno = -1, Source $source = null): void { if ($this->isSandboxed()) { try { $this->policy->checkPropertyAllowed($obj, $method); } catch (SecurityNotAllowedPropertyError $e) { $e->setSourceContext($source); $e->setTemplateLine($lineno); throw $e; } } } public function ensureToStringAllowed($obj, int $lineno = -1, Source $source = null) { if ($this->isSandboxed() && \is_object($obj) && method_exists($obj, '__toString')) { try { $this->policy->checkMethodAllowed($obj, '__toString'); } catch (SecurityNotAllowedMethodError $e) { $e->setSourceContext($source); $e->setTemplateLine($lineno); throw $e; } } return $obj; } }