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

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


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

commit 706070a58c873b16ba20f74a53b93b297e1241cf
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 2d65bb3544..9d4639c2bf 100644
--- a/java/org/apache/catalina/filters/CsrfPreventionFilter.java
+++ b/java/org/apache/catalina/filters/CsrfPreventionFilter.java
@@ -70,6 +70,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.
      */
@@ -240,7 +241,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 3575c992a8..7c7bf17fa5 100644
--- a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
+++ b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
@@ -160,7 +160,7 @@ public abstract class BaseNCodec {
     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