Skip to content
Snippets Groups Projects
Commit ba67dd98 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Add warning log entry when user accesses untrusted domain

parent 422d29ae
Branches
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment