!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_led/php/vendor/onelogin/php-saml/tests/src/OneLogin/Saml/   drwxrwxr-x
Free 15.59 GB of 61.93 GB (25.17%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     AuthRequestTest.php (3.76 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**
 * Unit tests for AuthN Request
 */
class OneLogin_Saml_AuthRequestTest extends PHPUnit_Framework_TestCase
{
    private 
$_settings;

    
/**
    * Initializes the Test Suite
    */
    
public function setUp()
    {
        
$settings = new OneLogin_Saml_Settings;
        
$settings->idpSingleSignOnUrl 'http://stuff.com';
        
$settings->spReturnUrl 'http://sp.stuff.com';
        
$this->_settings $settings;
    }

    
/**
    * Tests the OneLogin_Saml_AuthRequest Constructor and
    * the getRedirectUrl method
    * The creation of a deflated SAML Request
    *
    * @covers OneLogin_Saml_AuthRequest
    * @covers OneLogin_Saml_AuthRequest::getRedirectUrl
    */
    
public function testCreateDeflatedSAMLRequestURLParameter()
    {
        
$request = new OneLogin_Saml_AuthRequest($this->_settings);
        
$authUrl $request->getRedirectUrl();
        
$this->assertRegExp('#^http://stuff\.com\?SAMLRequest=#'$authUrl);
        
parse_str(parse_url($authUrlPHP_URL_QUERY), $exploded);
        
// parse_url already urldecode de params so is not required.
        
$payload $exploded['SAMLRequest'];
        
$decoded base64_decode($payload);
        
$inflated gzinflate($decoded);
        
$this->assertRegExp('#^<samlp:AuthnRequest#'$inflated);

        
$request2 = new OneLogin_Saml_AuthRequest($this->_settings);
        
$authUrl2 $request2->getRedirectUrl('http://sp.example.com');
        
$this->assertRegExp('#^http://stuff\.com\?SAMLRequest=#'$authUrl2);
        
parse_str(parse_url($authUrl2PHP_URL_QUERY), $exploded2);
        
// parse_url already urldecode de params so is not required.
        
$this->assertEquals('http://sp.example.com'$exploded2['RelayState']);
        
$payload2 $exploded2['SAMLRequest'];
        
$decoded2 base64_decode($payload2);
        
$inflated2 gzinflate($decoded2);
        
$this->assertRegExp('#^<samlp:AuthnRequest#'$inflated2);
    }

    
/**
    * Tests the protected method _getTimestamp of the OneLogin_Saml_AuthRequest
    *
    * @covers OneLogin_Saml_AuthRequest::_getTimestamp
    */
    
public function testGetMetadataValidTimestamp()
    {
        if (
class_exists('ReflectionClass')) {
            
$reflectionClass = new ReflectionClass("OneLogin_Saml_AuthRequest");
            
$method $reflectionClass->getMethod('_getTimestamp');
 
            if (
method_exists($method'setAccessible')) {
                
$method->setAccessible(true);

                
$settingsDir TEST_ROOT .'/settings/';
                include 
$settingsDir.'settings1.php';

                
$metadata = new OneLogin_Saml_AuthRequest($settingsInfo);

                
$time time();
                
$timestamp $method->invoke($metadata);
                
$this->assertEquals(strtotime($timestamp), $time);
            }
        }
    }

    
/**
    * Tests the protected method _generateUniqueID of the OneLogin_Saml_AuthRequest
    *
    * @covers OneLogin_Saml_AuthRequest::_generateUniqueID
    */
    
public function testGenerateUniqueID()
    {
        if (
class_exists('ReflectionClass')) {
            
$reflectionClass = new ReflectionClass("OneLogin_Saml_AuthRequest");
            
$method $reflectionClass->getMethod('_generateUniqueID');

            if (
method_exists($method'setAccessible')) {
                
$method->setAccessible(true);

                
$settingsDir TEST_ROOT .'/settings/';
                include 
$settingsDir.'settings1.php';

                
$metadata = new OneLogin_Saml_AuthRequest($settingsInfo);

                
$id $method->invoke($metadata);
                
$id2 $method->invoke($metadata);
                
$this->assertNotEmpty($id);
                
$this->assertNotEmpty($id2);
                
$this->assertNotEquals($id$id2);
                
$this->assertContains('ONELOGIN'$id);
            }
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.678 ]--