From ea59cb6ca1b078af6a33d4c513ff4559197a362a Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Tue, 10 Nov 2009 10:34:34 +0100 Subject: Added new config parameter: max_report_size To avoid potential DoS attacks by sending big XML files, the max_report_size rejects reports which is bigger than this value. The default value is 2MB if this value is not configured. A new status code was introduced, STAT_FTOOBIG (12). The submissionqueue record will be updated with this value on records which fails this check. In addition minor SIGSEGV failure was fixed when rteval_parserd shutsdown before worker threads have really started. --- server/parser/pgsql.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/parser/pgsql.c') diff --git a/server/parser/pgsql.c b/server/parser/pgsql.c index 0016761..c59fbe1 100644 --- a/server/parser/pgsql.c +++ b/server/parser/pgsql.c @@ -630,6 +630,8 @@ int db_update_submissionqueue(dbconn *dbc, unsigned int submid, int status) { case STAT_ASSIGNED: case STAT_RTERIDREG: case STAT_REPMOVE: + case STAT_XMLFAIL: + case STAT_FTOOBIG: snprintf(sql, 4096, "UPDATE submissionqueue SET status = %i" " WHERE submid = %i", status, submid); @@ -643,7 +645,6 @@ int db_update_submissionqueue(dbconn *dbc, unsigned int submid, int status) { case STAT_SUCCESS: case STAT_UNKNFAIL: - case STAT_XMLFAIL: case STAT_SYSREG: case STAT_GENDB: case STAT_RTEVRUNS: -- cgit