Skip to content

Commit 7c5343a

Browse files
committed
Fix
1 parent d33d0ac commit 7c5343a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/WordPress/Zip/ZipFileEntry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function __construct(
7676
$this->compressionMethod = $compressionMethod;
7777
$this->generalPurpose = $generalPurpose;
7878
$this->version = $version;
79-
$this->isDirectory = $this->path[- 1] === '/';
79+
$this->isDirectory = substr( $this->path, -1 ) === '/';
8080
}
8181

8282
public function isFileEntry() {

tests/unit/zip/ZipFunctionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use function WordPress\Zip\zip_extract_to;
1010

1111
class ZipFunctionsTest extends PHPUnitTestCase {
12-
public function testImmuneToZipSlip() {
12+
public function testIsImmuneToZipSlipVulnerability() {
1313
$filesystem = new Filesystem();
1414

1515
$filename = __DIR__ . 'tmp/zip-slip-test.zip';

0 commit comments

Comments
 (0)