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
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-22 10:34:44 +0300
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-22 10:34:44 +0300
commit6518d6d0e88564b8a24cb4452675071a9f1e88a5 (patch)
treecbc7c26bf019eea1f4b5096c6e6c3eac35420ff7
parent84b831b0fefe3edee4af92624b7a72b8087e4b75 (diff)
parent9d5005c795c99ba1ef516035542e15157931292a (diff)
Merge pull request #24167 from owncloud/stable7-certificate
[stable7] Ignore certificate file if it starts with file://
-rw-r--r--apps/files_external/ajax/addRootCertificate.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php
index fcd3a617ada..2118ea54021 100644
--- a/apps/files_external/ajax/addRootCertificate.php
+++ b/apps/files_external/ajax/addRootCertificate.php
@@ -27,6 +27,12 @@ if ($isValid == false) {
$isValid = openssl_pkey_get_public($data);
}
+// If string starts with "file://" ignore the certificate
+$query = 'file://';
+if(strtolower(substr($data, 0, strlen($query))) === $query) {
+ $isValid = false;
+}
+
// add the certificate if it could be verified
if ( $isValid ) {
// disable proxy to prevent multiple fopen calls