OpenJDK / amber / amber
changeset 51922:7087c6657f35
8207237: SSLSocket#setEnabledCipherSuites is accepting empty string
Reviewed-by: xuelei
author | jnimeh |
---|---|
date | Wed, 25 Jul 2018 09:48:31 -0700 |
parents | 628718bf8970 |
children | 224c202c02a5 |
files | src/java.base/share/classes/sun/security/ssl/CipherSuite.java |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/java.base/share/classes/sun/security/ssl/CipherSuite.java Wed Jul 25 12:32:06 2018 -0400 +++ b/src/java.base/share/classes/sun/security/ssl/CipherSuite.java Wed Jul 25 09:48:31 2018 -0700 @@ -891,9 +891,10 @@ List<CipherSuite> cipherSuites = new ArrayList<>(names.length); for (String name : names) { - if (name == null) { + if (name == null || name.isEmpty()) { throw new IllegalArgumentException( - "The specified CipherSuites array contain null element"); + "The specified CipherSuites array contains " + + "invalid null or empty string elements"); } boolean found = false;