Uploaded image for project: 'Camunda Optimize'
  1. Camunda Optimize
  2. OPT-5552

BPMN XML is parsed from plain ByteArrayInputStream prone to encoding conflicts depending on platform encoding

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Won't Fix
    • L3 - Default
    • None
    • None
    • backend
    • None
    • Not defined

    Description

      *What are the steps to reproduce your problem? *
      1. Run Optimize on a server with a different platform encoding than UTF-8. (alternatively set the encoding system property -Dfile.encoding=ISO-8859-1 )
      2. Deploy a definition xml encoded in UTF-8 with non ascii compatible UTF-8 characters

      *What is the problem? *
      3. The import of the xml will fail with an error such as:

      17:08:19.246 [EngineImportScheduler-1] ERROR o.c.o.s.i.e.m.ProcessDefinitionXmlEngineImportMediator - Was not able to import next page, retrying after sleeping for 1500ms.
      org.camunda.bpm.model.xml.ModelParseException: SAXException while parsing input stream
      

      What would be the expected behavior:
      The XML should be parsed with UTF-8 encoding.

      *Hints (optional): *
      At least in https://github.com/camunda/camunda-optimize/blob/34e7c3b83791335db2793ba52f93bdab805a5151/backend/src/main/java/org/camunda/optimize/service/util/BpmnModelUtil.java#L42 the XML is read via a ByteArrayInputStream only causing it to be parsed with default platform encoding
      By default all Optimize start scripts set the file encoding to be UTF-8 regardless of the environment, so in practice this issue cannot occur given the default scripts are used to run Optimize

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              Unassigned Unassigned
              sebastian.bathke Sebastian Bathke
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce