Merge pull request #28090 from nextcloud/backport/28082/stable21

[stable21] Sanitize more functions from the encryption app
This commit is contained in:
John Molakvoæ 2021-07-22 08:44:12 +02:00 committed by GitHub
commit e4be5247bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,6 +34,13 @@ use OC\HintException;
use OC\Security\IdentityProof\Key;
use OC\Setup;
use OC\SystemConfig;
use OCA\Encryption\Controller\RecoveryController;
use OCA\Encryption\Controller\SettingsController;
use OCA\Encryption\Crypto\Crypt;
use OCA\Encryption\Crypto\Encryption;
use OCA\Encryption\Hooks\UserHooks;
use OCA\Encryption\KeyManager;
use OCA\Encryption\Session;
class ExceptionSerializer {
public const methodsWithSensitiveParameters = [
@ -118,7 +125,56 @@ class ExceptionSerializer {
],
\RedisCluster::class => [
'__construct'
]
],
Crypt::class => [
'symmetricEncryptFileContent',
'encrypt',
'generatePasswordHash',
'encryptPrivateKey',
'decryptPrivateKey',
'isValidPrivateKey',
'symmetricDecryptFileContent',
'checkSignature',
'createSignature',
'decrypt',
'multiKeyDecrypt',
'multiKeyEncrypt',
],
RecoveryController::class => [
'adminRecovery',
'changeRecoveryPassword'
],
SettingsController::class => [
'updatePrivateKeyPassword',
],
Encryption::class => [
'encrypt',
'decrypt',
],
KeyManager::class => [
'checkRecoveryPassword',
'storeKeyPair',
'setRecoveryKey',
'setPrivateKey',
'setFileKey',
'setAllFileKeys',
],
Session::class => [
'setPrivateKey',
'prepareDecryptAll',
],
\OCA\Encryption\Users\Setup::class => [
'setupUser',
],
UserHooks::class => [
'login',
'postCreateUser',
'postDeleteUser',
'prePasswordReset',
'postPasswordReset',
'preSetPassphrase',
'setPassphrase',
],
];
private function editTrace(array &$sensitiveValues, array $traceLine): array {