diff options
author | Robin Appelman <robin@icewind.nl> | 2023-05-31 16:16:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-31 16:16:15 +0200 |
commit | 496a8d2b80d3b45f618ed2da45a336c3fadfadd6 (patch) | |
tree | 895ea439b59a2b00d7de66d12c99ee67061ec11c /lib | |
parent | 2845a04827c457b98ef82148be16b36f5ff8dcd5 (diff) | |
parent | 223612b15aaafeaccb9159ea74e87b7e40f54486 (diff) | |
download | nextcloud-server-496a8d2b80d3b45f618ed2da45a336c3fadfadd6.tar.gz nextcloud-server-496a8d2b80d3b45f618ed2da45a336c3fadfadd6.zip |
Merge pull request #38468 from nextcloud/log-cert-list-errors
log failures to read certificates during listing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Security/CertificateManager.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/Security/CertificateManager.php b/lib/private/Security/CertificateManager.php index b9fbdcc9f02..3a87b7f1a00 100644 --- a/lib/private/Security/CertificateManager.php +++ b/lib/private/Security/CertificateManager.php @@ -83,8 +83,14 @@ class CertificateManager implements ICertificateManager { while (false !== ($file = readdir($handle))) { if ($file != '.' && $file != '..') { try { - $result[] = new Certificate($this->view->file_get_contents($path . $file), $file); + $content = $this->view->file_get_contents($path . $file); + if ($content !== false) { + $result[] = new Certificate($content, $file); + } else { + $this->logger->error("Failed to read certificate from $path"); + } } catch (\Exception $e) { + $this->logger->error("Failed to read certificate from $path", ['exception' => $e]); } } } |