Fixed issue #1200 - OTRS import fails for attributes containing null bytes strings on PostgreSQL.

This commit is contained in:
Thorsten Eckel 2017-06-28 14:47:58 +02:00
parent c734a52240
commit 7fceb07b87

View file

@ -95,6 +95,8 @@ module Import
def handle_response(response)
encoded_body = Encode.conv('utf8', response.body.to_s)
# remove null bytes otherwise PostgreSQL will fail
encoded_body.gsub!('\u0000', '')
JSON.parse(encoded_body)
end