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
Use SecureString for password length validation (#43465)
This replaces the use of char[] in the password length validation
code, with the use of SecureString
Although the use of char[] is not in itself problematic, using a
SecureString encourages callers to think about the lifetime of the
password object and to clear it after use.
Backport of: #42884
Copy file name to clipboardExpand all lines: x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/ChangePasswordRequestBuilder.java
+1-1
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ public ChangePasswordRequestBuilder username(String username) {
Copy file name to clipboardExpand all lines: x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/user/PutUserRequestBuilder.java
+12-5
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,6 @@
25
25
26
26
importjava.io.IOException;
27
27
importjava.io.InputStream;
28
-
importjava.util.Arrays;
29
28
importjava.util.Map;
30
29
importjava.util.Objects;
31
30
@@ -50,7 +49,15 @@ public PutUserRequestBuilder roles(String... roles) {
50
49
returnthis;
51
50
}
52
51
52
+
/**
53
+
* @deprecated Use {@link #password(SecureString, Hasher)} instead.
Copy file name to clipboardExpand all lines: x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/esnative/tool/SetupPasswordTool.java
0 commit comments