[ZBX-5145] PostgreSQL auditlog insert error (value too long) when HTTP_X_FORWARDED_FOR contains many IPs Created: 2012 Jun 07 Updated: 2017 May 30 Resolved: 2012 Jun 28 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.0.0 |
Fix Version/s: | 2.0.2rc1, 2.1.0 |
Type: | Incident report | Priority: | Minor |
Reporter: | Sétphane Leibovitsch | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | database | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Debian Squeeze, Apache 2.2.17, PHP 5.3.3, PostgreSQL 9.1 |
Description |
When HTTP header HTTP_X_FORWARDED_FOR contains multiple IPs (more than 39 chars long in total, inserting in auditlog SQL table fails. file : include/audit.inc.php, lines 81, 110, 134. Possible fixes :
Example error messages :
Fatal error: Uncaught exception 'DBException' with message 'SQL statement execution has failed "UPDATE hosts SET status='0' WHERE (hostid IN ('10084')) ".' in /srv/web/zabbix/include/classes/db/DB.php:48 Stack trace: #0 /srv/web/zabbix/include/classes/db/DB.php(448): DB::exception(1, 'SQL statement e...') #1 /srv/web/zabbix/include/hosts.inc.php(572): DB::update('hosts', Array) #2 /srv/web/zabbix/hosts.php(547): updateHostStatus(Array, 0) #3 {main}thrown in /srv/web/zabbix/include/classes/db/DB.php on line 48
pg_query(): Query failed: ERREUR: valeur trop longue pour le type character varying(39) [include/db.inc.php:500] |
Comments |
Comment by Pavels Jelisejevs (Inactive) [ 2012 Jun 18 ] |
RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-5145. |
Comment by Alexander Vladishev [ 2012 Jun 21 ] |
Successfully tested! Please review my fix in r28391 |
Comment by Pavels Jelisejevs (Inactive) [ 2012 Jun 28 ] |
Merged to 2.0 r28487 and trunk 28488. CLOSED. |