summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-03-13 12:38:04 +0100
committerGitHub <noreply@github.com>2017-03-13 12:38:04 +0100
commit4395cf4fa77b07da9a31b85997f781dee03da21b (patch)
tree1588621b5dd57f8b6d5e4177cfc0190ad1f135e4 /lib
parent08cbd82a16aa990a87a8dbe80159017c72de5fd5 (diff)
parent35369ecc9684dc0c44c1bd6e418619ed3c148390 (diff)
downloadnextcloud-server-4395cf4fa77b07da9a31b85997f781dee03da21b.tar.gz
nextcloud-server-4395cf4fa77b07da9a31b85997f781dee03da21b.zip
Merge pull request #3780 from GitHubUser4234/audit_log_agent
Audit log the User-Agent
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Log/File.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php
index be8b72b3a3f..4c7ef446a05 100644
--- a/lib/private/Log/File.php
+++ b/lib/private/Log/File.php
@@ -14,6 +14,7 @@
* @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Thomas Pulzer <t.pulzer@kniel.de>
* @author Vincent Petry <pvince81@owncloud.com>
+ * @author Roger Szabo <roger.szabo@web.de>
*
* @license AGPL-3.0
*
@@ -101,6 +102,7 @@ class File {
} else {
$user = '--';
}
+ $userAgent = $request->getHeader('User-Agent') ?: '--';
$version = $config->getValue('version', '');
$entry = compact(
'reqId',
@@ -112,6 +114,7 @@ class File {
'method',
'url',
'user',
+ 'userAgent',
'version'
);
$entry = json_encode($entry);