Null (\0) characters in logmsg field of events causes org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
Description
The logmsg field wasn't being escaped to handle \0 characters. Cropped up because Dell Drac5/6 test snmp traps contain null octets in one of their parameters, and the default trap event incldues all parms in the logmsg field.
Fix and unit test attached.
Acceptance / Success Criteria
None
Attachments
1
Lucidchart Diagrams
Activity
Show:
Benjamin Reed August 22, 2011 at 12:45 PM
Looks reasonable to me, merged to 1.8+.
Tomás Heredia August 19, 2011 at 4:48 PM
Same here. Tested on 1.8.9 Our Aruba controllers send almost all traps with nulls on them
The logmsg field wasn't being escaped to handle \0 characters. Cropped up because Dell Drac5/6 test snmp traps contain null octets in one of their parameters, and the default trap event incldues all parms in the logmsg field.
Fix and unit test attached.