aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-09-22 10:04:02 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-09-22 10:04:02 +0200
commitb1d0a0f3bfd746104e40c539b091b90fff3f879a (patch)
tree7c9ea7f05a7b6d2c67670ad8a9dcecb9517be0f4
parent8abf786af9b56b6a1321f80ea21c065f2566d040 (diff)
parent2590a4dc85cb23311a9000770bf506c3953d0b04 (diff)
downloadnextcloud-server-b1d0a0f3bfd746104e40c539b091b90fff3f879a.tar.gz
nextcloud-server-b1d0a0f3bfd746104e40c539b091b90fff3f879a.zip
Merge pull request #10939 from owncloud/add-port-to-trusted-domain-wizard
Append port to trusted domain in case it's not 80 or 443
-rw-r--r--lib/base.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php
index 8cd261fa29f..fc2bdddb440 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -599,10 +599,18 @@ class OC {
) {
header('HTTP/1.1 400 Bad Request');
header('Status: 400 Bad Request');
+
+ $domain = $_SERVER['SERVER_NAME'];
+ // Append port to domain in case it is not
+ if($_SERVER['SERVER_PORT'] !== '80' && $_SERVER['SERVER_PORT'] !== '443') {
+ $domain .= ':'.$_SERVER['SERVER_PORT'];
+ }
+
$tmpl = new OCP\Template('core', 'untrustedDomain', 'guest');
- $tmpl->assign('domain', $_SERVER['SERVER_NAME']);
+ $tmpl->assign('domain', $domain);
$tmpl->printPage();
- return;
+
+ exit();
}
}