Skip to content

Definition import should ignore the UTF-8 BOM of the uploaded file #13748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
migoldfinger opened this issue Apr 14, 2025 · 1 comment
Open
Labels

Comments

@migoldfinger
Copy link

Describe the bug

This is only tested on Management plugin RabbitMQ 4.0.8.
It could also be an issue when referencing the broker definition in the config files directly but not tested.

When the file in UTF-8 encoding does have a BOM the management plugin raises an error that the json could not be parsed.

Reproduction steps

  1. Login to RabbitMQ Management Client
  2. In the overview Tab -> Export definitions
  3. In the overview Tab -> Import definitions and use exported file = working
  4. Open the exported definition in an editor and save it as UTF-8 with BOM.
  5. In the overview Tab -> Import definitions and use modified file = not working
  6. Open the exported definition in an editor and save it as UTF-8 without BOM.
  7. In the overview Tab -> Import definitions and use modified file = working

Expected behavior

The presence of a BOM should have no effect on the capability to parse the json inside the file.

Additional context

rabbitMQWorking.json

rabbitMQNotWorking.json

@michaelklishin michaelklishin changed the title Upload of broker definition fails when the file has a BOM Definition import should ignore the UTF-8 BOM of the uploaded file Apr 14, 2025
@lukebakken
Copy link
Collaborator

lukebakken commented Apr 14, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants