Skip to content

Commit ea7da88

Browse files
brendanJsonarjyemin
authored andcommitted
JAVA-2763: Replace ',' (comma) with =2C instead of =2D in username for SCRAM-SHA-1 authentication
1 parent 31dfed0 commit ea7da88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver-core/src/main/com/mongodb/connection/ScramSha1Authenticator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ private HashMap<String, String> parseServerResponse(final String response) {
282282
}
283283

284284
private String prepUserName(final String userName) {
285-
return userName.replace("=", "=3D").replace(",", "=2D");
285+
return userName.replace("=", "=3D").replace(",", "=2C");
286286
}
287287

288288
private byte[] xor(final byte[] a, final byte[] b) {

0 commit comments

Comments
 (0)