Pārlūkot izejas kodu

Merge pull request #4758 from nextcloud/fix_3470

Do not write and read rootcerts.crt at the same time
tags/v12.0.0beta3
Roeland Jago Douma pirms 7 gadiem
vecāks
revīzija
b9bcc819bd
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3
    2
      lib/private/Security/CertificateManager.php

+ 3
- 2
lib/private/Security/CertificateManager.php Parādīt failu

@@ -119,7 +119,8 @@ class CertificateManager implements ICertificateManager {
return;
}

$fhCerts = $this->view->fopen($path . '/rootcerts.crt', 'w');
$certPath = $path . 'rootcerts.crt';
$fhCerts = $this->view->fopen($certPath, 'w');

// Write user certificates
foreach ($certs as $cert) {
@@ -136,7 +137,7 @@ class CertificateManager implements ICertificateManager {

// Append the system certificate bundle
$systemBundle = $this->getCertificateBundle(null);
if ($this->view->file_exists($systemBundle)) {
if ($systemBundle !== $certPath && $this->view->file_exists($systemBundle)) {
$systemCertificates = $this->view->file_get_contents($systemBundle);
fwrite($fhCerts, $systemCertificates);
}

Notiek ielāde…
Atcelt
Saglabāt