Twig\Sandbox\SecurityNotAllowedPropertyError

Calling "sSurveyUrl" property on a "Survey" object is not allowed in "__string_template__49d60551aa67aa57298068c9a575fdfd" at line 158.

/media/shnoulle/data/webdev/master/vendor/twig/twig/src/Sandbox/SecurityPolicy.php(121)

109     public function checkPropertyAllowed($obj, $property): void
110     {
111         $allowed = false;
112         foreach ($this->allowedProperties as $class => $properties) {
113             if ($obj instanceof $class && \in_array($property, \is_array($properties) ? $properties : [$properties])) {
114                 $allowed = true;
115                 break;
116             }
117         }
118 
119         if (!$allowed) {
120             $class = \get_class($obj);
121             throw new SecurityNotAllowedPropertyError(\sprintf('Calling "%s" property on a "%s" object is not allowed.', $property, $class), $class, $property);
122         }
123     }
124 }

Stack Trace

#0
+
 /media/shnoulle/data/webdev/master/vendor/twig/twig/src/Extension/SandboxExtension.php(110): Twig\Sandbox\SecurityPolicy->checkPropertyAllowed()
105 
106     public function checkPropertyAllowed($obj, $property, int $lineno = -1, ?Source $source = null): void
107     {
108         if ($this->isSandboxed($source)) {
109             try {
110                 $this->policy->checkPropertyAllowed($obj, $property);
111             } catch (SecurityNotAllowedPropertyError $e) {
112                 $e->setSourceContext($source);
113                 $e->setTemplateLine($lineno);
114 
115                 throw $e;
#1
+
 /media/shnoulle/data/webdev/master/vendor/twig/twig/src/Extension/CoreExtension.php(1576): Twig\Extension\SandboxExtension->checkPropertyAllowed()
1571         if (/* Template::METHOD_CALL */ 'method' !== $type) {
1572             $arrayItem = \is_bool($item) || \is_float($item) ? (int) $item : $item;
1573 
1574             if ($sandboxed && $object instanceof \ArrayAccess && !\in_array(get_class($object), self::ARRAY_LIKE_CLASSES, true)) {
1575                 try {
1576                     $env->getExtension(SandboxExtension::class)->checkPropertyAllowed($object, $arrayItem, $lineno, $source);
1577                 } catch (SecurityNotAllowedPropertyError $propertyNotAllowedError) {
1578                     goto methodCheck;
1579                 }
1580             }
1581 
#2
+
 /media/shnoulle/data/webdev/master/tmp/runtime/twig_cache/aa/aa11a0758884fd6f3c0b22d9314a7caa.php(285): Twig\Extension\CoreExtension::getAttribute()
280             yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["aSurveyInfo"] ?? null), "attr", [], "any", false, false, true, 156), "surveylistrowdivbdivulli", [], "any", false, false, true, 156), 156, $this->source);
281             yield ">
282                                                     <a
283                                                         href=\"";
284             // line 158
285             yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["oSurvey"], "sSurveyUrl", [], "any", false, false, true, 158), 158, $this->source);
286             yield "\"
287                                                         title=\"";
288             // line 159
289             yield gT("Start survey");
290             yield "\"
2024-11-10 18:51:41 nginx/1.22.1 Yii Framework/1.1.30