You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/12/02 20:42:40 UTC

[tomcat] 02/03: Force Locale for to[Upper|Lower]Case()

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 4acf1daa741e56e2e509345cc4f331b244f0c7f7
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Dec 2 20:29:19 2019 +0000

    Force Locale for to[Upper|Lower]Case()
---
 java/org/apache/catalina/authenticator/AuthenticatorBase.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/AuthenticatorBase.java b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
index 308b019..610f15b 100644
--- a/java/org/apache/catalina/authenticator/AuthenticatorBase.java
+++ b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
@@ -19,6 +19,7 @@ package org.apache.catalina.authenticator;
 import java.io.IOException;
 import java.security.Principal;
 import java.security.cert.X509Certificate;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Optional;
 import java.util.Set;
@@ -251,11 +252,11 @@ public abstract class AuthenticatorBase extends ValveBase
     // ------------------------------------------------------------- Properties
 
     public String getAllowCorsPreflight() {
-        return allowCorsPreflight.name().toLowerCase();
+        return allowCorsPreflight.name().toLowerCase(Locale.ENGLISH);
     }
 
     public void setAllowCorsPreflight(String allowCorsPreflight) {
-        this.allowCorsPreflight = AllowCorsPreflight.valueOf(allowCorsPreflight.trim().toUpperCase());
+        this.allowCorsPreflight = AllowCorsPreflight.valueOf(allowCorsPreflight.trim().toUpperCase(Locale.ENGLISH));
     }
 
     public boolean getAlwaysUseSession() {


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org