var/cache/dev/twig/d2/d27da9cd174cae14acac33ee54178fb3.php line 56

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* @PimcoreAdmin/Admin/Login/login.html.twig */
  16. class __TwigTemplate_61d471fb17c559447072a92a263a1c5f extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->blocks = [
  28.             'content' => [$this'block_content'],
  29.             'below_footer' => [$this'block_below_footer'],
  30.         ];
  31.         $this->sandbox $this->extensions[SandboxExtension::class];
  32.         $this->checkSecurity();
  33.     }
  34.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  35.     {
  36.         // line 1
  37.         return "@PimcoreAdmin/Admin/Login/layout.html.twig";
  38.     }
  39.     protected function doDisplay(array $context, array $blocks = []): iterable
  40.     {
  41.         $macros $this->macros;
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@PimcoreAdmin/Admin/Login/login.html.twig"));
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@PimcoreAdmin/Admin/Login/login.html.twig"));
  46.         $this->parent $this->loadTemplate("@PimcoreAdmin/Admin/Login/layout.html.twig""@PimcoreAdmin/Admin/Login/login.html.twig"1);
  47.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  48.         
  49.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  50.         
  51.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  52.     }
  53.     // line 3
  54.     /**
  55.      * @return iterable<null|scalar|\Stringable>
  56.      */
  57.     public function block_content(array $context, array $blocks = []): iterable
  58.     {
  59.         $macros $this->macros;
  60.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  61.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  62.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  63.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  64.         // line 4
  65.         yield "<div id=\"loginform\">
  66.     <form id=\"form-element\" method=\"post\" action=\"";
  67.         // line 5
  68.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pimcore_admin_login_check", ["perspective" => Twig\Extension\CoreExtension::striptags($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'5$this->source); })()), "request", [], "any"falsefalsetrue5), "get", ["perspective"], "method"falsefalsetrue5), 5$this->source))]), "html"nulltrue);
  69.         yield "\">
  70.         ";
  71.         // line 7
  72.         if (array_key_exists("error"$context)) {
  73.             // line 8
  74.             yield "        <div class=\"text error\">
  75.             ";
  76.             // line 9
  77.             yield $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->sandbox->ensureToStringAllowed((isset($context["error"]) || array_key_exists("error"$context) ? $context["error"] : (function () { throw new RuntimeError('Variable "error" does not exist.'9$this->source); })()), 9$this->source), [], "admin");
  78.             yield "
  79.         </div>
  80.         ";
  81.         }
  82.         // line 12
  83.         yield "
  84.         <input type=\"text\" name=\"username\" autocomplete=\"username\" placeholder=\"";
  85.         // line 13
  86.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("username", [], "admin"), "html"nulltrue);
  87.         yield "\" required autofocus>
  88.         <input type=\"password\" name=\"password\" autocomplete=\"current-password\" placeholder=\"";
  89.         // line 14
  90.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("password", [], "admin"), "html"nulltrue);
  91.         yield "\" required>
  92.         <input type=\"hidden\" name=\"csrfToken\" id=\"csrfToken\" value=\"";
  93.         // line 15
  94.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->source, (isset($context["pimcore_csrf"]) || array_key_exists("pimcore_csrf"$context) ? $context["pimcore_csrf"] : (function () { throw new RuntimeError('Variable "pimcore_csrf" does not exist.'15$this->source); })()), "getCsrfToken", [], "method"falsefalsetrue15), 15$this->source), "html"nulltrue);
  95.         yield "\">
  96.         <button type=\"submit\">";
  97.         // line 17
  98.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("login", [], "admin"), "html"nulltrue);
  99.         yield "</button>
  100.     </form>
  101.     <a href=\"";
  102.         // line 20
  103.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pimcore_admin_login_lostpassword");
  104.         yield "\" class=\"lostpassword\">";
  105.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Forgot your password", [], "admin"), "html"nulltrue);
  106.         yield "?</a>
  107. </div>
  108. ";
  109.         // line 23
  110.         if ( !(isset($context["browserSupported"]) || array_key_exists("browserSupported"$context) ? $context["browserSupported"] : (function () { throw new RuntimeError('Variable "browserSupported" does not exist.'23$this->source); })())) {
  111.             // line 24
  112.             yield "<div id=\"browserinfo\">
  113.     <div class=\"text\">
  114.         ";
  115.             // line 26
  116.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Your browser is not supported. Please install the latest version of one of the following browsers.", [], "admin"), "html"nulltrue);
  117.             yield "
  118.     </div>
  119.     <div class=\"text browserinfo\">
  120.         <a href=\"https://www.google.com/chrome\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Chrome\"><img src=\"/bundles/pimcoreadmin/img/login/chrome.svg\" alt=\"Chrome\"/></a>
  121.         <a href=\"https://www.mozilla.org/firefox\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Firefox\"><img src=\"/bundles/pimcoreadmin/img/login/firefox.svg\" alt=\"Firefox\"/></a>
  122.         <a href=\"https://www.apple.com/safari\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Safari\"><img src=\"/bundles/pimcoreadmin/img/login/safari.svg\" alt=\"Safari\"/></a>
  123.         <a href=\"https://www.microsoft.com/edge\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Edge\"><img src=\"/bundles/pimcoreadmin/img/login/edge.svg\" alt=\"Edge\"/></a>
  124.     </div>
  125.     <a href=\"#\" onclick=\"showLogin();\">";
  126.             // line 36
  127.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Click here to proceed", [], "admin"), "html"nulltrue);
  128.             yield "</a>
  129. </div>
  130. <script type=\"text/javascript\">
  131.     function showLogin() {
  132.         document.getElementById('loginform').style.display = 'block';
  133.         document.getElementById('browserinfo').style.display = 'none';
  134.     }
  135. </script>
  136. <style type=\"text/css\">
  137.     #loginform {
  138.         display: none;
  139.     }
  140. </style>
  141. ";
  142.         }
  143.         
  144.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  145.         
  146.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  147.         yield from [];
  148.     }
  149.     // line 53
  150.     /**
  151.      * @return iterable<null|scalar|\Stringable>
  152.      */
  153.     public function block_below_footer(array $context, array $blocks = []): iterable
  154.     {
  155.         $macros $this->macros;
  156.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  157.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""below_footer"));
  158.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  159.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""below_footer"));
  160.         // line 54
  161.         yield "<script ";
  162.         yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->source, (isset($context["pimcore_csp"]) || array_key_exists("pimcore_csp"$context) ? $context["pimcore_csp"] : (function () { throw new RuntimeError('Variable "pimcore_csp" does not exist.'54$this->source); })()), "getNonceHtmlAttribute", [], "method"falsefalsetrue54), 54$this->source);
  163.         yield ">
  164.     ";
  165.         // line 55
  166.         if ( !array_key_exists("deeplink"$context)) {
  167.             // line 56
  168.             yield "    // clear opened tabs store
  169.     localStorage.removeItem(\"pimcore_opentabs\");
  170.     ";
  171.         }
  172.         // line 59
  173.         yield "
  174.     // hide symfony toolbar by default
  175.     var symfonyToolbarKey = 'symfony/profiler/toolbar/displayState';
  176.     if(!window.localStorage.getItem(symfonyToolbarKey)) {
  177.         window.localStorage.setItem(symfonyToolbarKey, 'none');
  178.     }
  179.     // CSRF token refresh
  180.     var formElement = document.getElementById('form-element');
  181.     var csrfRefreshInProgress = false;
  182.     function refreshCsrfToken() {
  183.         csrfRefreshInProgress = true;
  184.         formElement.style.opacity = '0.3';
  185.         var request = new XMLHttpRequest();
  186.         request.open('GET', '";
  187.         // line 74
  188.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pimcore_admin_login_csrf_token");
  189.         yield "');
  190.         request.onload = function () {
  191.             if (this.status >= 200 && this.status < 400) {
  192.                 var res = JSON.parse(this.response);
  193.                 document.getElementById('csrfToken').setAttribute('value', res['csrfToken']);
  194.                 formElement.style.opacity = '1';
  195.                 csrfRefreshInProgress = false;
  196.             }
  197.         };
  198.         request.send();
  199.     }
  200.     document.addEventListener('visibilitychange', function(ev) {
  201.         if(document.visibilityState === 'visible') {
  202.             refreshCsrfToken();
  203.         }
  204.     });
  205.     window.setInterval(refreshCsrfToken, ";
  206.         // line 90
  207.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed((isset($context["csrfTokenRefreshInterval"]) || array_key_exists("csrfTokenRefreshInterval"$context) ? $context["csrfTokenRefreshInterval"] : (function () { throw new RuntimeError('Variable "csrfTokenRefreshInterval" does not exist.'90$this->source); })()), 90$this->source), "html"nulltrue);
  208.         yield ");
  209.     formElement.addEventListener(\"submit\", function(evt) {
  210.         if(csrfRefreshInProgress) {
  211.             evt.preventDefault();
  212.         }
  213.     }, true);
  214. </script>
  215. ";
  216.         // line 99
  217.         yield $this->extensions['Pimcore\Twig\Extension\HelpersExtension']->breachAttackRandomContent();
  218.         yield "
  219. ";
  220.         
  221.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  222.         
  223.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  224.         yield from [];
  225.     }
  226.     /**
  227.      * @codeCoverageIgnore
  228.      */
  229.     public function getTemplateName(): string
  230.     {
  231.         return "@PimcoreAdmin/Admin/Login/login.html.twig";
  232.     }
  233.     /**
  234.      * @codeCoverageIgnore
  235.      */
  236.     public function isTraitable(): bool
  237.     {
  238.         return false;
  239.     }
  240.     /**
  241.      * @codeCoverageIgnore
  242.      */
  243.     public function getDebugInfo(): array
  244.     {
  245.         return array (  247 => 99,  235 => 90,  216 => 74,  199 => 59,  194 => 56,  192 => 55,  187 => 54,  174 => 53,  147 => 36,  134 => 26,  130 => 24,  128 => 23,  120 => 20,  114 => 17,  109 => 15,  105 => 14,  101 => 13,  98 => 12,  92 => 9,  89 => 8,  87 => 7,  82 => 5,  79 => 4,  66 => 3,  43 => 1,);
  246.     }
  247.     public function getSourceContext(): Source
  248.     {
  249.         return new Source("{% extends '@PimcoreAdmin/Admin/Login/layout.html.twig' %}
  250. {% block content %}
  251. <div id=\"loginform\">
  252.     <form id=\"form-element\" method=\"post\" action=\"{{ path('pimcore_admin_login_check', {'perspective' : app.request.get('perspective')|striptags}) }}\">
  253.         {% if error is defined %}
  254.         <div class=\"text error\">
  255.             {{ error|trans([],'admin')|raw }}
  256.         </div>
  257.         {% endif %}
  258.         <input type=\"text\" name=\"username\" autocomplete=\"username\" placeholder=\"{{ 'username'|trans([], 'admin') }}\" required autofocus>
  259.         <input type=\"password\" name=\"password\" autocomplete=\"current-password\" placeholder=\"{{ 'password'|trans([], 'admin') }}\" required>
  260.         <input type=\"hidden\" name=\"csrfToken\" id=\"csrfToken\" value=\"{{ pimcore_csrf.getCsrfToken() }}\">
  261.         <button type=\"submit\">{{ 'login'|trans([], 'admin') }}</button>
  262.     </form>
  263.     <a href=\"{{ path('pimcore_admin_login_lostpassword') }}\" class=\"lostpassword\">{{ 'Forgot your password'|trans([], 'admin') }}?</a>
  264. </div>
  265. {% if not browserSupported %}
  266. <div id=\"browserinfo\">
  267.     <div class=\"text\">
  268.         {{ 'Your browser is not supported. Please install the latest version of one of the following browsers.'|trans([], 'admin') }}
  269.     </div>
  270.     <div class=\"text browserinfo\">
  271.         <a href=\"https://www.google.com/chrome\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Chrome\"><img src=\"/bundles/pimcoreadmin/img/login/chrome.svg\" alt=\"Chrome\"/></a>
  272.         <a href=\"https://www.mozilla.org/firefox\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Firefox\"><img src=\"/bundles/pimcoreadmin/img/login/firefox.svg\" alt=\"Firefox\"/></a>
  273.         <a href=\"https://www.apple.com/safari\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Safari\"><img src=\"/bundles/pimcoreadmin/img/login/safari.svg\" alt=\"Safari\"/></a>
  274.         <a href=\"https://www.microsoft.com/edge\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"Edge\"><img src=\"/bundles/pimcoreadmin/img/login/edge.svg\" alt=\"Edge\"/></a>
  275.     </div>
  276.     <a href=\"#\" onclick=\"showLogin();\">{{ 'Click here to proceed'|trans([], 'admin') }}</a>
  277. </div>
  278. <script type=\"text/javascript\">
  279.     function showLogin() {
  280.         document.getElementById('loginform').style.display = 'block';
  281.         document.getElementById('browserinfo').style.display = 'none';
  282.     }
  283. </script>
  284. <style type=\"text/css\">
  285.     #loginform {
  286.         display: none;
  287.     }
  288. </style>
  289. {% endif %}
  290. {% endblock %}
  291. {% block below_footer %}
  292. <script {{ pimcore_csp.getNonceHtmlAttribute()|raw }}>
  293.     {% if deeplink is not defined %}
  294.     // clear opened tabs store
  295.     localStorage.removeItem(\"pimcore_opentabs\");
  296.     {% endif %}
  297.     // hide symfony toolbar by default
  298.     var symfonyToolbarKey = 'symfony/profiler/toolbar/displayState';
  299.     if(!window.localStorage.getItem(symfonyToolbarKey)) {
  300.         window.localStorage.setItem(symfonyToolbarKey, 'none');
  301.     }
  302.     // CSRF token refresh
  303.     var formElement = document.getElementById('form-element');
  304.     var csrfRefreshInProgress = false;
  305.     function refreshCsrfToken() {
  306.         csrfRefreshInProgress = true;
  307.         formElement.style.opacity = '0.3';
  308.         var request = new XMLHttpRequest();
  309.         request.open('GET', '{{ path(\"pimcore_admin_login_csrf_token\") }}');
  310.         request.onload = function () {
  311.             if (this.status >= 200 && this.status < 400) {
  312.                 var res = JSON.parse(this.response);
  313.                 document.getElementById('csrfToken').setAttribute('value', res['csrfToken']);
  314.                 formElement.style.opacity = '1';
  315.                 csrfRefreshInProgress = false;
  316.             }
  317.         };
  318.         request.send();
  319.     }
  320.     document.addEventListener('visibilitychange', function(ev) {
  321.         if(document.visibilityState === 'visible') {
  322.             refreshCsrfToken();
  323.         }
  324.     });
  325.     window.setInterval(refreshCsrfToken, {{ csrfTokenRefreshInterval }});
  326.     formElement.addEventListener(\"submit\", function(evt) {
  327.         if(csrfRefreshInProgress) {
  328.             evt.preventDefault();
  329.         }
  330.     }, true);
  331. </script>
  332. {{ pimcore_breach_attack_random_content() }}
  333. {% endblock %}
  334. ""@PimcoreAdmin/Admin/Login/login.html.twig""/var/www/vhosts/novo-peak.it/staging.speck-pim.novo-peak.it/vendor/pimcore/pimcore/bundles/AdminBundle/Resources/views/Admin/Login/login.html.twig");
  335.     }
  336.     
  337.     public function checkSecurity()
  338.     {
  339.         static $tags = ["extends" => 1"if" => 7];
  340.         static $filters = ["escape" => 5"striptags" => 5"raw" => 9"trans" => 9];
  341.         static $functions = ["path" => 5"pimcore_breach_attack_random_content" => 99];
  342.         try {
  343.             $this->sandbox->checkSecurity(
  344.                 ['extends''if'],
  345.                 ['escape''striptags''raw''trans'],
  346.                 ['path''pimcore_breach_attack_random_content'],
  347.                 $this->source
  348.             );
  349.         } catch (SecurityError $e) {
  350.             $e->setSourceContext($this->source);
  351.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  352.                 $e->setTemplateLine($tags[$e->getTagName()]);
  353.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  354.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  355.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  356.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  357.             }
  358.             throw $e;
  359.         }
  360.     }
  361. }