Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-25177

Bamboo variables are exposed in the build logs when using special characters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 8.2.5, 9.2.3
    • Variables
    • None

      Issue Summary

      Bamboo variables are exposed in the build logs when using special characters such as £ (the pound sign)

      This is reproducible on Data Center: Yes

      Steps to Reproduce

      1. Create a plan with a script task. The script task uses Bamboo variables such as the following:
        if [ -z "${bamboo.blahpassword}" ]
        then
        echo "ERROR"
        exit 1
        fi
        
      2. Run the plan on a Windows agent

      Expected Results

      The task will fail but the variable will not be exposed

      19-Oct-2023 09:07:57	C:\Users\Administrator\bamboo-agent-home\xml-data\build-dir\PRO-PLAN-JOB1>if [ -z "********" ]
      19-Oct-2023 09:07:57	Failing task since return code of [C:\Users\Administrator\bamboo-agent-home\temp\PRO-PLAN-JOB1-5-ScriptBuildTask-2287074437231148067.bat] was 255 while expected 0
      

      Actual Results

      The task will fail but the variable is exposed

      19-Oct-2023 09:06:51	C:\Users\Administrator\bamboo-agent-home\xml-data\build-dir\PRO-PLAN-JOB1>if [ -z "test£123" ]
      19-Oct-2023 09:06:51	Failing task since return code of [C:\Users\Administrator\bamboo-agent-home\temp\PRO-PLAN-JOB1-4-ScriptBuildTask-15958868924550473404.bat] was 255 while expected 0
      

      Workaround

      Replace the £ with another special character

              Unassigned Unassigned
              feeaafc2eddb Mohamed Ayman (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: