You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2018/09/08 22:17:00 UTC

[jira] [Updated] (SCM-909) SvnScmProviderRepository#parseUrl() does not comply with RFC 3986 and RFC 8089

     [ https://issues.apache.org/jira/browse/SCM-909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Osipov updated SCM-909:
-------------------------------
    Description: 
This issue was been found on one of Jenkins slaves. Consider the following path: {{F:\jenkins\jenkins-slave\workspace\maven-box_maven-scm_SCM-906-3AXCXWOA5KAAL37TCEKGJUQCHVU3HMOGCVV63JP76C24C3X6DHOA@2\m\maven-scm-providers\maven-scm-providers-git\maven-scm-provider-gitexe\target}}. THe aforementioned class outputs:
{noformat}
file:///F:/jenkins/jenkins-slave/workspace/maven-box_maven-scm_SCM-906-3AXCXWOA5KAAL37TCEKGJUQCHVU3HMOGCVV63JP76C24C3X6DHOA@2/m/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/target
file://2/m/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/target
{noformat}

The parse logic incorrectly assumes that the last {{@}} is for the user info. According to RFC 8089 a file URL may contain this information, but our parser would still fail becuase it uses {{indexOf}}. It must stop searching to the first slash.

Note: the example is from the GitExe provider, but it also applies to SvnExe.

  was:
This issue was been found on one of Jenkins slaves. Consider the following path: {{F:\jenkins\jenkins-slave\workspace\maven-box_maven-scm_SCM-906-3AXCXWOA5KAAL37TCEKGJUQCHVU3HMOGCVV63JP76C24C3X6DHOA@2\m\maven-scm-providers\maven-scm-providers-git\maven-scm-provider-gitexe\target}}. THe aforementioned class outputs:
{noformat}
file:///F:/jenkins/jenkins-slave/workspace/maven-box_maven-scm_SCM-906-3AXCXWOA5KAAL37TCEKGJUQCHVU3HMOGCVV63JP76C24C3X6DHOA@2/m/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/target
file://2/m/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/target
{noformat}

The parse logic incorrectly assumes that the last {{@}} is for the user info. According to RFC 8089 a file URL may contain this information, but our parser would still fail becuase it uses {{lastIndexOf}}. It must stop searching to the first slash.


    Component/s:     (was: maven-scm-provider-jgit)
                     (was: maven-scm-provider-gitexe)
                 maven-scm-provider-svn

> SvnScmProviderRepository#parseUrl() does not comply with RFC 3986 and RFC 8089
> ------------------------------------------------------------------------------
>
>                 Key: SCM-909
>                 URL: https://issues.apache.org/jira/browse/SCM-909
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-svn
>    Affects Versions: 1.10.0
>            Reporter: Michael Osipov
>            Priority: Major
>
> This issue was been found on one of Jenkins slaves. Consider the following path: {{F:\jenkins\jenkins-slave\workspace\maven-box_maven-scm_SCM-906-3AXCXWOA5KAAL37TCEKGJUQCHVU3HMOGCVV63JP76C24C3X6DHOA@2\m\maven-scm-providers\maven-scm-providers-git\maven-scm-provider-gitexe\target}}. THe aforementioned class outputs:
> {noformat}
> file:///F:/jenkins/jenkins-slave/workspace/maven-box_maven-scm_SCM-906-3AXCXWOA5KAAL37TCEKGJUQCHVU3HMOGCVV63JP76C24C3X6DHOA@2/m/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/target
> file://2/m/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/target
> {noformat}
> The parse logic incorrectly assumes that the last {{@}} is for the user info. According to RFC 8089 a file URL may contain this information, but our parser would still fail becuase it uses {{indexOf}}. It must stop searching to the first slash.
> Note: the example is from the GitExe provider, but it also applies to SvnExe.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)