Browse Source

tomcat9 Debian release 9.0.36-1

-----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCgAwFiEEuM5N4hCA3PkD4WxA9RPEGeS50KwFAl7x1QQSHGVib3VyZ0Bh
 cGFjaGUub3JnAAoJEPUTxBnkudCs2xQP/jP7LMqzkaNXV7m6J1+s4UlUcUH85mhM
 XMT5BNhn+A5WULXDji6b7eiga/plosn3pX8xCEkm4K2jY2erETQFzc2DHXcm6+/J
 G3UQA1Cde/Y20oxg0+DVL5/G3WbidYmzUHsLjHBhtnu0xQpPZ+qnSS+hQmqj3Wna
 FZ2I9YoH1DnFmCWzKP0/2Ux53Tgih8gmMCwiTmcmc6akvFllRMTj+Maul+QwFgaG
 cOEZfPV3bZk+IWp/37PUyuJUlZeXDhe/fnk5u81vTddudeVqhBE7/xnhJKKJ10Kd
 9Yk7E0CJ0mI/lcwVjasOEEOOtPoi944FvH1YJV04BFHav1pqY7R7FINlIgZQfCo5
 an0eFTw+1TWh8kS4AVmoCNaKV0rpwhxiD1M6uqbXOBGB+E5M0bwvBR71kwbmVVTe
 tO6h7bydsANRlUp6ZlLMT8N7sYhqjdUat7z5zhRnJjeB20gDj7Wb/vJCtcuyBrEc
 aul0Oyec+J1D6SHlYr91TUTiNbFimao4Zvh2KWpSJxsLFZ0BOurIJMBnoYoKCkAf
 oapqzSWWdNFGvXJQd1ETBlnJ1lQwa6APYaITj9xHYXr1D9/FI62NddmS0IIt16gU
 0qO9Iu25ZvtlLHYPtKAzuYTbUI8zYQKXz6gkcMMmJyIlRoAr83Qkxl93SBSBCpwP
 23r6aRWcuGbi
 =lKgq
 -----END PGP SIGNATURE-----

Merge tag 'debian/9.0.36-1'

tomcat9 Debian release 9.0.36-1
tags/devuan/9.0.36-1+devuan1
Andreas Messer 8 months ago
parent
commit
f4ee1c4934
100 changed files with 1015 additions and 590 deletions
  1. +2
    -1
      .gitignore
  2. +22
    -1
      bin/catalina.sh
  3. +14
    -13
      build.properties.default
  4. +36
    -6
      build.xml
  5. +1
    -1
      conf/catalina.policy
  6. +6
    -6
      conf/tomcat-users.xsd
  7. +16
    -0
      debian/changelog
  8. +1
    -1
      debian/patches/0005-skip-test-failures.patch
  9. +3
    -3
      debian/patches/0009-Use-java.security.policy-file-in-catalina.sh.patch
  10. +1
    -1
      debian/patches/0021-dont-test-unsupported-ciphers.patch
  11. +1
    -1
      debian/tomcat9.postinst
  12. +1
    -1
      debian/tomcat9.tmpfile
  13. +3
    -3
      java/javax/el/BeanELResolver.java
  14. +37
    -2
      java/javax/el/ImportHandler.java
  15. +1
    -2
      java/javax/el/LambdaExpression.java
  16. +2
    -2
      java/javax/el/LocalStrings_ja.properties
  17. +2
    -0
      java/javax/el/LocalStrings_zh_CN.properties
  18. +6
    -6
      java/javax/el/Util.java
  19. +1
    -0
      java/javax/servlet/LocalStrings_zh_CN.properties
  20. +8
    -10
      java/javax/servlet/ServletSecurityElement.java
  21. +2
    -0
      java/javax/servlet/http/LocalStrings_zh_CN.properties
  22. +1
    -1
      java/javax/servlet/jsp/JspApplicationContext.java
  23. +13
    -15
      java/javax/servlet/jsp/el/ImplicitObjectELResolver.java
  24. +1
    -2
      java/javax/servlet/jsp/tagext/SimpleTagSupport.java
  25. +5
    -5
      java/javax/servlet/jsp/tagext/TagAttributeInfo.java
  26. +2
    -2
      java/javax/servlet/jsp/tagext/TagData.java
  27. +9
    -9
      java/javax/servlet/jsp/tagext/TagLibraryInfo.java
  28. +8
    -0
      java/org/apache/catalina/Loader.java
  29. +3
    -1
      java/org/apache/catalina/ant/AbstractCatalinaTask.java
  30. +4
    -11
      java/org/apache/catalina/ant/DeployTask.java
  31. +3
    -3
      java/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java
  32. +3
    -3
      java/org/apache/catalina/authenticator/AuthenticatorBase.java
  33. +2
    -4
      java/org/apache/catalina/authenticator/BasicAuthenticator.java
  34. +2
    -2
      java/org/apache/catalina/authenticator/FormAuthenticator.java
  35. +16
    -16
      java/org/apache/catalina/authenticator/LocalStrings_ja.properties
  36. +16
    -0
      java/org/apache/catalina/authenticator/LocalStrings_zh_CN.properties
  37. +3
    -3
      java/org/apache/catalina/authenticator/SingleSignOn.java
  38. +3
    -3
      java/org/apache/catalina/authenticator/jaspic/LocalStrings_ja.properties
  39. +4
    -0
      java/org/apache/catalina/authenticator/jaspic/LocalStrings_zh_CN.properties
  40. +3
    -0
      java/org/apache/catalina/authenticator/mbeans-descriptors.xml
  41. +45
    -44
      java/org/apache/catalina/connector/Connector.java
  42. +5
    -5
      java/org/apache/catalina/connector/CoyoteAdapter.java
  43. +1
    -0
      java/org/apache/catalina/connector/LocalStrings.properties
  44. +2
    -0
      java/org/apache/catalina/connector/LocalStrings_fr.properties
  45. +3
    -2
      java/org/apache/catalina/connector/LocalStrings_ja.properties
  46. +1
    -0
      java/org/apache/catalina/connector/LocalStrings_ko.properties
  47. +31
    -0
      java/org/apache/catalina/connector/LocalStrings_zh_CN.properties
  48. +13
    -12
      java/org/apache/catalina/connector/Request.java
  49. +3
    -0
      java/org/apache/catalina/connector/mbeans-descriptors.xml
  50. +9
    -12
      java/org/apache/catalina/core/ApplicationContext.java
  51. +2
    -8
      java/org/apache/catalina/core/ApplicationDispatcher.java
  52. +12
    -12
      java/org/apache/catalina/core/ApplicationFilterFactory.java
  53. +3
    -6
      java/org/apache/catalina/core/ApplicationFilterRegistration.java
  54. +5
    -8
      java/org/apache/catalina/core/ApplicationHttpRequest.java
  55. +2
    -3
      java/org/apache/catalina/core/ApplicationPushBuilder.java
  56. +2
    -2
      java/org/apache/catalina/core/ApplicationRequest.java
  57. +4
    -8
      java/org/apache/catalina/core/AsyncContextImpl.java
  58. +8
    -8
      java/org/apache/catalina/core/ContainerBase.java
  59. +1
    -2
      java/org/apache/catalina/core/DefaultInstanceManager.java
  60. +7
    -8
      java/org/apache/catalina/core/LocalStrings.properties
  61. +0
    -1
      java/org/apache/catalina/core/LocalStrings_es.properties
  62. +0
    -1
      java/org/apache/catalina/core/LocalStrings_fr.properties
  63. +39
    -33
      java/org/apache/catalina/core/LocalStrings_ja.properties
  64. +0
    -1
      java/org/apache/catalina/core/LocalStrings_ko.properties
  65. +149
    -1
      java/org/apache/catalina/core/LocalStrings_zh_CN.properties
  66. +112
    -123
      java/org/apache/catalina/core/StandardContext.java
  67. +3
    -3
      java/org/apache/catalina/core/StandardHost.java
  68. +11
    -11
      java/org/apache/catalina/core/StandardServer.java
  69. +26
    -37
      java/org/apache/catalina/core/StandardWrapper.java
  70. +3
    -0
      java/org/apache/catalina/core/mbeans-descriptors.xml
  71. +3
    -0
      java/org/apache/catalina/deploy/LocalStrings_zh_CN.properties
  72. +3
    -0
      java/org/apache/catalina/deploy/mbeans-descriptors.xml
  73. +3
    -3
      java/org/apache/catalina/filters/CsrfPreventionFilterBase.java
  74. +4
    -2
      java/org/apache/catalina/filters/LocalStrings_ja.properties
  75. +19
    -0
      java/org/apache/catalina/filters/LocalStrings_zh_CN.properties
  76. +2
    -2
      java/org/apache/catalina/filters/RemoteIpFilter.java
  77. +3
    -3
      java/org/apache/catalina/filters/RequestDumperFilter.java
  78. +1
    -0
      java/org/apache/catalina/ha/authenticator/LocalStrings_zh_CN.properties
  79. +3
    -0
      java/org/apache/catalina/ha/authenticator/mbeans-descriptors.xml
  80. +1
    -1
      java/org/apache/catalina/ha/backend/LocalStrings_ja.properties
  81. +17
    -0
      java/org/apache/catalina/ha/backend/LocalStrings_zh_CN.properties
  82. +3
    -0
      java/org/apache/catalina/ha/context/LocalStrings_zh_CN.properties
  83. +12
    -11
      java/org/apache/catalina/ha/context/ReplicatedContext.java
  84. +5
    -5
      java/org/apache/catalina/ha/deploy/FarmWarDeployer.java
  85. +11
    -11
      java/org/apache/catalina/ha/deploy/LocalStrings_ja.properties
  86. +21
    -0
      java/org/apache/catalina/ha/deploy/LocalStrings_zh_CN.properties
  87. +4
    -4
      java/org/apache/catalina/ha/deploy/WarWatcher.java
  88. +3
    -0
      java/org/apache/catalina/ha/deploy/mbeans-descriptors.xml
  89. +2
    -6
      java/org/apache/catalina/ha/session/BackupManager.java
  90. +7
    -7
      java/org/apache/catalina/ha/session/DeltaManager.java
  91. +22
    -23
      java/org/apache/catalina/ha/session/DeltaRequest.java
  92. +5
    -5
      java/org/apache/catalina/ha/session/DeltaSession.java
  93. +31
    -1
      java/org/apache/catalina/ha/session/LocalStrings_zh_CN.properties
  94. +2
    -2
      java/org/apache/catalina/ha/session/mbeans-descriptors.xml
  95. +1
    -1
      java/org/apache/catalina/ha/tcp/LocalStrings_ja.properties
  96. +14
    -0
      java/org/apache/catalina/ha/tcp/LocalStrings_zh_CN.properties
  97. +4
    -4
      java/org/apache/catalina/ha/tcp/ReplicationValve.java
  98. +1
    -1
      java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
  99. +7
    -7
      java/org/apache/catalina/loader/LocalStrings_ja.properties
  100. +32
    -0
      java/org/apache/catalina/loader/LocalStrings_zh_CN.properties

+ 2
- 1
.gitignore View File

@@ -26,6 +26,7 @@ mvn.properties
.ant-targets-build.xml
.checkstyle
.classpath
.externalToolBuilders
.fbprefs
.project
.settings
@@ -36,7 +37,7 @@ mvn.properties
*.asc
*.jj
*.tmp
maven-ant-tasks-*.jar
maven-resolver-ant-tasks-*.jar
thumbs.db
Thumbs.db
bin/setenv.*


