Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62612

JobConfigHistory-Plugin modifies UTF-8 characters within jobs


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • Jenkins LTS 2.222.4 on Windows Server 2019
      Adopt Open JRE 1.8.0_252-b09 with UTF-8 (file.encoding and sun.jnu.encoding)

      I just found out that the plugin changes characters within config.xml of jobs.

      This took me some time to find out why valid jobs running on other Jenkins instances without any problems crashed. The diffrence were that on this instance the JobConfigHistory-Plugin was installed.

      It's also not immediately apparent in the Jenkins UI that the jobs have been changed because they are cached.

      But after a restart of Jenkins the UI shows the changed characters.


      Steps to reproduce the problem:

      Create a new Job (or use a alread existing) with UTF-8 chars inside and save it with this plugin enabled.


      Job config.xml without JobConfigHistory-plugin installed:
            (Jira dont let me save this issue with utf-8 chars inside so // // is were the chars are)

       <command> //_Emoji that are often used for logs//_
      ―― //_UTF-8 FAT CHARS//_ ――</command>


      The same Jobs config.xml after saving with JobConfigHistory installed:

      ―― &#119827;&#119812;&#119826;&#119827;: &#119816;&#119821;&#119826;&#119827;&#119808;&#119819;&#119819;&#119812;&#119825; ――</command>


      All chars are transformed to HTML representation( &#"UTF-8-Number"; ), but config.xml are UTF-8 encoded, so this will change the characters to something with different meaning.

        1. without plugin config.xml.png
          65 kB
          Martin Bauer
        2. without plugin Jenkins UI.png
          38 kB
          Martin Bauer
        3. with Plugin after Job save.png
          89 kB
          Martin Bauer
        4. with plugin after save and Jenkins reload.png
          49 kB
          Martin Bauer

            stefanbrausch Stefan Brausch
            martinbauer Martin Bauer
            0 Vote for this issue
            1 Start watching this issue