This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 73fbbba5b1 Add missing strings
73fbbba5b1 is described below
commit 73fbbba5b15aa4a5ed12028f40456fe06d147c4e
Author: remm <[email protected]>
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 4cdc3aafc7..2fe4e618aa 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 32eaa33e5b..80ebaeb288 100644
--- a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
+++ b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
@@ -172,7 +172,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: [email protected]
For additional commands, e-mail: [email protected]