Merge pull request #20428 from owncloud/add-log-statement-for-trusted-domain-error
Add warning log entry when user accesses untrusted domain
This commit is contained in:
commit
cc4321317e
|
@ -673,6 +673,15 @@ class OC {
|
||||||
header('HTTP/1.1 400 Bad Request');
|
header('HTTP/1.1 400 Bad Request');
|
||||||
header('Status: 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 = new OCP\Template('core', 'untrustedDomain', 'guest');
|
||||||
$tmpl->assign('domain', $request->server['SERVER_NAME']);
|
$tmpl->assign('domain', $request->server['SERVER_NAME']);
|
||||||
$tmpl->printPage();
|
$tmpl->printPage();
|
||||||
|
|
Loading…
Reference in New Issue