We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fc3877a + 3ed33fe commit 9e862f1Copy full SHA for 9e862f1
1 file changed
mavengem-wagon/src/main/java/org/torquebox/mojo/mavengem/wagon/MavenGemWagon.java
@@ -24,6 +24,7 @@
24
import java.net.SocketAddress;
25
import java.net.URL;
26
import java.net.URLConnection;
27
+import java.util.regex.Matcher;
28
29
public class MavenGemWagon extends StreamWagon {
30
@@ -115,7 +116,7 @@ private URL withAuthentication(String url)
115
116
throws MalformedURLException {
117
if (authenticationInfo != null && authenticationInfo.getUserName() != null) {
118
String credentials = authenticationInfo.getUserName() + ":" + authenticationInfo.getPassword();
- url = url.replaceFirst("^(https?://)(.*)$", "$1" + credentials + "@$2");
119
+ url = url.replaceFirst("^(https?://)(.*)$", "$1" + Matcher.quoteReplacement(credentials) + "@$2");
120
}
121
return new URL(url);
122
0 commit comments