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

Software: nginx/1.23.4. PHP/5.6.40-65+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux foro-restaurado-2 5.15.0-1040-oracle #46-Ubuntu SMP Fri Jul 14 21:47:21 UTC 2023
aarch64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/php/Symfony/Component/DependencyInjection/Compiler/   drwxr-xr-x
Free 83.26 GB of 96.73 GB (86.07%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

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

namespace Symfony\Component\DependencyInjection\Compiler;

use 
Symfony\Component\Config\Definition\BaseNode;
use 
Symfony\Component\DependencyInjection\ContainerBuilder;
use 
Symfony\Component\DependencyInjection\Exception\LogicException;
use 
Symfony\Component\DependencyInjection\Exception\RuntimeException;
use 
Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface;
use 
Symfony\Component\DependencyInjection\Extension\Extension;
use 
Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use 
Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use 
Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
use 
Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;

/**
 * Merges extension configs into the container builder.
 *
 * @author Fabien Potencier <[email protected]>
 */
class MergeExtensionConfigurationPass implements CompilerPassInterface
{
    
/**
     * {@inheritdoc}
     */
    
public function process(ContainerBuilder $container)
    {
        
$parameters $container->getParameterBag()->all();
        
$definitions $container->getDefinitions();
        
$aliases $container->getAliases();
        
$exprLangProviders $container->getExpressionLanguageProviders();
        
$configAvailable class_exists(BaseNode::class);

        foreach (
$container->getExtensions() as $extension) {
            if (
$extension instanceof PrependExtensionInterface) {
                
$extension->prepend($container);
            }
        }

        foreach (
$container->getExtensions() as $name => $extension) {
            if (!
$config $container->getExtensionConfig($name)) {
                
// this extension was not called
                
continue;
            }
            
$resolvingBag $container->getParameterBag();
            if (
$resolvingBag instanceof EnvPlaceholderParameterBag && $extension instanceof Extension) {
                
// create a dedicated bag so that we can track env vars per-extension
                
$resolvingBag = new MergeExtensionConfigurationParameterBag($resolvingBag);
                if (
$configAvailable) {
                    
BaseNode::setPlaceholderUniquePrefix($resolvingBag->getEnvPlaceholderUniquePrefix());
                }
            }
            
$config $resolvingBag->resolveValue($config);

            try {
                
$tmpContainer = new MergeExtensionConfigurationContainerBuilder($extension$resolvingBag);
                
$tmpContainer->setResourceTracking($container->isTrackingResources());
                
$tmpContainer->addObjectResource($extension);
                if (
$extension instanceof ConfigurationExtensionInterface && null !== $configuration $extension->getConfiguration($config$tmpContainer)) {
                    
$tmpContainer->addObjectResource($configuration);
                }

                foreach (
$exprLangProviders as $provider) {
                    
$tmpContainer->addExpressionLanguageProvider($provider);
                }

                
$extension->load($config$tmpContainer);
            } catch (\
Exception $e) {
                if (
$resolvingBag instanceof MergeExtensionConfigurationParameterBag) {
                    
$container->getParameterBag()->mergeEnvPlaceholders($resolvingBag);
                }

                if (
$configAvailable) {
                    
BaseNode::resetPlaceholders();
                }

                throw 
$e;
            }

            if (
$resolvingBag instanceof MergeExtensionConfigurationParameterBag) {
                
// don't keep track of env vars that are *overridden* when configs are merged
                
$resolvingBag->freezeAfterProcessing($extension$tmpContainer);
            }

            
$container->merge($tmpContainer);
            
$container->getParameterBag()->add($parameters);
        }

        if (
$configAvailable) {
            
BaseNode::resetPlaceholders();
        }

        
$container->addDefinitions($definitions);
        
$container->addAliases($aliases);
    }
}

/**
 * @internal
 */
class MergeExtensionConfigurationParameterBag extends EnvPlaceholderParameterBag
{
    private 
$processedEnvPlaceholders;

    public function 
__construct(parent $parameterBag)
    {
        
parent::__construct($parameterBag->all());
        
$this->mergeEnvPlaceholders($parameterBag);
    }

    public function 
freezeAfterProcessing(Extension $extensionContainerBuilder $container)
    {
        if (!
$config $extension->getProcessedConfigs()) {
            
// Extension::processConfiguration() wasn't called, we cannot know how configs were merged
            
return;
        }
        
$this->processedEnvPlaceholders = [];

        
// serialize config and container to catch env vars nested in object graphs
        
$config serialize($config).serialize($container->getDefinitions()).serialize($container->getAliases()).serialize($container->getParameterBag()->all());

        foreach (
parent::getEnvPlaceholders() as $env => $placeholders) {
            foreach (
$placeholders as $placeholder) {
                if (
false !== stripos($config$placeholder)) {
                    
$this->processedEnvPlaceholders[$env] = $placeholders;
                    break;
                }
            }
        }
    }

    
/**
     * {@inheritdoc}
     */
    
public function getEnvPlaceholders(): array
    {
        return 
$this->processedEnvPlaceholders ?? parent::getEnvPlaceholders();
    }

    public function 
getUnusedEnvPlaceholders(): array
    {
        return 
null === $this->processedEnvPlaceholders ? [] : array_diff_key(parent::getEnvPlaceholders(), $this->processedEnvPlaceholders);
    }
}

/**
 * A container builder preventing using methods that wouldn't have any effect from extensions.
 *
 * @internal
 */
class MergeExtensionConfigurationContainerBuilder extends ContainerBuilder
{
    private 
$extensionClass;

    public function 
__construct(ExtensionInterface $extensionParameterBagInterface $parameterBag null)
    {
        
parent::__construct($parameterBag);

        
$this->extensionClass = \get_class($extension);
    }

    
/**
     * {@inheritdoc}
     */
    
public function addCompilerPass(CompilerPassInterface $passstring $type PassConfig::TYPE_BEFORE_OPTIMIZATIONint $priority 0): static
    {
        throw new 
LogicException(sprintf('You cannot add compiler pass "%s" from extension "%s". Compiler passes must be registered before the container is compiled.'get_debug_type($pass), $this->extensionClass));
    }

    
/**
     * {@inheritdoc}
     */
    
public function registerExtension(ExtensionInterface $extension)
    {
        throw new 
LogicException(sprintf('You cannot register extension "%s" from "%s". Extensions must be registered before the container is compiled.'get_debug_type($extension), $this->extensionClass));
    }

    
/**
     * {@inheritdoc}
     */
    
public function compile(bool $resolveEnvPlaceholders false)
    {
        throw new 
LogicException(sprintf('Cannot compile the container in extension "%s".'$this->extensionClass));
    }

    
/**
     * {@inheritdoc}
     */
    
public function resolveEnvPlaceholders($value$format null, array &$usedEnvs null): mixed
    
{
        if (
true !== $format || !\is_string($value)) {
            return 
parent::resolveEnvPlaceholders($value$format$usedEnvs);
        }

        
$bag $this->getParameterBag();
        
$value $bag->resolveValue($value);

        if (!
$bag instanceof EnvPlaceholderParameterBag) {
            return 
parent::resolveEnvPlaceholders($value$format$usedEnvs);
        }

        foreach (
$bag->getEnvPlaceholders() as $env => $placeholders) {
            if (!
str_contains($env':')) {
                continue;
            }
            foreach (
$placeholders as $placeholder) {
                if (
false !== stripos($value$placeholder)) {
                    throw new 
RuntimeException(sprintf('Using a cast in "env(%s)" is incompatible with resolution at compile time in "%s". The logic in the extension should be moved to a compiler pass, or an env parameter with no cast should be used instead.'$env$this->extensionClass));
                }
            }
        }

        return 
parent::resolveEnvPlaceholders($value$format$usedEnvs);
    }
}

:: 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 HackingTool | HackingTool | Generation time: 0.005 ]--