Actions
Bug #36167
closedMake sure fixPermissions gets 4 digit string
Start date:
2012-04-16
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
print_r(octdec(0660) . "\n");
print_r(octdec(660));
are different (same if string, though) ... this should probably be sanitized in fixPermissions to circumvent a nasty configuration problem.
Updated by Tolleiv Nietsch over 12 years ago
- Status changed from New to Accepted
- Assignee set to Tolleiv Nietsch
Updated by Tolleiv Nietsch over 12 years ago
- Assignee deleted (
Tolleiv Nietsch)
A possible test for this - haven't figured out how to solve it yet:
/** * @test */ public function fixPermissionsUsesProperPermissionString() { if (TYPO3_OS == 'WIN') { $this->markTestSkipped('fixPermissions() tests not available on Windows'); } // Create and prepare test file $filename = PATH_site . 'typo3temp/' . uniqid('test_'); t3lib_div::writeFileToTypo3tempDir($filename, '42'); chmod($filename, 0742); // Set target permissions and run method $GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = 0660; $fixPermissionsResult = t3lib_div::fixPermissions($filename); // Get actual permissions and clean up clearstatcache(); debug(decoct(fileperms($filename))); $resultFilePermissions = substr(decoct(fileperms($filename)), 2); unlink($filename); // Test if everything was ok $this->assertTrue($fixPermissionsResult); $this->assertEquals($resultFilePermissions, '0660'); }
Updated by Mathias Schreiber almost 10 years ago
- Target version set to 7.5
- Is Regression set to No
Updated by Benni Mack about 9 years ago
- Target version changed from 7.5 to 7 LTS
Updated by Christian Kuhn about 9 years ago
i'd suggest to just improve the documentation a bit ... "this is a 4 characters long bitmask, bla bla"
Updated by Gerrit Code Review about 9 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44430
Updated by Gerrit Code Review about 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44430
Updated by Benni Mack about 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d551921bdc4c145018187e30921b015f8e8ba545.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed
Actions