Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-431

Username and Password cause NumberFormatException in scm:hg:http URLS

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Labels:
      None
    • Environment:
      Hg version: 1.1+20081202
      MacOSX 10.5.4
      Java version "1.6.0_07"
      Maven version: 2.0.6
    • Flags:
      Patch

      Description

      This only affects Mercurial repository URLS using http protocol.

      We are using the hgwebdir CGI along with HTTP basic auth. SCM operations during release:prepare fail because http auth is not provided to the cgi frontend to the repo. Adding the auth credentials to the URL results in NumberFormatException.

      The following scm element results in number parse exception, because the colon is parsed during host and port parsing, instead of user/pass parsing.

      <scm>
      <connection>scm:hg:http://adenyes:password@rds.dev.prognet.com/code/ebi</connection>
      <developerConnection>scm:hg:http://adenyes:password@rds.dev.prognet.com/code/ebi</developerConnection>
      </scm>

      Suggested fix: return needsAuthentication true for HTTP URLs that contain an @ symbol,
      or
      always parse for user/pass and always include in URI if they are set.

        Attachments

        1. SCM-431.patch
          2 kB
          Brian Atkinson
        2. SCM-431-ad.patch
          4 kB
          Andrew Denyes
        3. stack_parse_x.txt
          4 kB
          Andrew Denyes

          Activity

            People

            • Assignee:
              olamy Olivier Lamy
              Reporter:
              andr00 Andrew Denyes
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: