Uploaded image for project: 'Bamboo'
  1. Bamboo
  2. BAM-3722

AuthorName is not html escaped when serving Ajax responses

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.3
    • Component/s: REST API
    • Labels:
      None

      Description

      If the author name of a commit contains characters like "<" or ">" the resulting ajax response is wrong.

      Example when requesting:
      http://bamboo.int/api/rest/getLatestBuildResults.action?auth=XXXXXXXXX&buildKey=GM-STG

      The result is:

      <response>
      <projectName>Gamersmafia</projectName>
      <buildName>Staging</buildName>
      <buildKey>GM-STG</buildKey>
      <buildState>Failed</buildState>
      <buildNumber>13</buildNumber>
      <failedTestCount>1</failedTestCount>

      <successfulTestCount>804</successfulTestCount>
      <buildTime>2009-03-22 19:01:39</buildTime>
      <buildCompletedDate>2009-03-22T19:03:42+0100</buildCompletedDate>
      <buildDurationInSeconds>123</buildDurationInSeconds>
      <buildDurationDescription>2 minutes</buildDurationDescription>
      <buildRelativeBuildDate>1 week ago</buildRelativeBuildDate>

      <buildTestSummary>1 out of 805 failed</buildTestSummary>
      <buildReason>Code has changed</buildReason>

      <commits>
      <commit author="slnc <s@slnc.me>" />
      <commit author="slnc <s@slnc.me>" />
      <commit author="slnc <s@slnc.me>" />
      <commit author="slnc <s@slnc.me>" />
      <commit author="slnc <s@slnc.me>" />
      <commit author="slnc <s@slnc.me>" />
      <commit author="slnc <s@slnc.me>" />
      <commit author="slnc <s@slnc.me>" />
      <commit author="slnc <s@slnc.me>" />
      <commit author="slnc <s@slnc.me>" />
      <commit author="slnc <s@slnc.me>" />
      </commits>
      </response>

      But the commit lines should be:

      <commit author="slnc <s@slnc.me>" />

        Attachments

          Activity

            People

            Assignee:
            mwent Marek Went (Inactive)
            Reporter:
            slnc Juan Alonso
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h