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
remotes/origin/fix-10825
Thomas Müller 2014-09-22 10:04:02 +07:00
commit b1d0a0f3bf
1 changed files with 10 additions and 2 deletions

@ -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();
}
}