Update CryptKey.php

Change the error message to reflect that the server will also accept 440 and 400 as a valid file permission
This commit is contained in:
Andrew Millington 2018-02-11 22:12:55 +00:00 committed by GitHub
parent cf9acb32b8
commit 06a23a1dd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,7 @@ class CryptKey
$keyPathPerms = decoct(fileperms($keyPath) & 0777); $keyPathPerms = decoct(fileperms($keyPath) & 0777);
if (in_array($keyPathPerms, ['400', '440', '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, recommend changing to 600 or 660 instead of %s',
$keyPath, $keyPath,
$keyPathPerms $keyPathPerms
), E_USER_NOTICE); ), E_USER_NOTICE);