Skip to content

Commit 9af2437

Browse files
committed
More secure default creation mode
1 parent 29d39cb commit 9af2437

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/AdapterInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
interface AdapterInterface
99
{
10-
const CREATION_MODE = 'rwxrwx---';
10+
const CREATION_MODE = 'rwxrw----';
1111

1212
/**
1313
* Return the loop associated with this adapter.

tests/Adapters/DirectoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function testCreate(LoopInterface $loop, FilesystemInterface $filesystem)
7070
$dir = $this->tmpDir . 'path';
7171
$this->await($filesystem->dir($dir)->createRecursive(), $loop);
7272
$this->assertTrue(file_exists($dir));
73-
$this->assertSame('0770', substr(sprintf('%o', fileperms($dir)), -4));
73+
$this->assertSame('0760', substr(sprintf('%o', fileperms($dir)), -4));
7474
}
7575

7676
/**

tests/Adapters/FileTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function testCreate(LoopInterface $loop, FilesystemInterface $filesystem)
115115
$this->assertFileNotExists($tempFile);
116116
$this->await($filesystem->file($tempFile)->create(), $loop);
117117
$this->assertFileExists($tempFile);
118-
$this->assertSame('0770', substr(sprintf('%o', fileperms($tempFile)), -4));
118+
$this->assertSame('0760', substr(sprintf('%o', fileperms($tempFile)), -4));
119119
}
120120

121121
/**

0 commit comments

Comments
 (0)