diff options
Diffstat (limited to 'settings/ajax/decryptall.php')
-rw-r--r-- | settings/ajax/decryptall.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/settings/ajax/decryptall.php b/settings/ajax/decryptall.php index ebc17aacfaa..d7c104ab151 100644 --- a/settings/ajax/decryptall.php +++ b/settings/ajax/decryptall.php @@ -16,7 +16,14 @@ $util = new \OCA\Encryption\Util($view, \OCP\User::getUser()); $result = $util->initEncryption($params); if ($result !== false) { - $successful = $util->decryptAll(); + + try { + $successful = $util->decryptAll(); + } catch (\Exception $ex) { + \OCP\Util::writeLog('encryption library', "Decryption finished unexpected: " . $ex->getMessage(), \OCP\Util::ERROR); + $successful = false; + } + if ($successful === true) { \OCP\JSON::success(array('data' => array('message' => 'Files decrypted successfully'))); } else { |