Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Commitda565de
committed
bug#19872 [Filesystem] Consider the umask setting when dumping a file (leofeyer)
This PR was merged into the 3.1 branch.Discussion----------[Filesystem] Consider the umask setting when dumping a file| Q | A| ------------- | ---| Branch? | 3.1| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#14246 ,#17063| License | MIT| Doc PR | -`Filesystem::dumpFile()` does not consider the umask setting and thus creates files with write permissions for everyone (`0666`). Other `chmod()` calls in Symfony do consider the umask setting (see e.g. [here](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/File/File.php#L101) or [here](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/File/UploadedFile.php#L230)), therefore I have adjusted the `dumpFile()` method accordingly.Commits-------fdd266f Consider the umask setting when dumping a file.File tree
2 files changed
+8
-3
lines changed- src/Symfony/Component/Filesystem
- Tests
2 files changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
560 | | - | |
| 559 | + | |
561 | 560 | | |
562 | 561 | | |
563 | 562 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1101 | 1101 | | |
1102 | 1102 | | |
1103 | 1103 | | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
1104 | 1109 | | |
1105 | 1110 | | |
1106 | 1111 | | |
1107 | 1112 | | |
1108 | 1113 | | |
1109 | 1114 | | |
1110 | | - | |
| 1115 | + | |
| 1116 | + | |
1111 | 1117 | | |
1112 | 1118 | | |
1113 | 1119 | | |
| |||
0 commit comments
Comments
(0)