403Webshell
Server IP : 104.21.80.248  /  Your IP : 172.71.28.155
Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586
User : SYSTEM ( 0)
PHP Version : 5.6.30
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Inetpub/www/phpMyAdmin/test/libraries/core/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Inetpub/www/phpMyAdmin/test/libraries/core/PMA_cleanupPathInfo_test.php
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 *
 * PMA_fatalError() displays the given error message on phpMyAdmin error page in
 * foreign language
 * and ends script execution and closes session
 *
 * @package PhpMyAdmin-test
 */




/**
 *
 * PMA_fatalError() displays the given error message on phpMyAdmin error page in
 * foreign language
 * and ends script execution and closes session
 *
 * @package PhpMyAdmin-test
 */
class PMA_CleanupPathInfo_Test extends PHPUnit_Framework_TestCase
{
    /**
     * Test for PMA_cleanupPathInfo
     *
     * @param string $php_self  The PHP_SELF value
     * @param string $request   The REQUEST_URI value
     * @param string $path_info The PATH_INFO value
     * @param string $expected  Expected result
     *
     * @return void
     *
     * @dataProvider pathsProvider
     */
    public function testPahtInfo($php_self, $request, $path_info, $expected)
    {
        $_SERVER['PHP_SELF'] = $php_self;
        $_SERVER['REQUEST_URI'] = $request;
        $_SERVER['PATH_INFO'] = $path_info;
        PMA_cleanupPathInfo();
        $this->assertEquals(
            $expected,
            $GLOBALS['PMA_PHP_SELF']
        );
    }

    /**
     * Data provider for PMA_cleanupPathInfo tests
     *
     * @return array
     */
    public function pathsProvider()
    {
        return array(
            array(
                '/phpmyadmin/index.php/; cookieinj=value/',
                '/phpmyadmin/index.php/;%20cookieinj=value///',
                '/; cookieinj=value/',
                '/phpmyadmin/index.php'
            ),
            array(
                '',
                '/phpmyadmin/index.php/;%20cookieinj=value///',
                '/; cookieinj=value/',
                '/phpmyadmin/index.php'
            ),
            array(
                '',
                '//example.com/../phpmyadmin/index.php',
                '',
                '/phpmyadmin/index.php'
            ),
            array(
                '',
                '//example.com/../../.././phpmyadmin/index.php',
                '',
                '/phpmyadmin/index.php'
            ),
            array(
                '',
                '/page.php/malicouspathinfo?malicouspathinfo',
                'malicouspathinfo',
                '/page.php'
            ),
            array(
                '/phpmyadmin/./index.php',
                '/phpmyadmin/./index.php',
                '',
                '/phpmyadmin/index.php'
            ),
            array(
                '/phpmyadmin/index.php',
                '/phpmyadmin/index.php',
                '',
                '/phpmyadmin/index.php'
            ),
            array(
                '',
                '/phpmyadmin/index.php',
                '',
                '/phpmyadmin/index.php'
            ),
        );
    }
}


Youez - 2016 - github.com/yon3zu
LinuXploit