+ 22
- 1
bin/catalina.sh View File

@@ -36,6 +36,14 @@
# will be redirected.
# Default is $CATALINA_BASE/logs/catalina.out
#
# CATALINA_OUT_CMD (Optional) Command which will be executed and receive
# as its stdin the stdout and stderr from the Tomcat java
# process. If CATALINA_OUT_CMD is set, the value of
# CATALINA_OUT will be used as a named pipe.
# No default.
# Example (all one line)
# CATALINA_OUT_CMD="/usr/bin/rotatelogs -f $CATALINA_BASE/logs/catalina.out.%Y-%m-%d.log 86400"
#
# CATALINA_OPTS (Optional) Java runtime options used when the "start",
# "run" or "debug" command is executed.
# Include here and not in JAVA_OPTS all options, that should
@@ -463,7 +471,20 @@ elif [ "$1" = "start" ] ; then
fi

shift
touch "$CATALINA_OUT"
if [ -z "$CATALINA_OUT_CMD" ] ; then
touch "$CATALINA_OUT"
else
if [ ! -e "$CATALINA_OUT" ]; then
if ! mkfifo "$CATALINA_OUT"; then
echo "cannot create named pipe $CATALINA_OUT. Start aborted."
exit 1
fi
elif [ ! -p "$CATALINA_OUT" ]; then
echo "$CATALINA_OUT exists and is not a named pipe. Start aborted."
exit 1
fi
$CATALINA_OUT_CMD <"$CATALINA_OUT" &
fi
if [ "$1" = "-security" ] ; then
if [ $have_tty -eq 1 ]; then
echo "Using Security Manager"


+ 14
- 13
build.properties.default View File

@@ -25,7 +25,7 @@
# ----- Version Control Flags -----
version.major=9
version.minor=0
version.build=34
version.build=36
version.patch=0
version.suffix=

