]> source.dussan.org Git - nextcloud-server.git/commitdiff
Catch throwable instead of exception 25011/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Thu, 7 Jan 2021 13:32:26 +0000 (14:32 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Thu, 7 Jan 2021 13:32:26 +0000 (14:32 +0100)
The error that gets thrown can also be a type error etc. So we should
properly catch the Throwable.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/Encryption/Keys/Storage.php

index a2b27de6b5146e82b76902f60f27f356743df0db..c70ebc15ec2e43b073b5ad246737a25ccb574f38 100644 (file)
@@ -301,7 +301,7 @@ class Storage implements IStorage {
                                                $fallback = false;
                                                try {
                                                        $clearData = $this->crypto->decrypt($data);
-                                               } catch (\Exception $e) {
+                                               } catch (\Throwable $e) {
                                                        $fallback = true;
                                                }