Skip to content

Commit 63b4450

Browse files
authored
Merge pull request #28082 from nextcloud/improve-exception-serializer
Sanitize more functions from the encryption app
2 parents 41eec84 + b3ddc09 commit 63b4450

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed

lib/private/Log/ExceptionSerializer.php

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
use OC\Security\IdentityProof\Key;
3333
use OC\Setup;
3434
use OC\SystemConfig;
35+
use OCA\Encryption\Controller\RecoveryController;
36+
use OCA\Encryption\Controller\SettingsController;
37+
use OCA\Encryption\Crypto\Crypt;
38+
use OCA\Encryption\Crypto\Encryption;
39+
use OCA\Encryption\Hooks\UserHooks;
40+
use OCA\Encryption\KeyManager;
41+
use OCA\Encryption\Session;
3542
use OCP\HintException;
3643

3744
class ExceptionSerializer {
@@ -117,7 +124,56 @@ public function __construct(SystemConfig $systemConfig) {
117124
],
118125
\RedisCluster::class => [
119126
'__construct'
120-
]
127+
],
128+
Crypt::class => [
129+
'symmetricEncryptFileContent',
130+
'encrypt',
131+
'generatePasswordHash',
132+
'encryptPrivateKey',
133+
'decryptPrivateKey',
134+
'isValidPrivateKey',
135+
'symmetricDecryptFileContent',
136+
'checkSignature',
137+
'createSignature',
138+
'decrypt',
139+
'multiKeyDecrypt',
140+
'multiKeyEncrypt',
141+
],
142+
RecoveryController::class => [
143+
'adminRecovery',
144+
'changeRecoveryPassword'
145+
],
146+
SettingsController::class => [
147+
'updatePrivateKeyPassword',
148+
],
149+
Encryption::class => [
150+
'encrypt',
151+
'decrypt',
152+
],
153+
KeyManager::class => [
154+
'checkRecoveryPassword',
155+
'storeKeyPair',
156+
'setRecoveryKey',
157+
'setPrivateKey',
158+
'setFileKey',
159+
'setAllFileKeys',
160+
],
161+
Session::class => [
162+
'setPrivateKey',
163+
'prepareDecryptAll',
164+
],
165+
\OCA\Encryption\Users\Setup::class => [
166+
'setupUser',
167+
],
168+
UserHooks::class => [
169+
'login',
170+
'postCreateUser',
171+
'postDeleteUser',
172+
'prePasswordReset',
173+
'postPasswordReset',
174+
'preSetPassphrase',
175+
'setPassphrase',
176+
],
121177
];
122178

123179
private function editTrace(array &$sensitiveValues, array $traceLine): array {

0 commit comments

Comments
 (0)