private function validatePluginZip(string $prefix, \ZipArchive $archive): void
    {
        for ($i = 2; $i < $archive->numFiles; ++$i) {
            $stat = $archive->statIndex($i);

            $this->assertNoDirectoryTraversal($stat['name']);
            $this->assertPrefix($stat['name'], $prefix);
        }
    }
private function validatePluginZip(string $prefix, \ZipArchive $archive): void
    {
        for ($i = 2; $i < $archive->numFiles; ++$i) {
            $stat = $archive->statIndex($i);

            $this->assertNoDirectoryTraversal($stat['name']);
            $this->assertPrefix($stat['name'], $prefix);
        }
    }
private function validatePluginZip ( string $ prefix , \ ZipArchive $ archive ) : void { for ( $ i = 2 ; $ i < $ archive -> numFiles ; ++ $ i ) { $ stat = $ archive -> statIndex ( $ i ) ; $ this -> assertNoDirectoryTraversal ( $ stat [ 'name' ] ) ; $ this -> assertPrefix ( $ stat [ 'name' ] , $ prefix ) ; } }
Iterates all files of the provided zip archive
path and validates the plugin namespace, directory traversal
and multiple plugin directories.
Iterates all files of the provided zip archive path and validates the plugin namespace directory traversal and multiple plugin directories .