Fixed issue #1200 - OTRS import fails for attributes containing null bytes strings on PostgreSQL.
This commit is contained in:
parent
c734a52240
commit
7fceb07b87
1 changed files with 2 additions and 0 deletions
|
@ -95,6 +95,8 @@ module Import
|
||||||
|
|
||||||
def handle_response(response)
|
def handle_response(response)
|
||||||
encoded_body = Encode.conv('utf8', response.body.to_s)
|
encoded_body = Encode.conv('utf8', response.body.to_s)
|
||||||
|
# remove null bytes otherwise PostgreSQL will fail
|
||||||
|
encoded_body.gsub!('\u0000', '')
|
||||||
JSON.parse(encoded_body)
|
JSON.parse(encoded_body)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue