You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DATAMONGO-1713 - Allow using URL encoded username/password for <mongo-client credentials=… />.
We now URL decode username & password before creating MongoCredentials. This allows usage of reserved characters in the credentials string.
Original pull request: spring-projects#477.
Copy file name to clipboardExpand all lines: spring-data-mongodb/src/main/java/org/springframework/data/mongodb/config/MongoCredentialPropertyEditor.java
+17-2
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2015 the original author or authors.
2
+
* Copyright 2015-2017 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
Copy file name to clipboardExpand all lines: spring-data-mongodb/src/test/java/org/springframework/data/mongodb/config/MongoCredentialPropertyEditorUnitTests.java
+39
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,8 @@
19
19
importstaticorg.hamcrest.core.IsNull.*;
20
20
importstaticorg.junit.Assert.*;
21
21
22
+
importjava.io.UnsupportedEncodingException;
23
+
importjava.net.URLEncoder;
22
24
importjava.util.Arrays;
23
25
importjava.util.List;
24
26
@@ -46,6 +48,12 @@ public class MongoCredentialPropertyEditorUnitTests {
0 commit comments