diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-10 13:19:27 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-10 13:19:27 +0100 |
commit | cc4321317e5c1e3303b43ff1ad0a149324af7726 (patch) | |
tree | f547562f2e175feb30ed76edbda9f2fb4429bed7 | |
parent | d7232557d99e5f237d6bc2ee5be7e5eace68b7cc (diff) | |
parent | ba67dd9818696661d290c319a06bdc43ef6241d3 (diff) | |
download | nextcloud-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
-rw-r--r-- | lib/base.php | 9 |
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(); |