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

REST API not correctly escaping '<' characters in the author attribute of a commit

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 2.2.3
    • 2.2.1
    • REST API
    • None

    Description

      In GIt, authors are usually identified in the form:

      Graeme Mathieson <mathie@woss.name>

      just like an RFC822-formatted email address. Unfortunately, this causes a problem with the REST API, which spits out the author into an attribute of the <commit /> node without escaping the '<' character. This causes the Bamboo Confluence plugin (amongst others, I'm sure) to balk when trying to consume the XML from the REST API.

      Here is a sample response from our Bamboo server, demonstrating the problem:

      <response>
      <build>
      <projectName>New Relic Dashboard</projectName>
      <buildName>Master Branch</buildName>
      <buildKey>NEWRELIC-MASTER</buildKey>
      <buildState>Successful</buildState>
      <buildNumber>10</buildNumber>
      <failedTestCount>0</failedTestCount>
      <successfulTestCount>5</successfulTestCount>
      <buildTime>2009-04-28 16:20:17</buildTime>
      <buildCompletedDate>2009-04-28T16:20:23+0000</buildCompletedDate>
      <buildDurationInSeconds>6</buildDurationInSeconds>
      <buildDurationDescription>6 seconds</buildDurationDescription>
      <buildRelativeBuildDate>1 day ago</buildRelativeBuildDate>
      <buildTestSummary>5 passed</buildTestSummary>
      <buildReason>Code has changed</buildReason>

      <commits>
      <commit author="Graeme Mathieson <mathie@woss.name>" />
      </commits>

      </build>
      <build>
      <projectName>New Relic Dashboard</projectName>
      <buildName>Master Branch</buildName>
      <buildKey>NEWRELIC-MASTER</buildKey>
      <buildState>Successful</buildState>
      <buildNumber>9</buildNumber>
      <failedTestCount>0</failedTestCount>
      <successfulTestCount>5</successfulTestCount>
      <buildTime>2009-04-28 16:05:05</buildTime>
      <buildCompletedDate>2009-04-28T16:05:10+0000</buildCompletedDate>
      <buildDurationInSeconds>5</buildDurationInSeconds>
      <buildDurationDescription>5 seconds</buildDurationDescription>
      <buildRelativeBuildDate>1 day ago</buildRelativeBuildDate>
      <buildTestSummary>5 passed</buildTestSummary>
      <buildReason>Code has changed</buildReason>

      <commits>
      <commit author="Graeme Mathieson <mathie@woss.name>" />
      </commits>

      </build>
      <build>
      <projectName>New Relic Dashboard</projectName>
      <buildName>Master Branch</buildName>
      <buildKey>NEWRELIC-MASTER</buildKey>
      <buildState>Successful</buildState>
      <buildNumber>8</buildNumber>
      <failedTestCount>0</failedTestCount>
      <successfulTestCount>5</successfulTestCount>
      <buildTime>2009-04-25 09:16:51</buildTime>
      <buildCompletedDate>2009-04-25T09:16:57+0000</buildCompletedDate>
      <buildDurationInSeconds>5</buildDurationInSeconds>
      <buildDurationDescription>5 seconds</buildDurationDescription>
      <buildRelativeBuildDate>5 days ago</buildRelativeBuildDate>
      <buildTestSummary>5 passed</buildTestSummary>
      <buildReason>Manual build</buildReason>

      <commits>
      </commits>

      </build>
      <build>
      <projectName>New Relic Dashboard</projectName>
      <buildName>Master Branch</buildName>
      <buildKey>NEWRELIC-MASTER</buildKey>
      <buildState>Successful</buildState>
      <buildNumber>7</buildNumber>
      <failedTestCount>0</failedTestCount>
      <successfulTestCount>5</successfulTestCount>
      <buildTime>2009-04-24 11:54:42</buildTime>
      <buildCompletedDate>2009-04-24T11:54:47+0000</buildCompletedDate>
      <buildDurationInSeconds>5</buildDurationInSeconds>
      <buildDurationDescription>5 seconds</buildDurationDescription>
      <buildRelativeBuildDate>5 days ago</buildRelativeBuildDate>
      <buildTestSummary>5 passed</buildTestSummary>
      <buildReason>Code has changed</buildReason>

      <commits>
      <commit author="Graeme Mathieson <mathie@woss.name>" />
      </commits>

      </build>
      </response>

      Attachments

        Activity

          People

            bmccoy bmccoy
            ukuhnhardt Ulrich Kuhnhardt [Atlassian]
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: