Bug 1820245
Summary: | reports in JSON format can't handle unicode characters | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Lukáš Hellebrandt <lhellebr> | ||||
Component: | Reporting | Assignee: | Dominik Matoulek <dmatoule> | ||||
Status: | CLOSED ERRATA | QA Contact: | Lukáš Hellebrandt <lhellebr> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.7.0 | CC: | afeferku, dmatoule, mhulan, oprazak, tbrisker | ||||
Target Milestone: | 6.8.0 | Keywords: | Triaged | ||||
Target Release: | Unused | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | foreman-2.1.0 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2020-10-27 13:01:16 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Lukáš Hellebrandt
2020-04-02 15:12:06 UTC
Created attachment 1675800 [details]
foreman-tail.log
I can confirm it happened to me with a custom product and I'm not aware of any RH product containing such a character. I can confirm this occurs for any report containing unicode characters and generated as JSON (reproduced with registered users report with a user that had utf characters). Relevant part of the stacktrace: 2020-05-31T17:19:52 [D|app|f7cfc3a6] Backtrace for 'Action failed' error (Encoding::UndefinedConversionError): "\xC3" from ASCII-8BIT to UTF-8 | /home/tbrisker/.rvm/gems/ruby-2.6.3@foreman/gems/activesupport-6.0.2.2/lib/active_support/core_ext/object/json.rb:39:in `to_json' | /home/tbrisker/.rvm/gems/ruby-2.6.3@foreman/gems/activesupport-6.0.2.2/lib/active_support/core_ext/object/json.rb:39:in `to_json' | /home/tbrisker/.rvm/gems/ruby-2.6.3@foreman/gems/activesupport-6.0.2.2/lib/active_support/json/encoding.rb:57:in `to_json' | /home/tbrisker/.rvm/gems/ruby-2.6.3@foreman/gems/json-2.3.0/lib/json/common.rb:224:in `generate' | /home/tbrisker/.rvm/gems/ruby-2.6.3@foreman/gems/json-2.3.0/lib/json/common.rb:224:in `generate' | /home/tbrisker/.rvm/gems/ruby-2.6.3@foreman/gems/activesupport-6.0.2.2/lib/active_support/json/encoding.rb:106:in `stringify' | /home/tbrisker/.rvm/gems/ruby-2.6.3@foreman/gems/activesupport-6.0.2.2/lib/active_support/json/encoding.rb:35:in `encode' | /home/tbrisker/.rvm/gems/ruby-2.6.3@foreman/gems/activesupport-6.0.2.2/lib/active_support/json/encoding.rb:22:in `encode' | /home/tbrisker/.rvm/gems/ruby-2.6.3@foreman/gems/activesupport-6.0.2.2/lib/active_support/core_ext/object/json.rb:42:in `to_json' | /home/tbrisker/foreman/app/controllers/api/v2/report_templates_controller.rb:185:in `report_data' Upstream bug assigned to dmatoule Upstream bug assigned to dmatoule Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/30056 has been resolved. Verified with Sat 6.8 snap 10 using reproducers from OP and comment 7. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: Satellite 6.8 release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:4366 |