slachiewicz opened a new issue, #1458: URL: https://github.com/apache/maven-scm/issues/1458
`GitUtil.maskPasswordInUrl`, used when a repository is printed or logged, matches `^.*(:[^/].*@).*$`, so everything between the first `:` that is not followed by `/` and the last `@` is replaced by `:********@`. When the path contains an `@`, such as a Jenkins `workspace@2` directory, part of the URL is lost: | URL | Masked | |---|---| | `[email protected]:olamy/workspace@2/repo.git` | `[email protected]:********@2/repo.git` | | `https://user:[email protected]/olamy/workspace@2/repo.git` | `https://user:********@2/repo.git` | | `ssh://[email protected]:2222/olamy/workspace@2/repo.git` | `ssh://[email protected]:********@2/repo.git` | URLs without a second `@` are masked correctly. Nothing leaks, but the masked URL names the wrong host or none. Expected: only the password between `user:` and the `@` that ends the authority is replaced, and the scp-style `git@host:path` form, which has no password, is left alone. Found while testing #1138; the results above come from running the pattern on master against these strings. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
