From 08a2786f0bd0d65d51c7bc73b524f992de5dda83 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 14 Jul 2016 15:19:43 +0200 Subject: [syslog] API: Write machineuuid to DB --- modules-available/syslog/api.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules-available/syslog') diff --git a/modules-available/syslog/api.inc.php b/modules-available/syslog/api.inc.php index cebe5ef1..156bc35c 100644 --- a/modules-available/syslog/api.inc.php +++ b/modules-available/syslog/api.inc.php @@ -21,6 +21,7 @@ if (!isset($_POST['description'])) die('Missing options..'); $description = $_POST['description']; $longdesc = ''; if (isset($_POST['longdesc'])) $longdesc = $_POST['longdesc']; +$longdesc = Request::post('longdesc', '', 'string'); if ($type{0} !== '.' && $type{0} !== '~') { @@ -28,11 +29,12 @@ if ($type{0} !== '.' && $type{0} !== '~') { $row = Database::queryFirst('SELECT Count(*) AS cnt FROM clientlog WHERE clientip = :client AND dateline + 3600 > UNIX_TIMESTAMP()', array(':client' => $ip)); if ($row !== false && $row['cnt'] > 150) exit(0); - Database::exec('INSERT INTO clientlog (dateline, logtypeid, clientip, description, extra) VALUES (UNIX_TIMESTAMP(), :type, :client, :description, :longdesc)', array( + Database::exec('INSERT INTO clientlog (dateline, logtypeid, clientip, machineuuid, description, extra) VALUES (UNIX_TIMESTAMP(), :type, :client, :uuid, :description, :longdesc)', array( 'type' => $type, 'client' => $ip, 'description' => $description, 'longdesc' => $longdesc, + 'uuid' => $uuid, )); } -- cgit v1.2.3-55-g7522