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

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new bc7f4d4be6 Add missing strings
bc7f4d4be6 is described below

commit bc7f4d4be6efd4a90f298cc0278feb3680de9404
Author: remm <r...@apache.org>
AuthorDate: Thu Feb 8 11:45:33 2024 +0100

    Add missing strings
---
 java/org/apache/catalina/filters/CsrfPreventionFilter.java       | 3 ++-
 java/org/apache/catalina/filters/LocalStrings.properties         | 1 +
 java/org/apache/tomcat/util/codec/binary/BaseNCodec.java         | 2 +-
 java/org/apache/tomcat/util/codec/binary/LocalStrings.properties | 2 ++
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/filters/CsrfPreventionFilter.java 
b/java/org/apache/catalina/filters/CsrfPreventionFilter.java
index 9958c9ac9b..6640c1c3a5 100644
--- a/java/org/apache/catalina/filters/CsrfPreventionFilter.java
+++ b/java/org/apache/catalina/filters/CsrfPreventionFilter.java
@@ -69,6 +69,7 @@ import org.apache.juli.logging.LogFactory;
  *   Some URLs should not have nonce parameters added to them at all
  */
 public class CsrfPreventionFilter extends CsrfPreventionFilterBase {
+
     /**
      * The default set of URL patterns for which nonces will not be appended.
      */
@@ -244,7 +245,7 @@ public class CsrfPreventionFilter extends 
CsrfPreventionFilterBase {
         } else if (pattern.startsWith("/") && pattern.endsWith("/")) {
             return new PatternPredicate(pattern.substring(1, pattern.length() 
- 1));
         } else {
-            throw new IllegalArgumentException("Unsupported pattern: " + 
pattern);
+            throw new 
IllegalArgumentException(sm.getString("csrfPrevention.unsupportedPattern", 
pattern));
         }
     }
 
diff --git a/java/org/apache/catalina/filters/LocalStrings.properties 
b/java/org/apache/catalina/filters/LocalStrings.properties
index e7766c74d3..5c5da1559e 100644
--- a/java/org/apache/catalina/filters/LocalStrings.properties
+++ b/java/org/apache/catalina/filters/LocalStrings.properties
@@ -24,6 +24,7 @@ corsFilter.wrongType1=Expects an HttpServletRequest object of 
type [{0}]
 corsFilter.wrongType2=Expects an HttpServletRequest object of type [{0}] or 
[{1}]
 
 csrfPrevention.invalidRandomClass=Unable to create Random source using class 
[{0}]
+csrfPrevention.unsupportedPattern=Unsupported pattern [{0}]
 
 expiresFilter.exceptionProcessingParameter=Exception processing configuration 
parameter [{0}]:[{1}]
 expiresFilter.expirationHeaderAlreadyDefined=Request [{0}] with response 
status [{1}] content-type [{2}], expiration header already defined
diff --git a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java 
b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
index 51e3792e0e..8030c9aa08 100644
--- a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
+++ b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
@@ -194,7 +194,7 @@ public abstract class BaseNCodec implements BinaryEncoder, 
BinaryDecoder {
     private static int createPositiveCapacity(final int minCapacity) {
         if (minCapacity < 0) {
             // overflow
-            throw new OutOfMemoryError("Unable to allocate array size: " + 
(minCapacity & 0xffffffffL));
+            throw new OutOfMemoryError(sm.getString("base64.outOfMemory", 
Long.valueOf(minCapacity & 0xffffffffL)));
         }
         // This is called when we require buffer expansion to a very big array.
         // Use the conservative maximum buffer size if possible, otherwise the 
biggest required.
diff --git a/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties 
b/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties
index 1ae86a32fb..6b17260a15 100644
--- a/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties
@@ -17,3 +17,5 @@ base64.impossibleModulus=Impossible modulus [{0}]
 base64.inputTooLarge=Input array too large, the output array would be bigger 
[{0}] than the specified maximum size of [{1}]
 base64.lineSeparator=Line separator must not contain base64 characters [{0}]
 base64.nullEncodeParameter=Cannot encode integer with null parameter
+
+base64.outOfMemory=Unable to allocate array size [{0}]


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

Reply via email to