SILENT KILLERPanel

Current Path: > > opt > cloudlinux > alt-php54 > root > usr > share > pear > Symfony > Component > HttpFoundation > >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/cloudlinux/alt-php54/root/usr/share/pear/Symfony/Component/HttpFoundation//

NameTypeSizeLast ModifiedActions
File Directory - -
Resources Directory - -
Session Directory - -
AcceptHeader.php File 3610 bytes December 18 2019 11:22:56.
AcceptHeaderItem.php File 4915 bytes December 18 2019 11:22:56.
ApacheRequest.php File 930 bytes December 18 2019 11:22:56.
BinaryFileResponse.php File 9655 bytes December 18 2019 11:22:56.
Cookie.php File 5065 bytes December 18 2019 11:22:56.
ExpressionRequestMatcher.php File 1359 bytes December 18 2019 11:22:56.
FileBag.php File 4033 bytes December 18 2019 11:22:56.
HeaderBag.php File 8141 bytes December 18 2019 11:22:56.
IpUtils.php File 3514 bytes December 18 2019 11:22:56.
JsonResponse.php File 4633 bytes December 18 2019 11:22:56.
ParameterBag.php File 8099 bytes December 18 2019 11:22:56.
RedirectResponse.php File 2690 bytes December 18 2019 11:22:56.
Request.php File 55908 bytes December 18 2019 11:22:56.
RequestMatcher.php File 3801 bytes December 18 2019 11:22:56.
RequestMatcherInterface.php File 791 bytes December 18 2019 11:22:56.
RequestStack.php File 2373 bytes December 18 2019 11:22:56.
Response.php File 35807 bytes December 18 2019 11:22:56.
ResponseHeaderBag.php File 8849 bytes December 18 2019 11:22:56.
ServerBag.php File 3704 bytes December 18 2019 11:22:56.
StreamedResponse.php File 3214 bytes December 18 2019 11:22:56.
autoloader.php File 344 bytes December 18 2019 11:22:56.

Reading File: //opt/cloudlinux/alt-php54/root/usr/share/pear/Symfony/Component/HttpFoundation///FileBag.php

<?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\Component\HttpFoundation;

use Symfony\Component\HttpFoundation\File\UploadedFile;

/**
 * FileBag is a container for uploaded files.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Bulat Shakirzyanov <mallluhuct@gmail.com>
 *
 * @api
 */
class FileBag extends ParameterBag
{
    private static $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type');

    /**
     * Constructor.
     *
     * @param array $parameters An array of HTTP files
     *
     * @api
     */
    public function __construct(array $parameters = array())
    {
        $this->replace($parameters);
    }

    /**
     * {@inheritdoc}
     *
     * @api
     */
    public function replace(array $files = array())
    {
        $this->parameters = array();
        $this->add($files);
    }

    /**
     * {@inheritdoc}
     *
     * @api
     */
    public function set($key, $value)
    {
        if (!is_array($value) && !$value instanceof UploadedFile) {
            throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.');
        }

        parent::set($key, $this->convertFileInformation($value));
    }

    /**
     * {@inheritdoc}
     *
     * @api
     */
    public function add(array $files = array())
    {
        foreach ($files as $key => $file) {
            $this->set($key, $file);
        }
    }

    /**
     * Converts uploaded files to UploadedFile instances.
     *
     * @param array|UploadedFile $file A (multi-dimensional) array of uploaded file information
     *
     * @return array A (multi-dimensional) array of UploadedFile instances
     */
    protected function convertFileInformation($file)
    {
        if ($file instanceof UploadedFile) {
            return $file;
        }

        $file = $this->fixPhpFilesArray($file);
        if (is_array($file)) {
            $keys = array_keys($file);
            sort($keys);

            if ($keys == self::$fileKeys) {
                if (UPLOAD_ERR_NO_FILE == $file['error']) {
                    $file = null;
                } else {
                    $file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['size'], $file['error']);
                }
            } else {
                $file = array_map(array($this, 'convertFileInformation'), $file);
            }
        }

        return $file;
    }

    /**
     * Fixes a malformed PHP $_FILES array.
     *
     * PHP has a bug that the format of the $_FILES array differs, depending on
     * whether the uploaded file fields had normal field names or array-like
     * field names ("normal" vs. "parent[child]").
     *
     * This method fixes the array to look like the "normal" $_FILES array.
     *
     * It's safe to pass an already converted array, in which case this method
     * just returns the original array unmodified.
     *
     * @param array $data
     *
     * @return array
     */
    protected function fixPhpFilesArray($data)
    {
        if (!is_array($data)) {
            return $data;
        }

        $keys = array_keys($data);
        sort($keys);

        if (self::$fileKeys != $keys || !isset($data['name']) || !is_array($data['name'])) {
            return $data;
        }

        $files = $data;
        foreach (self::$fileKeys as $k) {
            unset($files[$k]);
        }

        foreach (array_keys($data['name']) as $key) {
            $files[$key] = $this->fixPhpFilesArray(array(
                'error'    => $data['error'][$key],
                'name'     => $data['name'][$key],
                'type'     => $data['type'][$key],
                'tmp_name' => $data['tmp_name'][$key],
                'size'     => $data['size'][$key]
            ));
        }

        return $files;
    }
}

SILENT KILLER Tool