]> source.dussan.org Git - nextcloud-server.git/commit
Check resource before closing in encryption wrapper 30180/head
authorVincent Petry <vincent@nextcloud.com>
Thu, 9 Dec 2021 10:28:10 +0000 (11:28 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Fri, 10 Dec 2021 00:03:08 +0000 (00:03 +0000)
commit1291abc1301e9bcd0613fcf68232fc48c8ec8bce
treeb3453682b226ccd88c93928406c2ccebcde509e3
parent28992a403eb2d08ff606b7b9f33ac636067e5127
Check resource before closing in encryption wrapper

In case of error there is no guarantee that $source or $target is set or
is a resource when handling an error.

Without this fix, there's a risk that fclose will fail and the actual
exception will not be thrown, making it impossible to find out about the
root cause.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
lib/private/Files/Storage/Wrapper/Encryption.php