@@ -129,7 +129,7 @@ wsdl4j-lib.loc=${base-maven.loc}/wsdl4j/wsdl4j/${wsdl4j-lib.version}/wsdl4j-${ws
# ----- Eclipse JDT, version 4.7 or later -----#
# See https://cwiki.apache.org/confluence/display/TOMCAT/Managing+Tomcat%27s+Dependency+on+the+Eclipse+JDT+Core+Batch+Compiler
#
# Checksum is from "SHA512 Checksums for 4.13" link at
# Checksum is from "SHA512 Checksums for 4.15" link at
# http://download.eclipse.org/eclipse/downloads/drops4/R-4.15-202003050155/
# http://download.eclipse.org/eclipse/downloads/drops4/R-4.15-202003050155/checksum/eclipse-4.15-SUMSSHA512
#
@@ -145,19 +145,19 @@ jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj
jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj-${jdt.version}.jar

# ----- Tomcat native library -----
tomcat-native.version=1.2.23
tomcat-native.version=1.2.24
tomcat-native.src.checksum.enabled=true
tomcat-native.src.checksum.algorithm=SHA-512
tomcat-native.src.checksum.value=89a0363961d322a87f4e752f4727f54f28ac6e4ad10fa21b6b7390c62b041d4068672d95495d9233c1cad7d6c1dc3c85fbd0186894085b3b94e476876af160ee
tomcat-native.src.checksum.value=5dae151a60f8bd5a9a29d63eca838c77174426025ee65a826f0698943494dd3656d50bcd417e220a926b9ce111ea167043d4b806264030e951873d06767b3d6f
tomcat-native.win.checksum.enabled=true
tomcat-native.win.checksum.algorithm=SHA-512
tomcat-native.win.checksum.value=b5d91d709241fea5f18fbaf2eb1dbad3c3014309ac72dfc10c0eb7c2f926a8e37a4c326ce251552bbd2b1f15b86c84ae72c33a259cc051765ab4322c91b5721b
tomcat-native.win.checksum.value=c2d581f1f602dce61abc36370ce485c805b90863301555fc3d44362b655f34f950d0096fad22895374086f33d4505792c27f83fe35d4aeb87a08215bea8ae74a
tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
tomcat-native.loc.2=${base-tomcat.loc.2}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
tomcat-native.win.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/binaries/tomcat-native-${tomcat-native.version}-openssl-1.1.1c-win32-bin.zip
tomcat-native.win.2=${base-tomcat.loc.2}/tomcat-connectors/native/${tomcat-native.version}/binaries/tomcat-native-${tomcat-native.version}-openssl-1.1.1c-win32-bin.zip
tomcat-native.win.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/binaries/tomcat-native-${tomcat-native.version}-openssl-1.1.1g-win32-bin.zip
tomcat-native.win.2=${base-tomcat.loc.2}/tomcat-connectors/native/${tomcat-native.version}/binaries/tomcat-native-${tomcat-native.version}-openssl-1.1.1g-win32-bin.zip

# ----- NSIS, version 3.0 or later -----
nsis.version=3.04
@@ -204,10 +204,10 @@ commons-daemon.native.win.loc.1=${base-commons.loc.1}/daemon/binaries/windows/co
commons-daemon.native.win.loc.2=${base-commons.loc.2}/daemon/binaries/windows/commons-daemon-${commons-daemon.version}-bin-windows.zip

# ----- JUnit Unit Test Suite, version 4.11 or later -----
junit.version=4.12
junit.version=4.13
junit.checksum.enabled=true
junit.checksum.algorithm=MD5|SHA-1
junit.checksum.value=5b38c40c97fbd0adee29f91e60405584|2973d150c0dc1fefe998f834810d68f278ea58ec
junit.checksum.value=5da6445d7b80aba2623e73d4561dcfde|e49ccba652b735c93bd6e6f59760d8254cf597dd
junit.home=${base.path}/junit-${junit.version}
junit.jar=${junit.home}/junit-${junit.version}.jar
junit.loc=${base-maven.loc}/junit/junit/${junit.version}/junit-${junit.version}.jar
@@ -288,16 +288,17 @@ saaj-api.loc=${base-maven.loc}/javax/xml/soap/saaj-api/${saaj-api.version}/saaj-

# ----- bnd & bndlib, version 4.0.0 or later -----
# ----- provides OSGI metadata for JARs -----
bnd.version=4.2.0
bnd.version=5.1.0

# checksums for biz.aQute.bnd-4.2.0.jar, biz.aQute.bndlib-4.2.0.jar
# checksums for biz.aQute.bnd-5.1.0.jar
bnd.checksum.enabled=true
bnd.checksum.algorithm=MD5|SHA-1
bnd.checksum.value=ca26a671ea67bf75d83b1588bdd68923|d4bc96b2619f95e596bbf3f725f3b077e96c5d43
bnd.checksum.value=477684fd83707666cc84a766b147ed0c|9069bc1afad9201e3dc2efe62c0d5193777d16ae

# checksums for biz.aQute.bndlib-5.1.0.jar
bndlib.checksum.enabled=true
bndlib.checksum.algorithm=MD5|SHA-1
bndlib.checksum.value=7519e890783ade99bb74608d0efbf8c4|c4fa30ac11cc0bf27b1f706ac8ebae8cec358e77
bndlib.checksum.value=59dfe87f09e3f03be891327a91430182|30e119e5b3ae63dbb86532490855707b009e1b2e

bnd.home=${base.path}/bnd-${bnd.version}
bnd.jar=${bnd.home}/biz.aQute.bnd-${bnd.version}.jar


+ 36
- 6
build.xml View File

@@ -1389,22 +1389,33 @@
filesId="files.tomcat-embed-core"
notice="${tomcat.manifests}/servlet-api.jar.notice"
license="${tomcat.manifests}/servlet-api.jar.license"
addOSGi="true" />
addOSGi="true"
addGraal="true"
graalPrefix="org.apache.tomcat.embed/tomcat-embed-core"
graalFiles="res/graal/tomcat-embed-core/native-image"/>
<jarIt jarfile="${tomcat-embed-jasper.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-embed-jasper"
meta-inf="${tomcat.manifests}/jasper.jar"
addOSGi="true" />
addOSGi="true"
addGraal="true"
graalPrefix="org.apache.tomcat.embed/tomcat-embed-jasper"
graalFiles="res/graal/tomcat-embed-jasper/native-image"/>
<jarIt jarfile="${tomcat-embed-el.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-embed-el"
addOSGi="true" />
addOSGi="true"
addGraal="true"
graalPrefix="org.apache.tomcat.embed/tomcat-embed-el"
graalFiles="res/graal/tomcat-embed-el/native-image"/>
<jarIt jarfile="${tomcat-embed-websocket.jar}"
filesDir="${tomcat.classes}"
filesId="files.tomcat-embed-websocket"
meta-inf="${tomcat.manifests}/tomcat-websocket.jar"
addOSGi="true" />

addOSGi="true"
addGraal="true"
graalPrefix="org.apache.tomcat.embed/tomcat-embed-websocket"
graalFiles="res/graal/tomcat-embed-websocket/native-image"/>
</target>

<target name="embed-sources"
@@ -2140,7 +2151,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
</and>
<filename name="**/*.asc" />
<filename name="**/*.tmp" />
<filename name="**/maven-ant-tasks-*.jar" />
<filename name="**/maven-resolver-ant-tasks-*.jar" />
<filename name="**/thumbs.db" />
<filename name="**/Thumbs.db" />
<filename name="*.launch"/>
@@ -3339,6 +3350,12 @@ Read the Building page on the Apache Tomcat documentation site for details on ho
default="${tomcat.manifests}/default" />
<attribute name="addOSGi" description="generate OSGi metadata"
default="false" />
<attribute name="addGraal" description="add Graal resource/reflection files if set"
default="false" />
<attribute name="graalPrefix" description="Graal resource/reflection location prefix (group_id/artifact_id)"
default="" />
<attribute name="graalFiles" description="Graal resource/reflection file location"
default="" />
<sequential>
<jar jarfile="@{jarfile}" manifest="@{manifest}">
<fileset dir="@{filesDir}">
@@ -3356,6 +3373,12 @@ Read the Building page on the Apache Tomcat documentation site for details on ho
<param name="jarfile" value="@{jarfile}" />
<param name="addOSGi" value="@{addOSGi}" />
</antcall>
<antcall target="add-graal">
<param name="jarfile" value="@{jarfile}" />
<param name="addGraal" value="@{addGraal}" />
<param name="graalFiles" value="@{graalFiles}" />
<param name="graalPrefix" value="@{graalPrefix}" />
</antcall>
</sequential>
</macrodef>

@@ -3368,6 +3391,13 @@ Read the Building page on the Apache Tomcat documentation site for details on ho
<move file="${jarfile}.tmp" tofile="${jarfile}" />
</target>

<target name="add-graal" if="${addGraal}">
<echo message="add-graal ${addGraal} ${jarfile} ${graalFiles} ${graalPrefix}"></echo>
<zip destfile="${jarfile}" update="true">
<zipfileset dir="${basedir}/${graalFiles}" prefix="META-INF/native-image/${graalPrefix}" includes="*.*"/>
</zip>
</target>

<!-- Macro, used to create checksum and signature files -->
<!-- Requires 'file' as a parameter. -->
<macrodef name="hashAndSign">


+ 1
- 1
conf/catalina.policy View File

@@ -39,7 +39,7 @@ grant codeBase "file:${java.home}/jre/lib/ext/-" {
permission java.security.AllPermission;
};

// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
// These permissions apply to javac when ${java.home} points at $JAVA_HOME/jre
grant codeBase "file:${java.home}/../lib/-" {
permission java.security.AllPermission;
};


+ 6
- 6
conf/tomcat-users.xsd View File

@@ -24,21 +24,21 @@
version="1.0">
<xs:element name="tomcat-users">
<xs:complexType>
<xs:sequence>
<xs:element name="role" minOccurs="0" maxOccurs="unbounded">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="role">
<xs:complexType>
<xs:attribute name="rolename" use="required" type="users:entityname" />
<xs:attribute name="description" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="group" minOccurs="0" maxOccurs="unbounded">
<xs:element name="group">
<xs:complexType>
<xs:attribute name="groupname" use="required" type="users:entityname" />
<xs:attribute name="description" type="xs:string" />
<xs:attribute name="roles" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="user" minOccurs="0" maxOccurs="unbounded">
<xs:element name="user">
<xs:complexType>
<xs:attribute name="username" use="required" type="users:entityname" />
<xs:attribute name="fullname" type="xs:string" />
@@ -47,7 +47,7 @@
<xs:attribute name="groups" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:choice>
<xs:attribute name="version" type="xs:string" />
</xs:complexType>
</xs:element>
@@ -56,4 +56,4 @@
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
</xs:schema>

+ 16
- 0
debian/changelog View File

@@ -1,3 +1,19 @@
tomcat9 (9.0.36-1) unstable; urgency=medium

* New upstream release
- Refreshed the patches
* Grant write access on /var/log/tomcat9 to the adm group (LP: #1861881)

-- Emmanuel Bourg <ebourg@apache.org> Tue, 23 Jun 2020 11:47:47 +0200

tomcat9 (9.0.35-1) unstable; urgency=medium

* New upstream release
- Fixes CVE-2020-9484: Remote Code Execution via session persistence (Closes: #961209)
- Refreshed the patches

-- Emmanuel Bourg <ebourg@apache.org> Thu, 21 May 2020 15:50:03 +0200

tomcat9 (9.0.34-1+devuan1) unstable; urgency=medium

* Merge debian version 9.0.34-1


+ 1
- 1
debian/patches/0005-skip-test-failures.patch View File

@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: not-needed
--- a/build.xml
+++ b/build.xml
@@ -1545,8 +1545,10 @@
@@ -1556,8 +1556,10 @@
</filterchain>
</concat>


+ 3
- 3
debian/patches/0009-Use-java.security.policy-file-in-catalina.sh.patch View File

@@ -9,7 +9,7 @@ Bug-Debian: http://bugs.debian.org/585379
Forwarded: not-needed
--- a/bin/catalina.sh
+++ b/bin/catalina.sh
@@ -376,7 +376,7 @@
@@ -384,7 +384,7 @@
-classpath "$CLASSPATH" \
-sourcepath "$CATALINA_HOME"/../../java \
-Djava.security.manager \
@@ -18,7 +18,7 @@ Forwarded: not-needed
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
@@ -405,7 +405,7 @@
@@ -413,7 +413,7 @@
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Djava.security.manager \
@@ -27,7 +27,7 @@ Forwarded: not-needed
-Dcatalina.base="\"$CATALINA_BASE\"" \
-Dcatalina.home="\"$CATALINA_HOME\"" \
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
@@ -473,7 +473,7 @@
@@ -494,7 +494,7 @@
-D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
-classpath "\"$CLASSPATH\"" \
-Djava.security.manager \


+ 1
- 1
debian/patches/0021-dont-test-unsupported-ciphers.patch View File

@@ -4,7 +4,7 @@ Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: not-needed
--- a/test/org/apache/tomcat/util/net/openssl/ciphers/TesterOpenSSL.java
+++ b/test/org/apache/tomcat/util/net/openssl/ciphers/TesterOpenSSL.java
@@ -106,6 +106,23 @@
@@ -107,6 +107,23 @@
unimplemented.add(Cipher.SSL2_RC4_128_EXPORT40_WITH_MD5);
unimplemented.add(Cipher.SSL2_IDEA_128_CBC_WITH_MD5);
unimplemented.add(Cipher.SSL2_DES_192_EDE3_CBC_WITH_MD5);


+ 1
- 1
debian/tomcat9.postinst View File

@@ -75,7 +75,7 @@ case "$1" in

# Grant read/write access to tomcat to the log and cache directories
chown -Rh $TOMCAT_USER:adm /var/log/tomcat9/
chmod 2750 /var/log/tomcat9/
chmod 2760 /var/log/tomcat9/
chown -Rh $TOMCAT_USER:$TOMCAT_GROUP /var/cache/tomcat9/
chmod 750 /var/cache/tomcat9/
;;


+ 1
- 1
debian/tomcat9.tmpfile View File

@@ -3,4 +3,4 @@
# See tmpfiles.d(5) for details

# Type Path Mode UID GID Age Argument
d /var/log/tomcat9 2750 tomcat adm -
d /var/log/tomcat9 2760 tomcat adm -

+ 3
- 3
java/javax/el/BeanELResolver.java View File

@@ -188,9 +188,9 @@ public class BeanELResolver extends ELResolver {
try {
BeanInfo info = Introspector.getBeanInfo(base.getClass());
PropertyDescriptor[] pds = info.getPropertyDescriptors();
for (int i = 0; i < pds.length; i++) {
pds[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
pds[i].setValue(TYPE, pds[i].getPropertyType());
for (PropertyDescriptor pd : pds) {
pd.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
pd.setValue(TYPE, pd.getPropertyType());
}
return Arrays.asList((FeatureDescriptor[]) pds).iterator();
} catch (IntrospectionException e) {


+ 37
- 2
java/javax/el/ImportHandler.java View File

@@ -19,6 +19,8 @@ package javax.el;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -31,6 +33,8 @@ import java.util.concurrent.ConcurrentHashMap;
*/
public class ImportHandler {

private static final boolean IS_SECURITY_ENABLED = (System.getSecurityManager() != null);

private static final Map<String,Set<String>> standardPackages = new HashMap<>();

static {
@@ -452,8 +456,18 @@ public class ImportHandler {
* for the case where the class does exist is a lot less than the
* overhead we save by not calling loadClass().
*/
if (cl.getResource(path) == null) {
return null;
if (IS_SECURITY_ENABLED) {
// Webapps don't have read permission for JAVA_HOME (and
// possibly other sources of classes). Only need to know if the
// class exists at this point. Class loading occurs with
// standard SecurityManager policy next.
if (!AccessController.doPrivileged(new PrivilegedResourceExists(cl, path)).booleanValue()) {
return null;
}
} else {
if (cl.getResource(path) == null) {
return null;
}
}
} catch (ClassCircularityError cce) {
// May happen under a security manager. Ignore it and try loading
@@ -489,4 +503,25 @@ public class ImportHandler {
*/
private static class NotFound {
}


private static class PrivilegedResourceExists implements PrivilegedAction<Boolean> {

private final ClassLoader cl;
private final String name;

public PrivilegedResourceExists(ClassLoader cl, String name) {
this.cl = cl;
this.name = name;
}

@Override
public Boolean run() {
if (cl.getResource(name) == null) {
return Boolean.FALSE;
} else {
return Boolean.TRUE;
}
}
}
}

+ 1
- 2
java/javax/el/LambdaExpression.java View File

@@ -65,8 +65,7 @@ public class LambdaExpression {
// Build the argument map
// Start with the arguments from any outer expressions so if there is
// any overlap the local arguments have priority
Map<String,Object> lambdaArguments = new HashMap<>();
lambdaArguments.putAll(nestedArguments);
Map<String, Object> lambdaArguments = new HashMap<>(nestedArguments);
for (int i = 0; i < formalParamCount; i++) {
lambdaArguments.put(formalParameters.get(i), args[i]);
}


+ 2
- 2
java/javax/el/LocalStrings_ja.properties View File

@@ -29,7 +29,7 @@ expressionFactory.readFailed=[{0}]の読み取りに失敗しました
importHandler.ambiguousImport=クラス [{0}] はすでにインポートした [{1}] と衝突するためインポートできません。
importHandler.ambiguousStaticImport=static import [{0}] はすでにインポートした [{1}] と衝突するため処理できません。
importHandler.classNotFound=存在しないクラス [{0}] はインポートできません。
importHandler.invalidClass=クラス[{0}]は、パブリックで非abstract であり、インタフェースではない。
importHandler.invalidClass=クラス[{0}]は publicで、(Java 9以降では) エクスポートされたパッケージ中にあり、非abstract で非インタフェースである必要があります
importHandler.invalidClassName=インポートするクラスの名前[{0}]にはパッケージが含まれている必要があります
importHandler.invalidClassNameForStatic=クラス [{0}] の static import [{1}] は不正です。
importHandler.invalidStaticName=インポートするstaticメソッドまたはフィールドの名前[{0}]にはクラスが含まれている必要があります。
@@ -45,7 +45,7 @@ propertyReadError=タイプ[{0}]の[{1}]の読み取りエラー
propertyWriteError=タイプ[{0}]の[{1}]への書き込みエラー

staticFieldELResolver.methodNotFound=クラス[{1}]に[{0}]という名前に一致するpublic staticメソッドが見つかりません。
staticFieldELResolver.notFound=クラス[{1}]に[{0}]という名前のpublic staticフィールドが見つかりませんでした。
staticFieldELResolver.notFound=(Java 9 以降ではエクスポートされた) クラス[{1}]に[{0}]という名前のpublic staticフィールドが見つかりませんでした。
staticFieldELResolver.notWriteable=静的フィールド(この場合、クラス[{1}]のフィールド[{0})への書き込みは許可されていません。

util.method.ambiguous=曖昧さのないメソッドを見つけることができません:{0}。{1}({2})


+ 2
- 0
java/javax/el/LocalStrings_zh_CN.properties View File

@@ -23,12 +23,14 @@ elProcessor.defineFunctionNoMethod=无法找到类[{1}]的公共静态方法[{0}
elProcessor.defineFunctionNullParams=一个或多个输入参数为null

expressionFactory.cannotCreate=无法创建类型为[{0}]的表达式工厂
expressionFactory.cannotFind=找不到类型为[{0}]的ExpressionFactory
expressionFactory.readFailed=无法读取[{0}]

importHandler.ambiguousImport=无法导入类[{0}],因为它与已导入的[{1}]冲突
importHandler.ambiguousStaticImport=无法处理静态导入[{0}],因为它与已导入的[{1}]冲突
importHandler.classNotFound=无法导入类[{0}],因为无法找到它
importHandler.invalidClass=类[{0}]必须是公共的、非抽象的、非接口且(对于Java 9+)在一个导出包
importHandler.invalidClassName=要导入的类的名称[{0}]必须包含一个包。
importHandler.invalidClassNameForStatic=为 static import [{1}] 指定的类 [{0}] 不可用
importHandler.invalidStaticName=导入 [{0}] 的静态方法或字段名称必须包含类
importHandler.staticNotFound=导入[{2}]的类[{1}]中找不到静态导入[{0}]


+ 6
- 6
java/javax/el/Util.java View File

@@ -380,11 +380,11 @@ class Util {
private static final String paramString(Class<?>[] types) {
if (types != null) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < types.length; i++) {
if (types[i] == null) {
for (Class<?> type : types) {
if (type == null) {
sb.append("null, ");
} else {
sb.append(types[i].getName()).append(", ");
sb.append(type.getName()).append(", ");
}
}
if (sb.length() > 2) {
@@ -548,11 +548,11 @@ class Util {
(jreCompat.canAcccess(base, m) || base != null && jreCompat.canAcccess(null, m)))) {
return m;
}
Class<?>[] inf = type.getInterfaces();
Class<?>[] interfaces = type.getInterfaces();
Method mp = null;
for (int i = 0; i < inf.length; i++) {
for (Class<?> iface : interfaces) {
try {
mp = inf[i].getMethod(m.getName(), m.getParameterTypes());
mp = iface.getMethod(m.getName(), m.getParameterTypes());
mp = getMethod(mp.getDeclaringClass(), base, mp);
if (mp != null) {
return mp;


+ 1
- 0
java/javax/servlet/LocalStrings_zh_CN.properties View File

@@ -19,6 +19,7 @@ httpConstraintElement.invalidRolesDeny=使用 DENY 时可能未指定角色

httpMethodConstraintElement.invalidMethod=无效的HTTP.方法

value.false=否
value.true=true

wrapper.nullRequest=请求不能为空


+ 8
- 10
java/javax/servlet/ServletSecurityElement.java View File

@@ -93,13 +93,13 @@ public class ServletSecurityElement extends HttpConstraintElement {
List<HttpMethodConstraintElement> l = new ArrayList<>();
HttpMethodConstraint[] constraints = annotation.httpMethodConstraints();
if (constraints != null) {
for (int i = 0; i < constraints.length; i++) {
for (HttpMethodConstraint constraint : constraints) {
HttpMethodConstraintElement e =
new HttpMethodConstraintElement(constraints[i].value(),
new HttpConstraintElement(
constraints[i].emptyRoleSemantic(),
constraints[i].transportGuarantee(),
constraints[i].rolesAllowed()));
new HttpMethodConstraintElement(constraint.value(),
new HttpConstraintElement(
constraint.emptyRoleSemantic(),
constraint.transportGuarantee(),
constraint.rolesAllowed()));
l.add(e);
}
}
@@ -107,14 +107,12 @@ public class ServletSecurityElement extends HttpConstraintElement {
}

public Collection<HttpMethodConstraintElement> getHttpMethodConstraints() {
Collection<HttpMethodConstraintElement> result = new HashSet<>();
result.addAll(methodConstraints.values());
Collection<HttpMethodConstraintElement> result = new HashSet<>(methodConstraints.values());
return result;
}

public Collection<String> getMethodNames() {
Collection<String> result = new HashSet<>();
result.addAll(methodConstraints.keySet());
Collection<String> result = new HashSet<>(methodConstraints.keySet());
return result;
}



+ 2
- 0
java/javax/servlet/http/LocalStrings_zh_CN.properties View File

@@ -14,6 +14,8 @@
# limitations under the License.

err.cookie_name_blank=Cookie名称不能为null或零长度
err.cookie_name_is_token=Cookie name[{0}]是一个保留令牌
err.io.indexOutOfBounds=为大小为[{2}]的数组指定的偏移量[{0}]和/或长度[{1}]无效。
err.io.nullArray=Null在write方法中传递给字节数组
err.io.short_read=短.读



+ 1
- 1
java/javax/servlet/jsp/JspApplicationContext.java View File

@@ -65,7 +65,7 @@ public interface JspApplicationContext {
* if called after the application's
* <code>ServletContextListeners</code> have been initialized.
*/
public void addELResolver(ELResolver resolver) throws IllegalStateException;
public void addELResolver(ELResolver resolver);

/**
* <p>


+ 13
- 15
java/javax/servlet/jsp/el/ImplicitObjectELResolver.java View File

@@ -162,12 +162,12 @@ public class ImplicitObjectELResolver extends ELResolver {
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
List<FeatureDescriptor> feats = new ArrayList<>(SCOPE_NAMES.length);
FeatureDescriptor feat;
for (int i = 0; i < SCOPE_NAMES.length; i++) {
for (String scopeName : SCOPE_NAMES) {
feat = new FeatureDescriptor();
feat.setDisplayName(SCOPE_NAMES[i]);
feat.setDisplayName(scopeName);
feat.setExpert(false);
feat.setHidden(false);
feat.setName(SCOPE_NAMES[i]);
feat.setName(scopeName);
feat.setPreferred(true);
feat.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
feat.setValue(TYPE, String.class);
@@ -254,12 +254,11 @@ public class ImplicitObjectELResolver extends ELResolver {
this.cookie = new ScopeMap<Cookie>() {
@Override
protected Enumeration<String> getAttributeNames() {
Cookie[] c = ((HttpServletRequest) page.getRequest())
.getCookies();
if (c != null) {
Cookie[] cookies = ((HttpServletRequest) page.getRequest()).getCookies();
if (cookies != null) {
Vector<String> v = new Vector<>();
for (int i = 0; i < c.length; i++) {
v.add(c[i].getName());
for (Cookie cookie : cookies) {
v.add(cookie.getName());
}
return v.elements();
}
@@ -268,12 +267,11 @@ public class ImplicitObjectELResolver extends ELResolver {

@Override
protected Cookie getAttribute(String name) {
Cookie[] c = ((HttpServletRequest) page.getRequest())
.getCookies();
if (c != null) {
for (int i = 0; i < c.length; i++) {
if (name.equals(c[i].getName())) {
return c[i];
Cookie[] cookies = ((HttpServletRequest) page.getRequest()).getCookies();
if (cookies != null) {
for (Cookie cookie : cookies) {
if (name.equals(cookie.getName())) {
return cookie;
}
}
}
@@ -323,7 +321,7 @@ public class ImplicitObjectELResolver extends ELResolver {
while (e.hasMoreElements()) {
list.add(e.nextElement());
}
return list.toArray(new String[list.size()]);
return list.toArray(new String[0]);
}
return null;
}


+ 1
- 2
java/javax/servlet/jsp/tagext/SimpleTagSupport.java View File

@@ -193,8 +193,7 @@ public class SimpleTagSupport implements SimpleTag {
JspTag parent = null;
if( from instanceof SimpleTag ) {
parent = ((SimpleTag)from).getParent();
}
else if( from instanceof Tag ) {
} else if( from instanceof Tag ) {
parent = ((Tag)from).getParent();
}
if (parent == null) {


+ 5
- 5
java/javax/servlet/jsp/tagext/TagAttributeInfo.java View File

@@ -167,14 +167,14 @@ public class TagAttributeInfo {
* Convenience static method that goes through an array of TagAttributeInfo
* objects and looks for "id".
*
* @param a
* @param tagAttributeInfos
* An array of TagAttributeInfo
* @return The TagAttributeInfo reference with name "id"
*/
public static TagAttributeInfo getIdAttribute(TagAttributeInfo a[]) {
for (int i = 0; i < a.length; i++) {
if (a[i].getName().equals(ID)) {
return a[i];
public static TagAttributeInfo getIdAttribute(TagAttributeInfo[] tagAttributeInfos) {
for (TagAttributeInfo tagAttributeInfo : tagAttributeInfos) {
if (tagAttributeInfo.getName().equals(ID)) {
return tagAttributeInfo;
}
}
return null; // no such attribute


+ 2
- 2
java/javax/servlet/jsp/tagext/TagData.java View File

@@ -62,8 +62,8 @@ public class TagData implements Cloneable {
}

if (atts != null) {
for (int i = 0; i < atts.length; i++) {
attributes.put((String) atts[i][0], atts[i][1]);
for (Object[] att : atts) {
attributes.put((String) att[0], att[1]);
}
}
}


+ 9
- 9
java/javax/servlet/jsp/tagext/TagLibraryInfo.java View File

@@ -141,9 +141,9 @@ public abstract class TagLibraryInfo {
return null;
}

for (int i = 0; i < tags.length; i++) {
if (shortname.equals(tags[i].getTagName())) {
return tags[i];
for (TagInfo tag : tags) {
if (shortname.equals(tag.getTagName())) {
return tag;
}
}
return null;
@@ -166,9 +166,9 @@ public abstract class TagLibraryInfo {
return null;
}

for (int i = 0; i < tagFiles.length; i++) {
if (tagFiles[i].getName().equals(shortname)) {
return tagFiles[i];
for (TagFileInfo tagFile : tagFiles) {
if (tagFile.getName().equals(shortname)) {
return tagFile;
}
}
return null;
@@ -201,9 +201,9 @@ public abstract class TagLibraryInfo {
return null;
}

for (int i = 0; i < functions.length; i++) {
if (functions[i].getName().equals(name)) {
return functions[i];
for (FunctionInfo function : functions) {
if (function.getName().equals(name)) {
return function;
}
}
return null;


+ 8
- 0
java/org/apache/catalina/Loader.java View File

@@ -96,7 +96,11 @@ public interface Loader {

/**
* @return the reloadable flag for this Loader.
*
* @deprecated Use {@link Context#getReloadable()}. This method will be
* removed in Tomcat 10.
*/
@Deprecated
public boolean getReloadable();


@@ -104,7 +108,11 @@ public interface Loader {
* Set the reloadable flag for this Loader.
*
* @param reloadable The new reloadable flag
*
* @deprecated Use {@link Context#setReloadable(boolean)}. This method will
* be removed in Tomcat 10.
*/
@Deprecated
public void setReloadable(boolean reloadable);




+ 3
- 1
java/org/apache/catalina/ant/AbstractCatalinaTask.java View File

@@ -319,7 +319,9 @@ public abstract class AbstractCatalinaTask extends BaseRedirectorHelperTask {
hconn.connect();

// Swallow response message
IOTools.flow(hconn.getInputStream(), null);
try (InputStream is = hconn.getInputStream()) {
IOTools.flow(is, null);
}
}




+ 4
- 11
java/org/apache/catalina/ant/DeployTask.java View File

@@ -23,6 +23,7 @@ import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.nio.channels.FileChannel;
import java.util.regex.Pattern;

import org.apache.tools.ant.BuildException;
@@ -139,19 +140,11 @@ public class DeployTask extends AbstractCatalinaCommandTask {
throw new BuildException(e);
}
} else {
FileInputStream fsInput = null;
try {
fsInput = new FileInputStream(war);
contentLength = fsInput.getChannel().size();
try (FileInputStream fsInput = new FileInputStream(war);
FileChannel fsChannel = fsInput.getChannel()) {
contentLength = fsChannel.size();
stream = new BufferedInputStream(fsInput, 1024);
} catch (IOException e) {
if (fsInput != null) {
try {
fsInput.close();
} catch (IOException ioe) {
// Ignore
}
}
throw new BuildException(e);
}
}


+ 3
- 3
java/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java View File

@@ -141,10 +141,10 @@ public class JMXAccessorQueryTask extends JMXAccessorTask {
MBeanAttributeInfo attrs[] = minfo.getAttributes();
Object value = null;

for (int i = 0; i < attrs.length; i++) {
if (!attrs[i].isReadable())
for (MBeanAttributeInfo attr : attrs) {
if (!attr.isReadable())
continue;
String attName = attrs[i].getName();
String attName = attr.getName();
if (attName.indexOf('=') >= 0 || attName.indexOf(':') >= 0
|| attName.indexOf(' ') >= 0) {
continue;


+ 3
- 3
java/org/apache/catalina/authenticator/AuthenticatorBase.java View File

@@ -1326,9 +1326,9 @@ public abstract class AuthenticatorBase extends ValveBase
Container parent = context.getParent();
while ((sso == null) && (parent != null)) {
Valve valves[] = parent.getPipeline().getValves();
for (int i = 0; i < valves.length; i++) {
if (valves[i] instanceof SingleSignOn) {
sso = (SingleSignOn) valves[i];
for (Valve valve : valves) {
if (valve instanceof SingleSignOn) {
sso = (SingleSignOn) valve;
break;
}
}


+ 2
- 4
java/org/apache/catalina/authenticator/BasicAuthenticator.java View File

@@ -227,8 +227,7 @@ public class BasicAuthenticator extends AuthenticatorBase {
// step past the auth method name
base64blobOffset = initialOffset + METHOD.length();
base64blobLength = authorization.getLength() - METHOD.length();
}
else {
} else {
// is this possible, or permitted?
throw new IllegalArgumentException(
"Authorization header method is not \"Basic\"");
@@ -271,8 +270,7 @@ public class BasicAuthenticator extends AuthenticatorBase {
if (colon < 0) {
username = new String(decoded, charset);
// password will remain null!
}
else {
} else {
username = new String(decoded, 0, colon, charset);
password = new String(decoded, colon + 1, decoded.length - colon - 1, charset);
// tolerate surplus white space around credentials


+ 2
- 2
java/org/apache/catalina/authenticator/FormAuthenticator.java View File

@@ -650,8 +650,8 @@ public class FormAuthenticator
SavedRequest saved = new SavedRequest();
Cookie cookies[] = request.getCookies();
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
saved.addCookie(cookies[i]);
for (Cookie cookie : cookies) {
saved.addCookie(cookie);
}
}
Enumeration<String> names = request.getHeaderNames();


+ 16
- 16
java/org/apache/catalina/authenticator/LocalStrings_ja.properties View File

@@ -36,7 +36,7 @@ basicAuthenticator.invalidCharset=指定できる値は、null、空の文字列

digestAuthenticator.cacheRemove=有効なエントリがクライアントのnonceキャッシュから削除され、新しいエントリのためのスペースが確保されました。 リプレイ攻撃が可能になりました。 リプレイ攻撃の可能性を防ぐには、nonceValidityを減らすか、nonceCacheSizeを増やしてください。 このタイプの警告は5分間表示されなくなります。

formAuthenticator.forwardErrorFail=予期せぬ異常によりエラーページへ転送します。
formAuthenticator.forwardErrorFail=エラーページへ転送中の予期せぬエラー
formAuthenticator.forwardLogin=リクエストメソッドGETを使用してコンテキスト[{3}]のページ[{2}]にメソッド[{1}]で行われた[{0}]の要求をフォワードします。
formAuthenticator.forwardLoginFail=ログインページへの転送での予期しないエラー
formAuthenticator.noErrorPage=コンテキスト[{0}]のFORM認証にエラーページが定義されていません
@@ -44,27 +44,27 @@ formAuthenticator.noLoginPage=コンテキスト[{0}]のFORM認証にログイ

singleSignOn.debug.associate=SSOはアプリケーションセッション[{1}]をSSOセッション[{0}]に関連付けます
singleSignOn.debug.associateFail=SSOセッション[{1}]が存在しないため、SSOはアプリケーションセッション[{0}]を関連付けられませんでした。
singleSignOn.debug.cookieCheck=SSOがSSOクッキーをチェックします
singleSignOn.debug.cookieCheck=SSOはSSOクッキーをチェックしています
singleSignOn.debug.cookieNotFound=SSOはSSO Cookieを検出しませんでした。
singleSignOn.debug.deregister=SSOセッション[{1}]に関連付けられたアプリケーションセッション[{0}]を期限切れにします。
singleSignOn.debug.deregister=SSOセッション[{1}]に関連付けられたアプリケーションセッション[{0}]を破棄します。
singleSignOn.debug.deregisterFail=キャッシュにないため、SSOセッション[{0}]の登録を解除できませんでした。
singleSignOn.debug.deregisterNone=SSOセッション[{0}]の登録を解除しましたが、関連するアプリケーションセッションが見つかりませんでした。
singleSignOn.debug.deregisterNone=SSOセッション[{0}]の登録を解除しましたが、関連付けられたアプリケーションセッションは見つかりませんでした。
singleSignOn.debug.hasPrincipal=SSOが以前に認証されたプリンシパル[{0}]を検出しました
singleSignOn.debug.invoke=[{0}]に対するSSO処理リクエスト
singleSignOn.debug.principalCheck=SSOセッションのキャッシュされたプリンシパルを探すSSO [{0}]
singleSignOn.debug.invoke=SSO は [{0}] に対するリクエストを処理しています
singleSignOn.debug.principalCheck=SSO は SSO セッション [{0}] のキャッシュされたプリンシパルを探索していま
singleSignOn.debug.principalFound=SSO のキャッシュされたプリンシパル [{0}] を取得しました。認証タイプは [{1}] です。
singleSignOn.debug.principalNotFound=SSOはキャッシュされたプリンシパルを検出しませんでした。 セッション[{0}]のSSO Cookieを消去しています。
singleSignOn.debug.register=認証タイプ[{2}]のユーザー[{1}]のSSOセッション[{0}]を登録しているSSO
singleSignOn.debug.removeSession=SSOセッション[{1}]からのアプリケーションセッション[{0}]の削除
singleSignOn.debug.sessionLogout=SSOセッション[{0}]とアプリケーションセッション[{1}]のログアウトを処理するSSO。
singleSignOn.debug.sessionTimeout=SSOはSSOセッション[{0}]とアプリケーションセッション[{1}]のタイムアウト処理中
singleSignOn.debug.register=SSOは認証タイプ[{2}]のユーザー[{1}]のSSOセッション[{0}]を登録しています
singleSignOn.debug.removeSession=SSOはSSOセッション[{1}]からアプリケーションセッション[{0}]を削除しています
singleSignOn.debug.sessionLogout=SSOはSSOセッション[{0}]とアプリケーションセッション[{1}]をログアウト処理しています
singleSignOn.debug.sessionTimeout=SSOはSSOセッション[{0}]とアプリケーションセッション[{1}]のタイムアウトを処理しています
singleSignOn.debug.update=SSOはSSOセッション[{0}]を認証タイプ[{1}]に更新します。
singleSignOn.sessionExpire.contextNotFound=Contextが見つからないため、SSOはセッション[{0}]を期限切れにできません
singleSignOn.sessionExpire.engineNull=Engine がNullだったため、SSOはセッション[{0}]を期限切れにできません。
singleSignOn.sessionExpire.hostNotFound=ホストが見つからないため SSO セッション [{0}] を失効できません。
singleSignOn.sessionExpire.managerError=セッションを検索するときにManagerが例外をスローしたため、SSOはセッション[{0}]を期限切れにできません
singleSignOn.sessionExpire.managerNotFound=Managerが見つからなかったので、SSOはセッション[{0}]を期限切れにできません。
singleSignOn.sessionExpire.sessionNotFound=セッションが見つかりませんでしたので、SSOはセッション[{0}]を期限切れにできません。
singleSignOn.sessionExpire.contextNotFound=Contextが見つからないため、SSOはセッション[{0}]を破棄できません
singleSignOn.sessionExpire.engineNull=Engine がNullだったため、SSOはセッション[{0}]を破棄できません。
singleSignOn.sessionExpire.hostNotFound=ホストが見つからないため SSO セッション [{0}] を破棄できません。
singleSignOn.sessionExpire.managerError=セッションを検索するときにManagerが例外をスローしたため、SSOはセッション[{0}]を破棄できません
singleSignOn.sessionExpire.managerNotFound=Managerが見つからなかったので、SSOはセッション[{0}]を破棄できません。
singleSignOn.sessionExpire.sessionNotFound=セッションが見つからないため、SSOはセッション[{0}]を破棄できません。

spnegoAuthenticator.authHeaderNoToken=クライアントから受信した Negoiate 認証ヘッダにはトークンがありません。
spnegoAuthenticator.authHeaderNotNego=クライアントから受信した認証ヘッダーは Negotiate から始まっていません。


+ 16
- 0
java/org/apache/catalina/authenticator/LocalStrings_zh_CN.properties View File

@@ -15,6 +15,8 @@

authenticator.certificates=此请求中没有客户端证书链
authenticator.changeSessionId=在身份验证时, 会话 ID 从 [{0} 更改为 [{1}]
authenticator.check.authorize=用户名[{0}]从连接器获得,并被信任为有效。从Tomcat领域获取此用户的角色。
authenticator.check.authorizeFail=领域无法识别用户[{0}]。创建具有该名称且没有角色的主体。
authenticator.check.found=已通过身份验证 [{0}]
authenticator.check.sso=未经过身份验证但找到了SSO会话ID [{0}]。尝试重新验证。
authenticator.formlogin=对表单登录页的直接引用无效
@@ -34,23 +36,37 @@ basicAuthenticator.invalidCharset=只允许值为null、空字符串或UTF-8

digestAuthenticator.cacheRemove=已从客户端 nonce 缓存中删除有效条目,以便为新条目腾出空间。重播攻击现在是可能的。为防止重播攻击的可能性,请降低nonceValidity或增加nonceCacheSize。此类型的进一步警告将被抑制5分钟。

formAuthenticator.forwardErrorFail=转发到错误页时出现意外错误。
formAuthenticator.forwardLogin=使用请求方法GET将使用方法[{1}]发出的对[{0}]的请求转发到上下文[{3}]的登录页[{2}]
formAuthenticator.forwardLoginFail=转发到登录页时出现意外错误。
formAuthenticator.noErrorPage=没有为上下文[{0}]中的表单身份验证定义错误页
formAuthenticator.noLoginPage=在环境[{0}]中,未为FORM认证定义登录页面

singleSignOn.debug.associate=SSO将应用程序会话[{1}]与SSO会话[{0}]关联
singleSignOn.debug.associateFail=SSO无法关联应用程序会话{0},因为SSO会话{1}不存在。
singleSignOn.debug.cookieCheck=SSO检查SSO cookie
singleSignOn.debug.cookieNotFound=SSO没有找到SSO cookie
singleSignOn.debug.deregister=与SSO会话[{1}]关联的SSO过期应用程序会话[{0}]
singleSignOn.debug.deregisterFail=SSO撤销登记SSO会话[{0}]失败,因为缓存中不包含这个SSO会话
singleSignOn.debug.deregisterNone=SSO注销了SSO会话[{0}],但未找到关联的应用程序会话
singleSignOn.debug.hasPrincipal=找到以前经过身份验证的主体[{0}]
singleSignOn.debug.invoke=SSO为[{0}]处理请求
singleSignOn.debug.principalCheck=SSO为SSO会话[{0}]寻找缓存的Principal
singleSignOn.debug.principalFound=SSO 找到了带着认证类型的缓存代理
singleSignOn.debug.principalNotFound=SSO未找到缓存的Principal,为会话[{0}]擦除SSO cookie
singleSignOn.debug.register=使用身份验证类型[{2}]的用户[{1}]的SSO注册SSO会话[{0}]。
singleSignOn.debug.removeSession=SSO 从 SSO session [{1}] 中删除应用程序会话 [{0}]
singleSignOn.debug.sessionLogout=SSO正在处理SSO会话[{0}]和应用程序会话[{1}]的注销
singleSignOn.debug.sessionTimeout=SSO正在处理SSO会话[{0}]和应用程序会话[{1}]的超时
singleSignOn.debug.update=SSO 更新SSO 会话[{0}] 对认证 类型[{1}]
singleSignOn.sessionExpire.contextNotFound=SSO无法中止[{0}],因为Context未找到
singleSignOn.sessionExpire.engineNull=SSO无法使会话[{0}]过期,因为引擎为空。
singleSignOn.sessionExpire.hostNotFound=因为 Host 丢失,SSO 无法使 session [{0}] 失效
singleSignOn.sessionExpire.managerError=由于会话管理器在检索会话时抛出异常,导致单点登录无法使会话[{0}]失效
singleSignOn.sessionExpire.managerNotFound=SSO无法使会话[{0}]过期,因为找不到管理器
singleSignOn.sessionExpire.sessionNotFound=SSO无法使会话[{0}]过期,因为找不到该会话

spnegoAuthenticator.authHeaderNoToken=客户端发送的协商授权 header 未包含 token
spnegoAuthenticator.authHeaderNotNego=客户端发送的授权头不是以协商开始的。
spnegoAuthenticator.serviceLoginFail=无法作为服务主体登录
spnegoAuthenticator.ticketValidateFail=无法验证客户端提供的票证

+ 3
- 3
java/org/apache/catalina/authenticator/SingleSignOn.java View File

@@ -226,9 +226,9 @@ public class SingleSignOn extends ValveBase {
Cookie cookie = null;
Cookie cookies[] = request.getCookies();
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
if (Constants.SINGLE_SIGN_ON_COOKIE.equals(cookies[i].getName())) {
cookie = cookies[i];
for (Cookie value : cookies) {
if (Constants.SINGLE_SIGN_ON_COOKIE.equals(value.getName())) {
cookie = value;
break;
}
}


+ 3
- 3
java/org/apache/catalina/authenticator/jaspic/LocalStrings_ja.properties View File

@@ -13,11 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

authConfigFactoryImpl.load=[{0}]から永続的なプロバイダ登録を読み込みます。
authConfigFactoryImpl.load=[{0}]から永続化プロバイダの登録を読み込みます。
authConfigFactoryImpl.registerClass=アプリケーションコンテキスト [{2}] のレイヤー [{1}] にクラス [{0}] を登録します。
authConfigFactoryImpl.registerInstance=レイヤ[{1}]とアプリケーションコンテキスト[{2}]のタイプ[{0}]のインスタンスの登録
authConfigFactoryImpl.registerInstance=認証構成プロバイダ [{0}] のインスタンスを、レイヤ [{1}] とアプリケーションコンテキスト [{2}] に登録しています
authConfigFactoryImpl.zeroLengthAppContext=文字列長が 0 のアプリケーションコンテキスト名は不正です。
authConfigFactoryImpl.zeroLengthMessageLayer=長さゼロのメッセージ名は無効です
authConfigFactoryImpl.zeroLengthMessageLayer=長さゼロのメッセージレイヤ名は無効です

callbackHandlerImpl.jaspicCallbackMissing=受信したタイプ[{0}]のサポートされていないJASPICコールバックが無視されました。



+ 4
- 0
java/org/apache/catalina/authenticator/jaspic/LocalStrings_zh_CN.properties View File

@@ -14,9 +14,13 @@
# limitations under the License.

authConfigFactoryImpl.load=从[{0}]加载持久化提供者注册信息
authConfigFactoryImpl.registerClass=正在为层[{1}]和应用程序上下文[{2}]注册类[{0}]
authConfigFactoryImpl.registerInstance=正在为层[{1}]和应用程序上下文[{2}]注册类型为[{0}]的实例
authConfigFactoryImpl.zeroLengthAppContext=:)应用上下文名称的长度为0是无效的
authConfigFactoryImpl.zeroLengthMessageLayer=零长度的消息层名称是无效的

callbackHandlerImpl.jaspicCallbackMissing=接收到不支持的类型为{0}的JASPIC回调,该回调被忽略

jaspicAuthenticator.authenticate=通过JASPIC验证[{0}]的请求

persistentProviderRegistrations.deleteFail=无法删除临时文件[{0}]


+ 3
- 0
java/org/apache/catalina/authenticator/mbeans-descriptors.xml View File

@@ -15,6 +15,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE mbeans-descriptors PUBLIC
"-//Apache Software Foundation//DTD Model MBeans Configuration File"
"http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd">
<mbeans-descriptors>

<mbean name="BasicAuthenticator"


+ 45
- 44
java/org/apache/catalina/connector/Connector.java View File

@@ -35,7 +35,6 @@ import org.apache.coyote.AbstractProtocol;
import org.apache.coyote.Adapter;
import org.apache.coyote.ProtocolHandler;
import org.apache.coyote.UpgradeProtocol;
import org.apache.coyote.ajp.AbstractAjpProtocol;
import org.apache.coyote.http11.AbstractHttp11JsseProtocol;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
@@ -43,6 +42,7 @@ import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.buf.B2CConverter;
import org.apache.tomcat.util.buf.CharsetUtil;
import org.apache.tomcat.util.buf.EncodedSolidusHandling;
import org.apache.tomcat.util.buf.UDecoder;
import org.apache.tomcat.util.net.SSLHostConfig;
import org.apache.tomcat.util.net.openssl.OpenSSLImplementation;
import org.apache.tomcat.util.res.StringManager;
@@ -75,49 +75,37 @@ public class Connector extends LifecycleMBeanBase {
* Defaults to using HTTP/1.1 NIO implementation.
*/
public Connector() {
this("org.apache.coyote.http11.Http11NioProtocol");
this("HTTP/1.1");
}


public Connector(String protocol) {
boolean aprConnector = AprLifecycleListener.isAprAvailable() &&
boolean apr = AprLifecycleListener.isAprAvailable() &&
AprLifecycleListener.getUseAprConnector();

if ("HTTP/1.1".equals(protocol) || protocol == null) {
if (aprConnector) {
protocolHandlerClassName = "org.apache.coyote.http11.Http11AprProtocol";
} else {
protocolHandlerClassName = "org.apache.coyote.http11.Http11NioProtocol";
}
} else if ("AJP/1.3".equals(protocol)) {
if (aprConnector) {
protocolHandlerClassName = "org.apache.coyote.ajp.AjpAprProtocol";
} else {
protocolHandlerClassName = "org.apache.coyote.ajp.AjpNioProtocol";
}
} else {
protocolHandlerClassName = protocol;
}

// Instantiate protocol handler
ProtocolHandler p = null;
try {
Class<?> clazz = Class.forName(protocolHandlerClassName);
p = (ProtocolHandler) clazz.getConstructor().newInstance();
p = ProtocolHandler.create(protocol, apr);
} catch (Exception e) {
log.error(sm.getString(
"coyoteConnector.protocolHandlerInstantiationFailed"), e);
} finally {
this.protocolHandler = p;
}

if (p != null) {
protocolHandler = p;
protocolHandlerClassName = protocolHandler.getClass().getName();
} else {
protocolHandler = null;
protocolHandlerClassName = protocol;
}
// Default for Connector depends on this system property
setThrowOnFailure(Boolean.getBoolean("org.apache.catalina.startup.EXIT_ON_INIT_FAILURE"));
}

// Default for Connector depends on this (deprecated) system property
if (Boolean.parseBoolean(System.getProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH", "false"))) {
encodedSolidusHandling = EncodedSolidusHandling.DECODE;
}

public Connector(ProtocolHandler protocolHandler) {
protocolHandlerClassName = protocolHandler.getClass().getName();
this.protocolHandler = protocolHandler;
// Default for Connector depends on this system property
setThrowOnFailure(Boolean.getBoolean("org.apache.catalina.startup.EXIT_ON_INIT_FAILURE"));
}


@@ -148,7 +136,7 @@ public class Connector extends LifecycleMBeanBase {
protected boolean enableLookups = false;


/*
/**
* Is generation of X-Powered-By response header enabled/disabled?
*/
protected boolean xpoweredBy = false;
@@ -271,10 +259,18 @@ public class Connector extends LifecycleMBeanBase {
protected Adapter adapter = null;


/**
* The URI encoding in use.
*/
private Charset uriCharset = StandardCharsets.UTF_8;


private EncodedSolidusHandling encodedSolidusHandling = EncodedSolidusHandling.REJECT;
/**
* The behavior when an encoded solidus (slash) is submitted.
*/
@SuppressWarnings("deprecation")
private EncodedSolidusHandling encodedSolidusHandling =
UDecoder.ALLOW_ENCODED_SLASH ? EncodedSolidusHandling.DECODE : EncodedSolidusHandling.REJECT;


/**
@@ -319,7 +315,11 @@ public class Connector extends LifecycleMBeanBase {
*
* @param name the property name
* @return the property value
*
* @deprecated Use {@link #getProperty(String)}. This will be removed in
* Tomcat 10 onwards.
*/
@Deprecated
public Object getAttribute(String name) {
return getProperty(name);
}
@@ -330,7 +330,11 @@ public class Connector extends LifecycleMBeanBase {
*
* @param name the property name
* @param value the property value
*
* @deprecated Use {@link #setProperty(String, String)}. This will be
* removed in Tomcat 10 onwards.
*/
@Deprecated
public void setAttribute(String name, Object value) {
setProperty(name, String.valueOf(value));
}
@@ -621,18 +625,15 @@ public class Connector extends LifecycleMBeanBase {
* @return the Coyote protocol handler in use.
*/
public String getProtocol() {
if (("org.apache.coyote.http11.Http11NioProtocol".equals(getProtocolHandlerClassName()) &&
(!AprLifecycleListener.isAprAvailable() || !AprLifecycleListener.getUseAprConnector())) ||
"org.apache.coyote.http11.Http11AprProtocol".equals(getProtocolHandlerClassName()) &&
AprLifecycleListener.getUseAprConnector()) {
boolean apr = AprLifecycleListener.getUseAprConnector();
if ((!apr && org.apache.coyote.http11.Http11NioProtocol.class.getName().equals(protocolHandlerClassName))
|| (apr && org.apache.coyote.http11.Http11AprProtocol.class.getName().equals(protocolHandlerClassName))) {
return "HTTP/1.1";
} else if (("org.apache.coyote.ajp.AjpNioProtocol".equals(getProtocolHandlerClassName()) &&
(!AprLifecycleListener.isAprAvailable() || !AprLifecycleListener.getUseAprConnector())) ||
"org.apache.coyote.ajp.AjpAprProtocol".equals(getProtocolHandlerClassName()) &&
AprLifecycleListener.getUseAprConnector()) {
} else if ((!apr && org.apache.coyote.ajp.AjpNioProtocol.class.getName().equals(protocolHandlerClassName))
|| (apr && org.apache.coyote.ajp.AjpAprProtocol.class.getName().equals(protocolHandlerClassName))) {
return "AJP/1.3";
}
return getProtocolHandlerClassName();
return protocolHandlerClassName;
}


@@ -928,9 +929,9 @@ public class Connector extends LifecycleMBeanBase {
* @return a new Servlet response object
*/
public Response createResponse() {
if (protocolHandler instanceof AbstractAjpProtocol<?>) {
int packetSize = ((AbstractAjpProtocol<?>) protocolHandler).getPacketSize();
return new Response(packetSize - org.apache.coyote.ajp.Constants.SEND_HEAD_LEN);
int size = protocolHandler.getDesiredBufferSize();
if (size > 0) {
return new Response(size);
} else {
return new Response();
}


+ 5
- 5
java/org/apache/catalina/connector/CoyoteAdapter.java View File

@@ -702,7 +702,7 @@ public class CoyoteAdapter implements Adapter {
if (request.getContext() == null) {
// Don't overwrite an existing error
if (!response.isError()) {
response.sendError(404, "Not found");
response.sendError(404);
}
// Allow processing to continue.
// If present, the error reporting valve will provide a response
@@ -826,14 +826,14 @@ public class CoyoteAdapter implements Adapter {
if (wrapper != null) {
String[] methods = wrapper.getServletMethods();
if (methods != null) {
for (int i=0; i < methods.length; i++) {
if ("TRACE".equals(methods[i])) {
for (String method : methods) {
if ("TRACE".equals(method)) {
continue;
}
if (header == null) {
header = methods[i];
header = method;
} else {
header += ", " + methods[i];
header += ", " + method;
}
}
}


+ 1
- 0
java/org/apache/catalina/connector/LocalStrings.properties View File

@@ -83,6 +83,7 @@ request.asyncNotSupported=A filter or servlet of the current chain does not supp
request.fragmentInDispatchPath=The fragment in dispatch path [{0}] has been removed
request.illegalWrap=The request wrapper must wrap the request obtained from getRequest()
request.notAsync=It is illegal to call this method if the current request is not in asynchronous mode (i.e. isAsyncStarted() returns false)
request.session.failed=Failed to load session [{0}] due to [{1}]

requestFacade.nullRequest=The request object has been recycled and is no longer associated with this facade



+ 2
- 0
java/org/apache/catalina/connector/LocalStrings_fr.properties View File

@@ -24,6 +24,7 @@ coyoteAdapter.nullRequest=Un dispatch asynchrone peut seulement se produire sur

coyoteConnector.invalidEncoding=L''encodage [{0}] n''est pas reconnu par la JRE. Le connecteur (Connector) continuera à utiliser [{1}]
coyoteConnector.invalidPort=Le connecteur ne peut pas démarrer, parce que la valeur spécifiée du port [{0}] n''est pas valide
coyoteConnector.notAsciiSuperset=L''encodage [{0}] n''inclut pas l''ASCII comme requis par la RFC 7230, le connecteur va continuer à utiliser [{1}]
coyoteConnector.parseBodyMethodNoTrace=La méthode "TRACE" NE PEUT PAS contenir une entité (voir RFC 2616 Section 9.6)
coyoteConnector.protocolHandlerDestroyFailed=La destruction du gestionnaire de protocole a échoué
coyoteConnector.protocolHandlerInitializationFailed=L'initialisation du gestionnaire de protocole a échoué
@@ -82,6 +83,7 @@ request.asyncNotSupported=Un filtre ou un Servlet de la chaîne actuelle ne supp
request.fragmentInDispatchPath=Le fragment dans le chemin de dispatch [{0}] a été enlevé
request.illegalWrap=L'enrobeur de la réponse doit enrober la requête obtenue à partir de getRequest()
request.notAsync=Il est interdit d'appeler cette méthode si la requête actuelle n'est pas en mode asynchrone (isAsyncStarted() a renvoyé false)
request.session.failed=Erreur de chargement de la session [{0}] à cause de [{1}]

requestFacade.nullRequest=L'objet requête a été recyclé et n'est plus associé à cette façade



+ 3
- 2
java/org/apache/catalina/connector/LocalStrings_ja.properties View File

@@ -49,7 +49,7 @@ coyoteRequest.getContextPath.ise=標準的なコンテキストパス[{0}]とユ
coyoteRequest.getInputStream.ise=getReader()はこのリクエストに対して既に呼び出されています
coyoteRequest.getReader.ise=getInputStream()はこのリクエストに対して既に呼び出されています
coyoteRequest.gssLifetimeFail=ユーザープリンシパル [{0}] の残りの寿命(秒単位) を取得できません。
coyoteRequest.maxPostSizeExceeded=マルチパートリクエストには、関連するコネクタで設定されたmaxPostSizeの制限を超えたパラメータデータ(アップロードされたファイルを除く)が含まれていました。
coyoteRequest.maxPostSizeExceeded=マルチパートリクエストには、関連付けられたコネクタで設定されたmaxPostSizeの制限を超えたパラメータデータ(アップロードされたファイルを除く)が含まれていました。
coyoteRequest.noAsync=処理チェーン内の次のクラスが非同期をサポートしていないため、非同期を開始できません。[{0}]
coyoteRequest.noMultipartConfig=multi-part 構成が提供されていないため、partを処理することができません
coyoteRequest.parseParameters=POST パラメーターの処理中に例外を投げました。
@@ -79,10 +79,11 @@ inputBuffer.streamClosed=ストリームはクローズしています
outputBuffer.writeNull=write(String, int, int) メソッドの String 型の引数に null を指定できません。

request.asyncNotSupported=現在のチェーンのフィルタまたはサーブレットは非同期操作をサポートしていません。
request.fragmentInDispatchPath=ディスパッチパス [{0}] 中のフラグメントは除去されました
request.illegalWrap=リクエストラッパーは getRequest() で取得したリクエストをラップしなければなりません。
request.notAsync=非同期モードではないリクエストでこのメソッドを呼び出すことはできません。(例えば isAsyncStarted() が false を返す場合)

requestFacade.nullRequest=リクエストオブジェクトはリサイクルされこのファサードに関連付けられなくなりました。
requestFacade.nullRequest=リクエストオブジェクトは回収されこのファサードに関連付けられなくなりました。

response.illegalWrap=レスポンスラッパーは、getResponse()から取得したレスポンスをラップする必要があります。
response.sendRedirectFail=[{0}] へのリダイレクトが失敗しました。


+ 1
- 0
java/org/apache/catalina/connector/LocalStrings_ko.properties View File

@@ -82,6 +82,7 @@ request.asyncNotSupported=현재 체인의 필터 또는 서블릿이, 비동기
request.fragmentInDispatchPath=디스패치 경로 [{0}](으)로부터 URI fragment를 제거했습니다.
request.illegalWrap=요청 wrapper는 반드시 getRequest()로부터 얻어진 요청을 wrap해야 합니다.
request.notAsync=만일 현재의 쓰레드가 비동기 모드에 있지 않다면, 이 메소드를 호출하는 것은 불허됩니다. (즉, isAsyncStarted()가 false를 반환하는 경우)
request.session.failed=다음 오류로 인해 세션 [{0}]을(를) 로드하지 못했습니다: [{1}]

requestFacade.nullRequest=요청 객체가 이미 참조 해제 되었고, 더 이상 이 facade와 연관되지 않습니다.



+ 31
- 0
java/org/apache/catalina/connector/LocalStrings_zh_CN.properties View File

@@ -13,49 +13,80 @@
# See the License for the specific language governing permissions and
# limitations under the License.

coyoteAdapter.accesslogFail=尝试向访问日志添加条目时发生异常。
coyoteAdapter.asyncDispatch=处理异步请求时发生异常
coyoteAdapter.authenticate=连接器提供的经过身份验证的用户[{0}]。
coyoteAdapter.authorize=(:使用Tomcat的领域授权用户[{0}]
coyoteAdapter.checkRecycled.request=遇到未回收的请求并强制回收。
coyoteAdapter.checkRecycled.response=遇到非回收的相应并强行回收。
coyoteAdapter.debug=变量[{0}]的值为[{1}]。
coyoteAdapter.nullRequest=异步分派只能在现有请求上发生

coyoteConnector.invalidEncoding=编码 [{0}] 不能被 JRE 识别,Connector 将继续使用 [{1}]
coyoteConnector.invalidPort=连接器不能启动,因为指定的端口 [{0}]无效
coyoteConnector.notAsciiSuperset=编码[{0}]不是RFC 7230要求的ASCII超集。连接器将继续使用[{1}]
coyoteConnector.parseBodyMethodNoTrace=方法TRACE禁止包含实体(详情查看RFC 2616 章节 9.6)
coyoteConnector.protocolHandlerDestroyFailed=协议处理程序销毁失败
coyoteConnector.protocolHandlerInitializationFailed=协议处理程序初始化失败
coyoteConnector.protocolHandlerInstantiationFailed=协议处理程序实例化失败
coyoteConnector.protocolHandlerNoAprLibrary=配置的协议[{0}]需要不可用的APR/本机库
coyoteConnector.protocolHandlerNoAprListener=配置的协议[{0}]需要不可用的aprlifecycleListener
coyoteConnector.protocolHandlerPauseFailed=协议处理程序暂停失败
coyoteConnector.protocolHandlerResumeFailed=协议处理程序恢复失败
coyoteConnector.protocolHandlerStartFailed=协议处理器启动失败
coyoteConnector.protocolHandlerStopFailed=协议处理程序.停止失败

coyoteInputStream.nbNotready=在非阻塞模式下,只有之前的读数据完成,并且isReady()方法返回true,你才可以使用 ServletInputStream 读取数据

coyoteOutputStream.nbNotready=在非阻塞模式下,在上一次写入完成且isReady()返回true之前,您不能写入ServletOutputStream

coyoteRequest.alreadyAuthenticated=此请求已通过身份验证
coyoteRequest.attributeEvent=属性事件侦听器引发的异常
coyoteRequest.authenticate.ise=):提交响应后无法调用authenticate()
coyoteRequest.changeSessionId=无法更改 session ID。 没有与此请求关联的 session。
coyoteRequest.chunkedPostTooLarge=由于请求参数数据太大,导致参数不能解析。因为当前请求是块状请求,后续也不会处理。如果应用程序需要接收大的POST请求,可以使用连接器的maxPostSize解决它。
coyoteRequest.filterAsyncSupportUnknown=无法确定是否有任何过滤器不支持异步处理
coyoteRequest.getContextPath.ise=找不到规范上下文路径[{0}]与用户代理[{1}]提供的URI之间的匹配项。
coyoteRequest.getInputStream.ise=已为此请求调用getReader()
coyoteRequest.getReader.ise=当前请求已经调用过方法getInputStream()
coyoteRequest.gssLifetimeFail=为用户主体 [{0}] 获取剩余生命期失败
coyoteRequest.maxPostSizeExceeded=):大多部分请求包含的参数数据(不包括上载的文件)超过了关联连接器上设置的maxPostSize 的限制
coyoteRequest.noAsync=无法启动async,因为处理链中的下列类不支持async[{0}]
coyoteRequest.noMultipartConfig=由于没有提供multi-part配置,无法处理parts
coyoteRequest.parseParameters=处理发布的参数时引发异常
coyoteRequest.postTooLarge=未分析参数,因为发布的数据太大。如果应用程序应接受大型post,请使用连接器的maxPostSize属性来解决此问题。
coyoteRequest.sendfileNotCanonical=无法确定指定用于sendfile的文件[{0}]的规范名称
coyoteRequest.sessionCreateCommitted=提交响应后无法创建会话
coyoteRequest.sessionEndAccessFail=在回收请求时,异常触发了对会话的结束访问。
coyoteRequest.setAttribute.namenull=不能在一个空的名字上调用setAttribute
coyoteRequest.trailersNotReady=在isTrailerFieldsReady()返回true之前调用getTrailerFields()是非法的
coyoteRequest.uploadCreate=根据servlet[{1}]的要求创建临时上载位置[{0}]
coyoteRequest.uploadCreateFail=无法创建上载位置[{0}]
coyoteRequest.uploadLocationInvalid=临时上传路径[{0}]无效

coyoteResponse.encoding.invalid=JRE无法识别编码[{0}]
coyoteResponse.getOutputStream.ise=已为此响应调用getWriter()
coyoteResponse.getWriter.ise=当前响应已经调用了方法getOutputStream()
coyoteResponse.reset.ise=已经提交响应后无法调用reset()
coyoteResponse.resetBuffer.ise=提交响应后无法重置缓冲区
coyoteResponse.sendError.ise=响应提交后无法调用sendError()
coyoteResponse.sendRedirect.ise=提交响应后无法调用sendRedirect()。
coyoteResponse.sendRedirect.note=<html><body><p>重定向到<a href="{0}">{0}</a></p></body></html>
coyoteResponse.setBufferSize.ise=写入数据后无法更改缓冲区大小

inputBuffer.requiresNonBlocking=非阻塞模式下不可用
inputBuffer.streamClosed=关闭的流。

outputBuffer.writeNull=要写入的字符串参数(String,int,int)不能为空

request.asyncNotSupported=当前链的筛选器或servlet不支持异步操作。
request.fragmentInDispatchPath=调度路径[{0}]中的片段已被删除
request.illegalWrap=请求包装器必须包装从getRequest()获得的请求
request.notAsync=如果当前请求不在异步模式下,则调用此方法是非法的(即isAsyncStarted()返回false)

requestFacade.nullRequest=请求对象已被回收,不再与此facade关联

response.illegalWrap=响应包装器必须包装从getResponse()获得的响应
response.sendRedirectFail=重定向到[{0}]失败

responseFacade.nullResponse=响应对象已被回收,不再与此外观关联

+ 13
- 12
java/org/apache/catalina/connector/Request.java View File

@@ -962,8 +962,7 @@ public class Request implements HttpServletRequest {
}
// Take a copy to prevent ConcurrentModificationExceptions if used to
// remove attributes
Set<String> names = new HashSet<>();
names.addAll(attributes.keySet());
Set<String> names = new HashSet<>(attributes.keySet());
return Collections.enumeration(names);
}

@@ -1592,12 +1591,11 @@ public class Request implements HttpServletRequest {
context.getServletContext(), getRequest(), name, value);
}

for (int i = 0; i < listeners.length; i++) {
if (!(listeners[i] instanceof ServletRequestAttributeListener)) {
for (Object o : listeners) {
if (!(o instanceof ServletRequestAttributeListener)) {
continue;
}
ServletRequestAttributeListener listener =
(ServletRequestAttributeListener) listeners[i];
ServletRequestAttributeListener listener = (ServletRequestAttributeListener) o;
try {
if (replaced) {
listener.attributeReplaced(event);
@@ -1629,12 +1627,11 @@ public class Request implements HttpServletRequest {
ServletRequestAttributeEvent event =
new ServletRequestAttributeEvent(context.getServletContext(),
getRequest(), name, value);
for (int i = 0; i < listeners.length; i++) {
if (!(listeners[i] instanceof ServletRequestAttributeListener)) {
for (Object o : listeners) {
if (!(o instanceof ServletRequestAttributeListener)) {
continue;
}
ServletRequestAttributeListener listener =
(ServletRequestAttributeListener) listeners[i];
ServletRequestAttributeListener listener = (ServletRequestAttributeListener) o;
try {
listener.attributeRemoved(event);
} catch (Throwable t) {
@@ -2010,8 +2007,7 @@ public class Request implements HttpServletRequest {
if (!isTrailerFieldsReady()) {
throw new IllegalStateException(sm.getString("coyoteRequest.trailersNotReady"));
}
Map<String,String> result = new HashMap<>();
result.putAll(coyoteRequest.getTrailerFields());
Map<String, String> result = new HashMap<>(coyoteRequest.getTrailerFields());
return result;
}

@@ -2977,6 +2973,11 @@ public class Request implements HttpServletRequest {
try {
session = manager.findSession(requestedSessionId);
} catch (IOException e) {
if (log.isDebugEnabled()) {
log.debug(sm.getString("request.session.failed", requestedSessionId, e.getMessage()), e);
} else {
log.info(sm.getString("request.session.failed", requestedSessionId, e.getMessage()));
}
session = null;
}
if ((session != null) && !session.isValid()) {


+ 3
- 0
java/org/apache/catalina/connector/mbeans-descriptors.xml View File

@@ -15,6 +15,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE mbeans-descriptors PUBLIC
"-//Apache Software Foundation//DTD Model MBeans Configuration File"
"http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd">
<mbeans-descriptors>

<!-- This MBean contains Connector attributes and some common attributes of


+ 9
- 12
java/org/apache/catalina/core/ApplicationContext.java View File

@@ -219,8 +219,7 @@ public class ApplicationContext implements ServletContext {

@Override
public Enumeration<String> getAttributeNames() {
Set<String> names = new HashSet<>();
names.addAll(attributes.keySet());
Set<String> names = new HashSet<>(attributes.keySet());
return Collections.enumeration(names);
}

@@ -312,8 +311,7 @@ public class ApplicationContext implements ServletContext {

@Override
public Enumeration<String> getInitParameterNames() {
Set<String> names = new HashSet<>();
names.addAll(parameters.keySet());
Set<String> names = new HashSet<>(parameters.keySet());
// Special handling for XML settings as these attributes will always be
// available if they have been set on the context
if (context.getTldValidation()) {
@@ -456,10 +454,8 @@ public class ApplicationContext implements ServletContext {
dispatchData.set(dd);
}

MessageBytes uriMB = dd.uriMB;
uriMB.recycle();

// Use the thread local mapping data
MessageBytes uriMB = dd.uriMB;
MappingData mappingData = dd.mappingData;

try {
@@ -489,7 +485,11 @@ public class ApplicationContext implements ServletContext {
} finally {
// Recycle thread local data at the end of the request so references
// are not held to a completed request as there is potential for
// that to trigger a memory leak if a context is unloaded.
// that to trigger a memory leak if a context is unloaded. Not
// strictly necessary here for uriMB but it needs to be recycled at
// some point so do it here for consistency with mappingData which
// must be recycled here.
uriMB.recycle();
mappingData.recycle();
}
}
@@ -1364,10 +1364,7 @@ public class ApplicationContext implements ServletContext {
protected void clearAttributes() {

// Create list of attributes to be removed
List<String> list = new ArrayList<>();
for (String s : attributes.keySet()) {
list.add(s);
}
List<String> list = new ArrayList<>(attributes.keySet());

// Remove application originated attributes
// (read only attributes will be left in place)


+ 2
- 8
java/org/apache/catalina/core/ApplicationDispatcher.java View File

@@ -737,14 +737,8 @@ final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher
}

// Release the filter chain (if any) for this request
try {
if (filterChain != null)
filterChain.release();
} catch (Throwable e) {
ExceptionUtils.handleThrowable(e);
wrapper.getLogger().error(sm.getString("standardWrapper.releaseFilters",
wrapper.getName()), e);
// FIXME: Exception handling needs to be similar to what is in the StandardWrapperValue
if (filterChain != null) {
filterChain.release();
}

// Deallocate the allocated servlet instance


+ 12
- 12
java/org/apache/catalina/core/ApplicationFilterFactory.java View File

@@ -100,14 +100,14 @@ public final class ApplicationFilterFactory {
String servletName = wrapper.getName();

// Add the relevant path-mapped filters to this filter chain
for (int i = 0; i < filterMaps.length; i++) {
if (!matchDispatcher(filterMaps[i] ,dispatcher)) {
for (FilterMap filterMap : filterMaps) {
if (!matchDispatcher(filterMap, dispatcher)) {
continue;
}
if (!matchFiltersURL(filterMaps[i], requestPath))
if (!matchFiltersURL(filterMap, requestPath))
continue;
ApplicationFilterConfig filterConfig = (ApplicationFilterConfig)
context.findFilterConfig(filterMaps[i].getFilterName());
context.findFilterConfig(filterMap.getFilterName());
if (filterConfig == null) {
// FIXME - log configuration problem
continue;
@@ -116,14 +116,14 @@ public final class ApplicationFilterFactory {
}

// Add filters that match on servlet name second
for (int i = 0; i < filterMaps.length; i++) {
if (!matchDispatcher(filterMaps[i] ,dispatcher)) {
for (FilterMap filterMap : filterMaps) {
if (!matchDispatcher(filterMap, dispatcher)) {
continue;
}
if (!matchFiltersServlet(filterMaps[i], servletName))
if (!matchFiltersServlet(filterMap, servletName))
continue;
ApplicationFilterConfig filterConfig = (ApplicationFilterConfig)
context.findFilterConfig(filterMaps[i].getFilterName());
context.findFilterConfig(filterMap.getFilterName());
if (filterConfig == null) {
// FIXME - log configuration problem
continue;
@@ -160,8 +160,8 @@ public final class ApplicationFilterFactory {
// Match on context relative request path
String[] testPaths = filterMap.getURLPatterns();

for (int i = 0; i < testPaths.length; i++) {
if (matchFiltersURL(testPaths[i], requestPath)) {
for (String testPath : testPaths) {
if (matchFiltersURL(testPath, requestPath)) {
return true;
}
}
@@ -242,8 +242,8 @@ public final class ApplicationFilterFactory {
return true;
} else {
String[] servletNames = filterMap.getServletNames();
for (int i = 0; i < servletNames.length; i++) {
if (servletName.equals(servletNames[i])) {
for (String name : servletNames) {
if (servletName.equals(name)) {
return true;
}
}


+ 3
- 6
java/org/apache/catalina/core/ApplicationFilterRegistration.java View File

@@ -17,6 +17,7 @@

package org.apache.catalina.core;

import java.util.Arrays;
import java.util.Collection;
import java.util.EnumSet;
import java.util.HashSet;
@@ -119,9 +120,7 @@ public class ApplicationFilterRegistration

for (FilterMap filterMap : filterMaps) {
if (filterMap.getFilterName().equals(filterDef.getFilterName())) {
for (String servletName : filterMap.getServletNames()) {
result.add(servletName);
}
result.addAll(Arrays.asList(filterMap.getServletNames()));
}
}
return result;
@@ -135,9 +134,7 @@ public class ApplicationFilterRegistration

for (FilterMap filterMap : filterMaps) {
if (filterMap.getFilterName().equals(filterDef.getFilterName())) {
for (String urlPattern : filterMap.getURLPatterns()) {
result.add(urlPattern);
}
result.addAll(Arrays.asList(filterMap.getURLPatterns()));
}
}
return result;


+ 5
- 8
java/org/apache/catalina/core/ApplicationHttpRequest.java View File

@@ -24,6 +24,7 @@ import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
@@ -779,8 +780,8 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper {
*/
protected boolean isSpecial(String name) {

for (int i = 0; i < specials.length; i++) {
if (specials[i].equals(name))
for (String special : specials) {
if (special.equals(name))
return true;
}
return false;
@@ -849,17 +850,13 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper {
if (values1 == null) {
// Skip - nothing to merge
} else {
for (String value : values1) {
results.add(value);
}
results.addAll(Arrays.asList(values1));
}

if (values2 == null) {
// Skip - nothing to merge
} else {
for (String value : values2) {
results.add(value);
}
results.addAll(Arrays.asList(values2));
}

String values[] = new String[results.size()];


+ 2
- 3
java/org/apache/catalina/core/ApplicationPushBuilder.java View File

@@ -18,6 +18,7 @@ package org.apache.catalina.core;