KEYCLOAK-6009 Fix incorrect String.format usage

This commit is contained in:
k-tamura 2017-12-10 12:02:34 +09:00 committed by Hynek Mlnařík
parent c9b218db71
commit d7a90817f2
2 changed files with 2 additions and 2 deletions

View file

@ -300,7 +300,7 @@ public class CertificateValidator {
logger.debugf("Loading CRL from %s", f.getAbsolutePath()); logger.debugf("Loading CRL from %s", f.getAbsolutePath());
if (!f.canRead()) { if (!f.canRead()) {
throw new IOException(String.format("Unable to read CRL from \"%path\"", f.getAbsolutePath())); throw new IOException(String.format("Unable to read CRL from \"%s\"", f.getAbsolutePath()));
} }
X509CRL crl = loadFromStream(cf, new FileInputStream(f.getAbsolutePath())); X509CRL crl = loadFromStream(cf, new FileInputStream(f.getAbsolutePath()));
return Collections.singleton(crl); return Collections.singleton(crl);

View file

@ -124,7 +124,7 @@ public abstract class AbstractClientCertificateFromHttpHeadersLookup implements
// Get the certificate of the client certificate chain // Get the certificate of the client certificate chain
for (int i = 0; i < certificateChainLength; i++) { for (int i = 0; i < certificateChainLength; i++) {
try { try {
String s = String.format("{0}_{1}", sslCertChainHttpHeaderPrefix, i); String s = String.format("%s_%s", sslCertChainHttpHeaderPrefix, i);
cert = getCertificateFromHttpHeader(httpRequest, s); cert = getCertificateFromHttpHeader(httpRequest, s);
if (cert != null) { if (cert != null) {
chain.add(cert); chain.add(cert);