diff options
author | Udo Walter | 2017-11-21 17:52:04 +0100 |
---|---|---|
committer | Udo Walter | 2017-11-21 17:52:04 +0100 |
commit | 653851f35d0eea172c2302e9f1b6f0d03c70096c (patch) | |
tree | 42f267c360104b98d2e3199273adba62a1e2023b /modules-available/syslog/api.inc.php | |
parent | [internetaccess] reworked permission system from "click and you get error" to... (diff) | |
parent | [statistics] Also adapt MAC-UUID fixing code to mltk changes (diff) | |
download | slx-admin-653851f35d0eea172c2302e9f1b6f0d03c70096c.tar.gz slx-admin-653851f35d0eea172c2302e9f1b6f0d03c70096c.tar.xz slx-admin-653851f35d0eea172c2302e9f1b6f0d03c70096c.zip |
Merge remote-tracking branch 'origin/master' into permission-manager
# Conflicts:
# modules-available/backup/templates/_page.html
# style/default.css
Diffstat (limited to 'modules-available/syslog/api.inc.php')
-rw-r--r-- | modules-available/syslog/api.inc.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules-available/syslog/api.inc.php b/modules-available/syslog/api.inc.php index 156bc35c..18c42c31 100644 --- a/modules-available/syslog/api.inc.php +++ b/modules-available/syslog/api.inc.php @@ -26,8 +26,10 @@ $longdesc = Request::post('longdesc', '', 'string'); if ($type{0} !== '.' && $type{0} !== '~') { // Spam from IP - $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); + $row = Database::queryFirst('SELECT Count(*) AS cnt FROM clientlog WHERE clientip = :client AND dateline + 1800 > UNIX_TIMESTAMP()', array(':client' => $ip)); + if ($row !== false && $row['cnt'] > 250) { + exit(0); + } Database::exec('INSERT INTO clientlog (dateline, logtypeid, clientip, machineuuid, description, extra) VALUES (UNIX_TIMESTAMP(), :type, :client, :uuid, :description, :longdesc)', array( 'type' => $type, |