]> source.dussan.org Git - nextcloud-server.git/commitdiff
Handle SSL certificate verifications for others than Let's Encrypt 8184/head
authorRobert Scheck <robert@fedoraproject.org>
Mon, 5 Feb 2018 14:39:13 +0000 (15:39 +0100)
committerRobert Scheck <robert@fedoraproject.org>
Mon, 5 Feb 2018 14:39:13 +0000 (15:39 +0100)
Do no longer (wrongly) rewrite URLs like

  * http://example.net/.well-known/pki-validation/file.txt (Comodo)
  * http://example.net/.well-known/pki-validation/fileauth.txt (DigiCert, Thawte, GeoTrust)
  * http://example.net/.well-known/pki-validation/gsdv.txt (GlobalSign)
  * http://example.net/.well-known/pki-validation/starfield.htm (Starfield, GoDaddy)
  * http://example.net/.well-known/pki-validation/swisssign-check.txt (SwissSign)

for automated SSL certificate verifications. All (common commercial)
certificate authorities (CA) except Let's Encrypt (via ACME) seem to
use "pki-validation" rather "acme-challenge" for their domain control
validation (DCV).

Signed-off-by: Robert Scheck <robert@fedoraproject.org>
.htaccess
lib/private/Setup.php

index 7bf8759e38397a3440f33a4b0ecbfd01cfc63402..005f23b64d5fbde3fc50736d373acd24131bcd63 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -63,7 +63,7 @@
   RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
   RewriteRule ^remote/(.*) remote.php [QSA,L]
   RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
-  RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*
+  RewriteCond %{REQUEST_URI} !^/.well-known/(acme-challenge|pki-validation)/.*
   RewriteRule ^(?:\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
 </IfModule>
 <IfModule mod_mime.c>
index b8a861fd296304df88c2369b61ef4931cb1fc2be..0d46caa5b7832c0c38bff7835a1225ecfe529493 100644 (file)
@@ -473,7 +473,7 @@ class Setup {
                        $content .= "\n  RewriteCond %{REQUEST_FILENAME} !/robots.txt";
                        $content .= "\n  RewriteCond %{REQUEST_FILENAME} !/updater/";
                        $content .= "\n  RewriteCond %{REQUEST_FILENAME} !/ocs-provider/";
-                       $content .= "\n  RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*";
+                       $content .= "\n  RewriteCond %{REQUEST_URI} !^/.well-known/(acme-challenge|pki-validation)/.*";
                        $content .= "\n  RewriteRule . index.php [PT,E=PATH_INFO:$1]";
                        $content .= "\n  RewriteBase " . $rewriteBase;
                        $content .= "\n  <IfModule mod_env.c>";