Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-03-14 20:34:09 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2022-04-04 13:14:08 +0300
commita13ae6b64f52c15d8509c84510bf7c9ee09fb69c (patch)
tree7cc2f42584dffd2dbb7a139520a60de965fa3ee3 /lib
parent63dd72fda0a1503e964bc6858ff99019a7017619 (diff)
return default bundle when there is an error getting the bundle
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Security/CertificateManager.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/private/Security/CertificateManager.php b/lib/private/Security/CertificateManager.php
index 0c6791163c2..6f3b01e23b9 100644
--- a/lib/private/Security/CertificateManager.php
+++ b/lib/private/Security/CertificateManager.php
@@ -240,15 +240,19 @@ class CertificateManager implements ICertificateManager {
* @return string
*/
public function getAbsoluteBundlePath(): string {
- if (!$this->hasCertificates()) {
- return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
- }
+ try {
+ if (!$this->hasCertificates()) {
+ return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
+ }
- if ($this->needsRebundling()) {
- $this->createCertificateBundle();
- }
+ if ($this->needsRebundling()) {
+ $this->createCertificateBundle();
+ }
- return $this->view->getLocalFile($this->getCertificateBundle());
+ return $this->view->getLocalFile($this->getCertificateBundle());
+ } catch (\Exception $e) {
+ return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
+ }
}
/**