diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-06-02 09:21:09 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-06-03 09:13:47 +0000 |
commit | 25dd585251afad97309cebb6d44104f0a9bae53b (patch) | |
tree | 8159d591abd565bdb7b43ae9076ee73d49f246db /apps/files_sharing | |
parent | f431c145bcf9fa9e8d45cf7e0d95b90ea4112241 (diff) | |
download | nextcloud-server-25dd585251afad97309cebb6d44104f0a9bae53b.tar.gz nextcloud-server-25dd585251afad97309cebb6d44104f0a9bae53b.zip |
Do not only catch Exceptions but any Throwable during rmt share delete
When a remote share is deleted, we notify the remove instance. This may
trigger various error conditions, which we want to catch in order to
avoid undeletable shares. The try-catch, however, did only capture
exceptions, so things like TypeErrors were not caught and caused the
process to fail hard.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/External/Manager.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/External/Manager.php b/apps/files_sharing/lib/External/Manager.php index 8331787c6df..e7ddf6c3a74 100644 --- a/apps/files_sharing/lib/External/Manager.php +++ b/apps/files_sharing/lib/External/Manager.php @@ -520,7 +520,7 @@ class Manager { if ($result && $share !== false && (int)$share['share_type'] === Share::SHARE_TYPE_USER) { try { $this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'decline'); - } catch (\Exception $e) { + } catch (\Throwable $e) { // if we fail to notify the remote (probably cause the remote is down) // we still want the share to be gone to prevent undeletable remotes } @@ -630,7 +630,7 @@ class Manager { } $query = 'SELECT `id`, `remote`, `remote_id`, `share_token`, `name`, `owner`, `user`, `mountpoint`, `accepted` - FROM `*PREFIX*share_external` + FROM `*PREFIX*share_external` WHERE (`user` = ? OR `user` IN (?))'; $parameters = [$this->uid, implode(',',$userGroups)]; if (!is_null($accepted)) { |