summaryrefslogtreecommitdiffstats
path: root/server/parser/pgsql.c
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2009-11-10 10:34:34 +0100
committerDavid Sommerseth <davids@redhat.com>2009-11-10 10:34:34 +0100
commitea59cb6ca1b078af6a33d4c513ff4559197a362a (patch)
treef82fc850502adf4ee8008381776d4e8168718f57 /server/parser/pgsql.c
parent395a47412e9727a9ceb63aa7e2186f92783fd862 (diff)
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.
Diffstat (limited to 'server/parser/pgsql.c')
-rw-r--r--server/parser/pgsql.c3
1 files changed, 2 insertions, 1 deletions
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: