diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2023-07-12 01:03:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-12 01:03:05 +0200 |
commit | fe1a2277cbe13b57de420a7d189d7173612c888f (patch) | |
tree | e80cec131fe5d3bece2f5643aa5e307766cb23a9 /lib | |
parent | 421fec8f5f39817e8716a3886b2a6386aba48337 (diff) | |
parent | 6d881c10e838cf3a99a27073383c8f74439a40b6 (diff) | |
download | nextcloud-server-fe1a2277cbe13b57de420a7d189d7173612c888f.tar.gz nextcloud-server-fe1a2277cbe13b57de420a7d189d7173612c888f.zip |
Merge pull request #38756 from nextcloud/backport/38468/stable27
[stable27] 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]); } } } |