aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-11-10 13:19:27 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-11-10 13:19:27 +0100
commitcc4321317e5c1e3303b43ff1ad0a149324af7726 (patch)
treef547562f2e175feb30ed76edbda9f2fb4429bed7 /lib
parentd7232557d99e5f237d6bc2ee5be7e5eace68b7cc (diff)
parentba67dd9818696661d290c319a06bdc43ef6241d3 (diff)
downloadnextcloud-server-cc4321317e5c1e3303b43ff1ad0a149324af7726.tar.gz
nextcloud-server-cc4321317e5c1e3303b43ff1ad0a149324af7726.zip
Merge pull request #20428 from owncloud/add-log-statement-for-trusted-domain-error
Add warning log entry when user accesses untrusted domain
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index f44c4ff5bf2..feaf46e83f1 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -673,6 +673,15 @@ class OC {
header('HTTP/1.1 400 Bad Request');
header('Status: 400 Bad Request');
+ \OC::$server->getLogger()->warning(
+ 'Trusted domain error. "{remoteAddress}" tried to access using "{host}" as host.',
+ [
+ 'app' => 'core',
+ 'remoteAddress' => $request->getRemoteAddress(),
+ 'host' => $host,
+ ]
+ );
+
$tmpl = new OCP\Template('core', 'untrustedDomain', 'guest');
$tmpl->assign('domain', $request->server['SERVER_NAME']);
$tmpl->printPage();