Allow some more secure options without tsk-tsk.

This commit is contained in:
Simon Hobbs 2018-01-13 15:29:42 +11:00 committed by GitHub
parent 92d8052a5b
commit cf9acb32b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,7 @@ class CryptKey
if ($keyPermissionsCheck === true) { if ($keyPermissionsCheck === true) {
// Verify the permissions of the key // Verify the permissions of the key
$keyPathPerms = decoct(fileperms($keyPath) & 0777); $keyPathPerms = decoct(fileperms($keyPath) & 0777);
if (in_array($keyPathPerms, ['600', '660'], true) === false) { if (in_array($keyPathPerms, ['400', '440', '600', '660'], true) === false) {
trigger_error(sprintf( trigger_error(sprintf(
'Key file "%s" permissions are not correct, should be 600 or 660 instead of %s', 'Key file "%s" permissions are not correct, should be 600 or 660 instead of %s',
$keyPath, $keyPath,