[ 
https://issues.apache.org/jira/browse/SCM-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17961488#comment-17961488
 ] 

ASF GitHub Bot commented on SCM-431:
------------------------------------

jira-importer commented on issue #650:
URL: https://github.com/apache/maven-scm/issues/650#issuecomment-2964611078

   **[Brian 
Atkinson](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=nairb774)**
 commented
   
   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.
   




> Username and Password cause NumberFormatException in scm:hg:http URLS
> ---------------------------------------------------------------------
>
>                 Key: SCM-431
>                 URL: https://issues.apache.org/jira/browse/SCM-431
>             Project: Maven SCM (Moved to GitHub Issues)
>          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
>            Priority: Major
>             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:[email protected]/code/ebi</connection>
>         
> <developerConnection>scm:hg:http://adenyes:[email protected]/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 was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to