Skip to content

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

Open
@migoldfinger

Description

@migoldfinger

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions