apache / apache/maven-scm

[SCM-877] AbstractSvnScmProvider#parseScmUrl() accepts file URLs with backslashes while SvnTagBranchUtils cannot handle them

Open
#1,107 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
104
Forks
189
Avg merge
17h 46m
Merged PRs (30d)
6

Description

**[Michael Osipov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=michael-o)** opened **[SCM-877](https://issues.apache.org/jira/browse/SCM-877?redirect=false)** and commented

Subversion accepts URLs in the form:

```
svn co file:///D:\my\repo
```

While this URL is invalid, it is still parsed properly. Using the same URL in `` makes SvnTagBranchUtils completely fail in path calculation because it does not handle backslashes at all.

 

The proposed solution is that `parseUrl()` will test file URLs for backslashes and reject them since they are invalid anyway.

---

**Affects:** 1.9.5

**Issue Links:**
- [MNG-6386](https://issues.apache.org/jira/browse/MNG-6386) ${project.baseUri} is not a valid URI (according to RFC 3986)
(_**"depends upon"**_)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with AbstractSvnScmProvider#parseScmUrl() and trace how a file URL from reaches SvnTagBranchUtils. Reproduce the file URL containing backslashes, then verify that parsing rejects it instead of allowing path calculation to fail. Confirm behavior against the related URI constraints in the issue links.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.