From b1ed1ee158cff03f5658ff093c184a645e786f57 Mon Sep 17 00:00:00 2001 From: kanoi Date: Sat, 20 Feb 2016 23:44:12 +1100 Subject: [PATCH] ckdb - ignore checking the web Anon username for ovents - just check the IP --- src/ckdb.h | 5 ++++- src/ckdb_data.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ckdb.h b/src/ckdb.h index 87cedafc..4f76afdb 100644 --- a/src/ckdb.h +++ b/src/ckdb.h @@ -51,7 +51,7 @@ #define DB_VLOCK "1" #define DB_VERSION "1.0.4" -#define CKDB_VERSION DB_VERSION"-1.958" +#define CKDB_VERSION DB_VERSION"-1.959" #define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL_HERE __FILE__, __func__, __LINE__ @@ -2106,6 +2106,9 @@ extern K_STORE *ovents_store; #define OVENT_OK EVENT_OK +// Web uses this, so only check IP for this user +#define ANON_USER "Anon" + /* user limits are checked for matching id+user * ip limits are checked for matching id+ip, * however, it requires more than one user found with the given ip diff --git a/src/ckdb_data.c b/src/ckdb_data.c index 00a374e1..7fb2769b 100644 --- a/src/ckdb_data.c +++ b/src/ckdb_data.c @@ -5121,7 +5121,7 @@ int check_ovents(int id, char *u_key, char *i_key, char *c_key, tv_t *now) K_WLOCK(ovents_free); K_RLOCK(event_limits_free); - if (u_key[0]) { + if (u_key[0] && strcmp(u_key, ANON_USER) != 0) { was = check_one_ovent(id, u_key, now, o_limits[id].user_low_time, o_limits[id].user_low_time_limit,