You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andrew Denyes (JIRA)" <ji...@codehaus.org> on 2008/12/18 03:31:19 UTC

[jira] Created: (SCM-431) Username and Password cause NumberFormatException in scm:hg:http URLS

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

                 Key: SCM-431
                 URL: http://jira.codehaus.org/browse/SCM-431
             Project: Maven SCM
          Issue Type: Bug
          Components: maven-scm-provider-mercurial (hg)
         Environment: Hg version: 1.1+20081202
MacOSX 10.5.4
Java version "1.6.0_07"
Maven version: 2.0.6
            Reporter: Andrew Denyes
         Attachments: stack_parse_x.txt

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.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (SCM-431) Username and Password cause NumberFormatException in scm:hg:http URLS

Posted by "Brian Atkinson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=161301#action_161301 ] 

Brian Atkinson edited comment on SCM-431 at 1/16/09 9:13 PM:
-------------------------------------------------------------

I have attached a patch that I believe should fix this bug.  I have also included tests to cover this case.

The change was a simple one line change.  Adding HTTP to the list of protocols that "needsAuthentication()" or in reality gets parsed for authentication information in the URL.

EDIT: I forgot to mention the patch is against trunk.

      was (Author: nairb774):
    I have attached a patch that I believe should fix this bug.  I have also included tests to cover this case.

The change was a simple one line change.  Adding HTTP to the list of protocols that "needsAuthentication()" or in reality gets parsed for authentication information in the URL.
  
> Username and Password cause NumberFormatException in scm:hg:http URLS
> ---------------------------------------------------------------------
>
>                 Key: SCM-431
>                 URL: http://jira.codehaus.org/browse/SCM-431
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-mercurial (hg)
>         Environment: Hg version: 1.1+20081202
> MacOSX 10.5.4
> Java version "1.6.0_07"
> Maven version: 2.0.6
>            Reporter: Andrew Denyes
>         Attachments: SCM-431.patch, stack_parse_x.txt
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (SCM-431) Username and Password cause NumberFormatException in scm:hg:http URLS

Posted by "Brian Atkinson (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Atkinson updated SCM-431:
-------------------------------

    Attachment: SCM-431.patch

I have attached a patch that I believe should fix this bug.  I have also included tests to cover this case.

The change was a simple one line change.  Adding HTTP to the list of protocols that "needsAuthentication()" or in reality gets parsed for authentication information in the URL.

> Username and Password cause NumberFormatException in scm:hg:http URLS
> ---------------------------------------------------------------------
>
>                 Key: SCM-431
>                 URL: http://jira.codehaus.org/browse/SCM-431
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-mercurial (hg)
>         Environment: Hg version: 1.1+20081202
> MacOSX 10.5.4
> Java version "1.6.0_07"
> Maven version: 2.0.6
>            Reporter: Andrew Denyes
>         Attachments: SCM-431.patch, stack_parse_x.txt
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (SCM-431) Username and Password cause NumberFormatException in scm:hg:http URLS

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated SCM-431:
-----------------------------

    Patch Submitted: [Yes]
      Fix Version/s: 1.x

> Username and Password cause NumberFormatException in scm:hg:http URLS
> ---------------------------------------------------------------------
>
>                 Key: SCM-431
>                 URL: http://jira.codehaus.org/browse/SCM-431
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-mercurial (hg)
>         Environment: Hg version: 1.1+20081202
> MacOSX 10.5.4
> Java version "1.6.0_07"
> Maven version: 2.0.6
>            Reporter: Andrew Denyes
>             Fix For: 1.x
>
>         Attachments: SCM-431.patch, stack_parse_x.txt
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (SCM-431) Username and Password cause NumberFormatException in scm:hg:http URLS

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated SCM-431:
-----------------------------

    Fix Version/s:     (was: 1.x)
                   1.4
         Assignee: Olivier Lamy

> Username and Password cause NumberFormatException in scm:hg:http URLS
> ---------------------------------------------------------------------
>
>                 Key: SCM-431
>                 URL: http://jira.codehaus.org/browse/SCM-431
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-mercurial (hg)
>         Environment: Hg version: 1.1+20081202
> MacOSX 10.5.4
> Java version "1.6.0_07"
> Maven version: 2.0.6
>            Reporter: Andrew Denyes
>            Assignee: Olivier Lamy
>             Fix For: 1.4
>
>         Attachments: SCM-431-ad.patch, SCM-431.patch, stack_parse_x.txt
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (SCM-431) Username and Password cause NumberFormatException in scm:hg:http URLS

Posted by "Andrew Denyes (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Denyes updated SCM-431:
------------------------------

    Attachment: SCM-431-ad.patch

This is a patch against revision 1.3 for SCM-431. It makes a distinction between required and discretionary authentication and avoids mangling HTTP URLs when authentication information is not present. 

> Username and Password cause NumberFormatException in scm:hg:http URLS
> ---------------------------------------------------------------------
>
>                 Key: SCM-431
>                 URL: http://jira.codehaus.org/browse/SCM-431
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-mercurial (hg)
>         Environment: Hg version: 1.1+20081202
> MacOSX 10.5.4
> Java version "1.6.0_07"
> Maven version: 2.0.6
>            Reporter: Andrew Denyes
>             Fix For: 1.x
>
>         Attachments: SCM-431-ad.patch, SCM-431.patch, stack_parse_x.txt
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (SCM-431) Username and Password cause NumberFormatException in scm:hg:http URLS

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed SCM-431.
----------------------------

    Resolution: Fixed

fixed rev 961960

> Username and Password cause NumberFormatException in scm:hg:http URLS
> ---------------------------------------------------------------------
>
>                 Key: SCM-431
>                 URL: http://jira.codehaus.org/browse/SCM-431
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-mercurial (hg)
>         Environment: Hg version: 1.1+20081202
> MacOSX 10.5.4
> Java version "1.6.0_07"
> Maven version: 2.0.6
>            Reporter: Andrew Denyes
>            Assignee: Olivier Lamy
>             Fix For: 1.4
>
>         Attachments: SCM-431-ad.patch, SCM-431.patch, stack_parse_x.txt
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira