From 0a2e4711631c404f55a8c41f8609e6b403c7e408 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Thu, 21 Aug 2014 22:22:35 +0200 Subject: Add a trusted domain wizard Adds a little button to the trusted domain warning, if an admin clicks on the warning he will be redirected to ownCloud and asked whether he want to trust this domain. By far not the cleanest code, or clean at all, but does the job and I don't see a reason to make a lot of changes for this little improvement. --- lib/base.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/base.php b/lib/base.php index ed0830c1f72..ab3e34a73b4 100644 --- a/lib/base.php +++ b/lib/base.php @@ -670,10 +670,9 @@ class OC { header('HTTP/1.1 400 Bad Request'); header('Status: 400 Bad Request'); - OC_Template::printErrorPage( - $l->t('You are accessing the server from an untrusted domain.'), - $l->t('Please contact your administrator. If you are an administrator of this instance, configure the "trusted_domain" setting in config/config.php. An example configuration is provided in config/config.sample.php.') - ); + $tmpl = new OCP\Template('core', 'untrustedDomain', 'guest'); + $tmpl->assign('domain', $_SERVER['SERVER_NAME']); + $tmpl->printPage(); return; } -- cgit v1.2.3