svn commit: r1823620 - in /tomcat/trunk: java/org/apache/coyote/http2/HpackDecoder.java webapps/docs/changelog.xml
Author: remm Date: Fri Feb 9 09:02:49 2018 New Revision: 1823620 URL: http://svn.apache.org/viewvc?rev=1823620&view=rev Log: Add minor HPACK fixes, based on fixes by Stuart Douglas. Modified: tomcat/trunk/java/org/apache/coyote/http2/HpackDecoder.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/coyote/http2/HpackDecoder.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/HpackDecoder.java?rev=1823620&r1=1823619&r2=1823620&view=diff == --- tomcat/trunk/java/org/apache/coyote/http2/HpackDecoder.java (original) +++ tomcat/trunk/java/org/apache/coyote/http2/HpackDecoder.java Fri Feb 9 09:02:49 2018 @@ -280,21 +280,23 @@ public class HpackDecoder { * @param index The index from the hpack * @return the real index into the array */ -int getRealIndex(int index) { +int getRealIndex(int index) throws HpackException { //the index is one based, but our table is zero based, hence -1 //also because of our ring buffer setup the indexes are reversed //index = 1 is at position firstSlotPosition + filledSlots -return (firstSlotPosition + (filledTableSlots - index)) % headerTable.length; +int realIndex = (firstSlotPosition + (filledTableSlots - index)) % headerTable.length; +if (realIndex < 0) { +throw new HpackException(sm.getString("hpackdecoder.headerTableIndexInvalid", +Integer.valueOf(index), Integer.valueOf(Hpack.STATIC_TABLE_LENGTH), +Integer.valueOf(filledTableSlots))); +} +return realIndex; } private void addStaticTableEntry(int index) throws HpackException { //adds an entry from the static table. -//this must be an entry with a value as far as I can determine Hpack.HeaderField entry = Hpack.STATIC_TABLE[index]; -if (entry.value == null) { -throw new HpackException(); -} -emitHeader(entry.name, entry.value); +emitHeader(entry.name, (entry.value == null) ? "" : entry.value); } private void addEntryToHeaderTable(Hpack.HeaderField entry) { Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1823620&r1=1823619&r2=1823620&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Fri Feb 9 09:02:49 2018 @@ -62,6 +62,9 @@ Add async HTTP/2 parser for NIO2. (remm) + +Add minor HPACK fixes, based on fixes by Stuart Douglas. (remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1823621 - in /tomcat/tc8.5.x/trunk: java/org/apache/coyote/http2/HpackDecoder.java webapps/docs/changelog.xml
Author: remm Date: Fri Feb 9 09:06:23 2018 New Revision: 1823621 URL: http://svn.apache.org/viewvc?rev=1823621&view=rev Log: Add minor HPACK fixes, based on fixes by Stuart Douglas. Modified: tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/HpackDecoder.java tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/HpackDecoder.java URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/HpackDecoder.java?rev=1823621&r1=1823620&r2=1823621&view=diff == --- tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/HpackDecoder.java (original) +++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/http2/HpackDecoder.java Fri Feb 9 09:06:23 2018 @@ -280,21 +280,23 @@ public class HpackDecoder { * @param index The index from the hpack * @return the real index into the array */ -int getRealIndex(int index) { +int getRealIndex(int index) throws HpackException { //the index is one based, but our table is zero based, hence -1 //also because of our ring buffer setup the indexes are reversed //index = 1 is at position firstSlotPosition + filledSlots -return (firstSlotPosition + (filledTableSlots - index)) % headerTable.length; +int realIndex = (firstSlotPosition + (filledTableSlots - index)) % headerTable.length; +if (realIndex < 0) { +throw new HpackException(sm.getString("hpackdecoder.headerTableIndexInvalid", +Integer.valueOf(index), Integer.valueOf(Hpack.STATIC_TABLE_LENGTH), +Integer.valueOf(filledTableSlots))); +} +return realIndex; } private void addStaticTableEntry(int index) throws HpackException { //adds an entry from the static table. -//this must be an entry with a value as far as I can determine Hpack.HeaderField entry = Hpack.STATIC_TABLE[index]; -if (entry.value == null) { -throw new HpackException(); -} -emitHeader(entry.name, entry.value); +emitHeader(entry.name, (entry.value == null) ? "" : entry.value); } private void addEntryToHeaderTable(Hpack.HeaderField entry) { Modified: tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml?rev=1823621&r1=1823620&r2=1823621&view=diff == --- tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Fri Feb 9 09:06:23 2018 @@ -52,6 +52,13 @@ + + + +Add minor HPACK fixes, based on fixes by Stuart Douglas. (remm) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1823622 - /tomcat/tc8.5.x/trunk/
Author: remm Date: Fri Feb 9 09:12:34 2018 New Revision: 1823622 URL: http://svn.apache.org/viewvc?rev=1823622&view=rev Log: Add minor HPACK fixes, based on fixes by Stuart Douglas. (merge info ...) Modified: tomcat/tc8.5.x/trunk/ (props changed) Propchange: tomcat/tc8.5.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Feb 9 09:12:34 2018 @@ -1,2 +1,2 @@ /tomcat/tc8.0.x/trunk:1809644 -/tomcat/trunk:1734785,1734799,1734845,1734928,1735041,1735044,1735480,1735577,1735597,1735599-1735600,1735615,1736145,1736162,1736209,1736280,1736297,1736299,1736489,1736646,1736703,1736836,1736849,1737104-1737105,1737112,1737117,1737119-1737120,1737155,1737157,1737192,1737280,1737339,1737632,1737664,1737715,1737748,1737785,1737834,1737860,1737903,1737959,1738005,1738007,1738014-1738015,1738018,1738022,1738039,1738043,1738059-1738060,1738147,1738149,1738174-1738175,1738261,1738589,1738623-1738625,1738643,1738816,1738850,1738855,1738946-1738948,1738953-1738954,1738979,1738982,1739079-1739081,1739087,1739113,1739153,1739172,1739176,1739191,1739474,1739492,1739726,1739762,1739775,1739814,1739817-1739818,1739975,1740131,1740324,1740465,1740495,1740508-1740509,1740520,1740535,1740707,1740803,1740810,1740969,1740980,1740991,1740997,1741015,1741033,1741036,1741058,1741060,1741080,1741147,1741159,1741164,1741173,1741181,1741190,1741197,1741202,1741208,1741213,1741221,1741225,1741232,1741409 ,1741501,1741677,1741892,1741896,1741984,1742023,1742042,1742071,1742090,1742093,1742101,1742105,1742111,1742139,1742146,1742148,1742166,1742181,1742184,1742187,1742246,1742248-1742251,1742263-1742264,1742268,1742276,1742369,1742387,1742448,1742509-1742512,1742917,1742919,1742933,1742975-1742976,1742984,1742986,1743019,1743115,1743117,1743124-1743125,1743134,1743425,1743554,1743679,1743696-1743698,1743700-1743701,1744058,1744064-1744065,1744125,1744149,1744194,1744229,1744270,1744323,1744432,1744684,1744697,1744705,1744713,1744760,1744786,1745083,1745142-1745143,1745145,1745177,1745179-1745180,1745227,1745248,1745254,1745337,1745467,1745473,1745535,1745576,1745735,1745744,1746304,1746306-1746307,1746319,1746327,1746338,1746340-1746341,1746344,1746427,1746441,1746473,1746490,1746492,1746495-1746496,1746499-1746501,1746503-1746507,1746509,1746549,1746551,1746554,1746556,1746558,1746584,1746620,1746649,1746724,1746939,1746989,1747014,1747028,1747035,1747210,1747225,1747234,1747253,1747 404,1747506,1747536,1747924,1747980,1747993,1748001,1748253,1748452,1748547,1748629,1748676,1748715,1749287,1749296,1749328,1749373,1749465,1749506,1749508,1749665-1749666,1749763,1749865-1749866,1749898,1749978,1749980,1750011,1750015,1750056,1750480,1750617,1750634,1750692,1750697,1750700,1750703,1750707,1750714,1750718,1750723,1750774,1750899,1750975,1750995,1751061,1751097,1751173,1751438,1751447,1751463,1751702,1752212,1752737,1752745,1753078,1753080,1753358,1753363,1754111,1754140-1754141,1754281,1754310,1754445,1754467,1754494,1754496,1754528,1754532-1754533,1754613,1754714,1754874,1754941,1754944,1754950-1754951,1755005,1755007,1755009,1755132,1755180-1755181,1755185,1755190,1755204-1755206,1755208,1755214,1755224,1755227,1755230,1755629,1755646-1755647,1755650,1755653,1755675,1755680,1755683,1755693,1755717,1755731-1755737,1755812,1755828,1755884,1755890,1755918-1755919,1755942,1755958,1755960,1755970,1755993,1756013,1756019,1756039,1756056,1756083-1756114,1756175,1756288-1 756289,1756408-1756410,1756778,1756798,1756878,1756898,1756939,1757123-1757124,1757126,1757128,1757132-1757133,1757136,1757145,1757167-1757168,1757175,1757180,1757182,1757195,1757271,1757278,1757347,1757353-1757354,1757363,1757374,1757399,1757406,1757408,1757485,1757495,1757499,1757527,1757578,1757684,1757722,1757727,1757790,1757799,1757813,1757853,1757883,1757903,1757976,1757997,1758000,1758058,1758072-1758075,1758078-1758079,1758223,1758257,1758261,1758276,1758292,1758369,1758378-1758383,1758421,1758423,1758425-1758427,1758430,1758443,1758448,1758459,1758483,1758486-1758487,1758499,1758525,1758556,1758580,1758582,1758584,1758588,1758842,1759019,1759212,1759224,1759227,1759252,1759274,1759513-1759516,1759611,1759757,1759785-1759790,1760005,1760022,1760109-1760110,1760135,1760200-1760201,1760227,1760300,1760397,1760446,1760454,1760640,1760648,1761057,1761422,1761491,1761498,1761500-1761501,1761550,1761553,1761572,1761574,1761625-1761626,1761628,1761682,1761740,1761752,1762051-176205 3,1762123,1762168,1762172,1762182,1762201-1762202,1762204,1762208,1762288,1762296,1762324,1762348,1762353,1762362,1762374,1762492,1762503,1762505,1762541,1762608,1762710,1762753,1762766,1762769,1762944,1762947,1762953,1763167,1763179,1763232,1763259,1763271-1763272,1763276-1763277,1763319-1763320,1763370,1763372,1763375,1763377,1763393,1763412,1763430,1763450,1763462,1763505,1763511-1763512,1763516,1763518,1763520,1763529,1763559,1763565,1763568,1763574,1763619,1763634-1763635,1763718,1763748,1763786,176
buildbot success in on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building . Full details are available at: https://ci.apache.org/builders/tomcat-trunk/builds/3043 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' triggered this build Build Source Stamp: [branch tomcat/trunk] 1823620 Blamelist: remm Build succeeded! Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] tomcat pull request #98: Fix for BZ62048
GitHub user m-czernek opened a pull request: https://github.com/apache/tomcat/pull/98 Fix for BZ62048 Hi, providing a small workaround for https://bz.apache.org/bugzilla/show_bug.cgi?id=62048 as suggested by Christopher in the BZ. I tried to make the logout link unobtrusive (example screenshot: https://ctrlv.cz/U4VN). As usual, feel free to suggest or make any changes. What do you think? You can merge this pull request into a Git repository by running: $ git pull https://github.com/m-czernek/tomcat bz62048 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tomcat/pull/98.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #98 commit e9f9fd033d2af6e0cb89c411028133fa74c8c996 Author: endhalf Date: 2018-02-07T21:08:20Z Add logout for Host Manager commit 6bf8f12ae438350c66d7e5cd8870724f7378f454 Author: Marek Czernek Date: 2018-02-09T10:13:18Z Add logout for Manager commit a8a41c212d0084b614f54f14580afe98840c2076 Author: Marek Czernek Date: 2018-02-09T10:18:32Z Add docs --- - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 8.5.28
On Tue, Feb 6, 2018 at 6:33 PM, Mark Thomas wrote: > The proposed Apache Tomcat 8.5.28 release is now available for voting. > > The major changes compared to the 8.5.27 release are: > > - Fix truncated request input streams when using NIO2 with TLS. > > - Improved error handling and reporting for TLS configuration. > > - Enhance the JMX support for jdbc-pool in order to expose > PooledConnection and JdbcInterceptors. > > Along with lots of other bug fixes and improvements. > > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.5.28/ > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-1171/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tc8.5.x/tags/TOMCAT_8_5_28/ > > The proposed 8.5.28 release is: > [ ] Broken - do not release > [x] Stable - go ahead and release as 8.5.28 +1 > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 9.0.5
On Tue, Feb 6, 2018 at 5:08 PM, Mark Thomas wrote: > The proposed Apache Tomcat 9.0.5 release is now available for voting. > > The major changes compared to the 9.0.4 release are: > > - Refactor error handling to enable errors that occur before processing > is passed to the application to be handled by the application provided > error handling and/or the container provided error handling > (ErrorReportValve) as appropriate. > > - Enable strict validation of the provided host name and port for all > connectors. Requests with invalid host names and/or ports will be > rejected with a 400 response. > > - Enhance the JMX support for jdbc-pool in order to expose > PooledConnection and JdbcInterceptors. > > Along with lots of other bug fixes and improvements. > > For full details, see the changelog: > http://svn.apache.org/repos/asf/tomcat/trunk/webapps/docs/changelog.xml > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-9/v9.0.5/ > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-1170/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tags/TOMCAT_9_0_5/ > > The proposed 9.0.5 release is: > [ ] Broken - do not release > [x] Stable - go ahead and release as 9.0.5 +1 > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 62048] Missing logout function in Manager and Host-Manager webapps
https://bz.apache.org/bugzilla/show_bug.cgi?id=62048 --- Comment #3 from Michael Osipov <1983-01...@gmx.net> --- (In reply to Mark Thomas from comment #1) > They use BASIC auth. You can't logout from BASIC auth. Why do you think so? I have swapped it for SPNEGO auth. > We could change the auth mechanism but then that creates issues for the > command line tools. Moreover, the CSRF filter creates a session for the user. It would make sense to have a logout to kill the session. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1823645 - /tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java
Author: markt Date: Fri Feb 9 12:18:36 2018 New Revision: 1823645 URL: http://svn.apache.org/viewvc?rev=1823645&view=rev Log: Cosmetic fixes - @Override - ws police Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java?rev=1823645&r1=1823644&r2=1823645&view=diff == --- tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java (original) +++ tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java Fri Feb 9 12:18:36 2018 @@ -42,6 +42,7 @@ class Http2AsyncParser extends Http2Pars } +@Override protected boolean readFrame(boolean block, FrameType expected) throws IOException, Http2Exception { if (block) { @@ -78,12 +79,14 @@ class Http2AsyncParser extends Http2Pars } } +@Override protected void unRead(ByteBuffer buffer) { if (buffer != null && buffer.hasRemaining()) { socketWrapper.unRead(buffer); } } +@Override protected void swallow(int streamId, int len, boolean mustBeZero, ByteBuffer buffer) throws IOException, ConnectionException { if (log.isDebugEnabled()) { @@ -244,7 +247,7 @@ class Http2AsyncParser extends Http2Pars upgradeHandler.upgradeDispatch(SocketEvent.OPEN_READ); } } - + } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1823646 - /tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java
Author: markt Date: Fri Feb 9 12:22:52 2018 New Revision: 1823646 URL: http://svn.apache.org/viewvc?rev=1823646&view=rev Log: Add some Javadoc to document unused code in the non-async parser and keep the IDE happy. Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java?rev=1823646&r1=1823645&r2=1823646&view=diff == --- tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java (original) +++ tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java Fri Feb 9 12:22:52 2018 @@ -127,6 +127,11 @@ class Http2Parser { return true; } +/** + * NO-OP for non-async parser. + * + * @param buffer Unused. + */ protected void unRead(ByteBuffer buffer) { } @@ -521,6 +526,19 @@ class Http2Parser { } +/** + * Swallow bytes. + * + * @param streamId Stream being swallowed + * @param lenNumber of bytes to swallow + * @param mustBeZero Are the bytes required to have value zero + * @param byteBuffer Unused for non-async parser + * + * @throws IOException If an I/O error occurs reading additional bytes into + * the input buffer. + * @throws ConnectionException If the swallowed bytes are expected to have a + * value of zero but do not + */ protected void swallow(int streamId, int len, boolean mustBeZero, ByteBuffer byteBuffer) throws IOException, ConnectionException { if (log.isDebugEnabled()) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1823647 - in /tomcat/trunk/java/org/apache/catalina: Context.java core/StandardContext.java util/ErrorPageSupport.java
Author: markt Date: Fri Feb 9 12:27:53 2018 New Revision: 1823647 URL: http://svn.apache.org/viewvc?rev=1823647&view=rev Log: Refactor error page related code into a separate class so it can be re-used in the ErrorReportValve. Deprecate a couple of unused methods. Added: tomcat/trunk/java/org/apache/catalina/util/ErrorPageSupport.java (with props) Modified: tomcat/trunk/java/org/apache/catalina/Context.java tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Modified: tomcat/trunk/java/org/apache/catalina/Context.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Context.java?rev=1823647&r1=1823646&r2=1823647&view=diff == --- tomcat/trunk/java/org/apache/catalina/Context.java (original) +++ tomcat/trunk/java/org/apache/catalina/Context.java Fri Feb 9 12:27:53 2018 @@ -1087,7 +1087,11 @@ public interface Context extends Contain * HTTP status code, if any; otherwise return null. * * @param status HTTP status code to look up + * + * @deprecated Unused. Will be removed in Tomcat 10. + * Use {@link #findErrorPage(int)} instead. */ +@Deprecated public String findStatusPage(int status); @@ -1095,7 +1099,11 @@ public interface Context extends Contain * @return the set of HTTP status codes for which error pages have * been specified. If none are specified, a zero-length array * is returned. + * + * @deprecated Unused. Will be removed in Tomcat 10. + * Use {@link #findErrorPages()} instead. */ +@Deprecated public int[] findStatusPages(); Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1823647&r1=1823646&r2=1823647&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Fri Feb 9 12:27:53 2018 @@ -31,7 +31,6 @@ import java.util.Enumeration; import java.util.EventListener; import java.util.HashMap; import java.util.HashSet; -import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; @@ -104,6 +103,7 @@ import org.apache.catalina.loader.Webapp import org.apache.catalina.session.StandardManager; import org.apache.catalina.util.CharsetMapper; import org.apache.catalina.util.ContextName; +import org.apache.catalina.util.ErrorPageSupport; import org.apache.catalina.util.ExtensionValidator; import org.apache.catalina.util.URLEncoder; import org.apache.catalina.webresources.StandardRoot; @@ -366,12 +366,7 @@ public class StandardContext extends Con private String docBase = null; -/** - * The exception pages for this web application, keyed by fully qualified - * class name of the Java exception. - */ -private Map exceptionPages = new HashMap<>(); - +private final ErrorPageSupport errorPageSupport = new ErrorPageSupport(); /** * The set of filter configurations (and associated filter instances) we @@ -546,13 +541,6 @@ public class StandardContext extends Con */ private AtomicLong sequenceNumber = new AtomicLong(0); -/** - * The status code error pages for this web application, keyed by - * HTTP status code (as an Integer). Note status code zero is used for the - * default error page. - */ -private Map statusPages = new HashMap<>(); - /** * Set flag to true to cause the system.out and system.err to be redirected @@ -2850,20 +2838,8 @@ public class StandardContext extends Con } } -// Add the specified error page to our internal collections -String exceptionType = errorPage.getExceptionType(); -if (exceptionType != null) { -synchronized (exceptionPages) { -exceptionPages.put(exceptionType, errorPage); -} -} else { -synchronized (statusPages) { -statusPages.put(Integer.valueOf(errorPage.getErrorCode()), -errorPage); -} -} +errorPageSupport.add(errorPage); fireContainerEvent("addErrorPage", errorPage); - } @@ -3298,7 +3274,7 @@ public class StandardContext extends Con */ @Override public ErrorPage findErrorPage(int errorCode) { -return statusPages.get(Integer.valueOf(errorCode)); +return errorPageSupport.find(errorCode); } @@ -3310,9 +3286,7 @@ public class StandardContext extends Con */ @Override public ErrorPage findErrorPage(String exceptionType) { -synchronized (exceptionPages) { -return exceptionPages.get(exceptionType); -} +
buildbot failure in on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building . Full details are available at: https://ci.apache.org/builders/tomcat-trunk/builds/3044 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' triggered this build Build Source Stamp: [branch tomcat/trunk] 1823646 Blamelist: markt BUILD FAILED: failed compile_1 Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building . Full details are available at: https://ci.apache.org/builders/tomcat-trunk/builds/3045 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' triggered this build Build Source Stamp: [branch tomcat/trunk] 1823647 Blamelist: markt Build succeeded! Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1823650 - in /tomcat/trunk/java/org/apache/coyote/http2: Http2AsyncParser.java Http2Parser.java
Author: remm Date: Fri Feb 9 13:01:26 2018 New Revision: 1823650 URL: http://svn.apache.org/viewvc?rev=1823650&view=rev Log: Some more cleanups. Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java?rev=1823650&r1=1823649&r2=1823650&view=diff == --- tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java (original) +++ tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java Fri Feb 9 13:01:26 2018 @@ -79,7 +79,6 @@ class Http2AsyncParser extends Http2Pars } } -@Override protected void unRead(ByteBuffer buffer) { if (buffer != null && buffer.hasRemaining()) { socketWrapper.unRead(buffer); @@ -186,50 +185,51 @@ class Http2AsyncParser extends Http2Pars @Override public void completed(Long result, Void attachment) { if (streamException || error == null) { -buffers[1].flip(); +ByteBuffer payload = buffers[1]; +payload.flip(); try { if (streamException) { -swallow(streamId, payloadSize, false, buffers[1]); -unRead(buffers[1]); +swallow(streamId, payloadSize, false, payload); } else { switch (frameType) { case DATA: -readDataFrame(streamId, flags, payloadSize, buffers[1]); +readDataFrame(streamId, flags, payloadSize, payload); break; case HEADERS: -readHeadersFrame(streamId, flags, payloadSize, buffers[1]); +readHeadersFrame(streamId, flags, payloadSize, payload); break; case PRIORITY: -readPriorityFrame(streamId, buffers[1]); +readPriorityFrame(streamId, payload); break; case RST: -readRstFrame(streamId, buffers[1]); +readRstFrame(streamId, payload); break; case SETTINGS: -readSettingsFrame(flags, payloadSize, buffers[1]); +readSettingsFrame(flags, payloadSize, payload); break; case PUSH_PROMISE: -readPushPromiseFrame(streamId, buffers[1]); +readPushPromiseFrame(streamId, payload); break; case PING: -readPingFrame(flags, buffers[1]); +readPingFrame(flags, payload); break; case GOAWAY: -readGoawayFrame(payloadSize, buffers[1]); +readGoawayFrame(payloadSize, payload); break; case WINDOW_UPDATE: -readWindowUpdateFrame(streamId, buffers[1]); +readWindowUpdateFrame(streamId, payload); break; case CONTINUATION: -readContinuationFrame(streamId, flags, payloadSize, buffers[1]); +readContinuationFrame(streamId, flags, payloadSize, payload); break; case UNKNOWN: -readUnknownFrame(streamId, frameType, flags, payloadSize, buffers[1]); +readUnknownFrame(streamId, frameType, flags, payloadSize, payload); } } } catch (Exception e) { error = e; } +unRead(payload); } if (state == CompletionState.DONE) { // The call was not completed inline, so must start reading new frames Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java?rev=1823650&r1=1823649&r2=1823650&view=diff == --- tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java (original) +++ tomcat/trunk/java/org/apache/coyote/http2/Http2Parser.java Fri Feb 9 13:01:26 2018 @@ -127,14 +127,6 @@ class Http2Parser { return true;
svn commit: r1823658 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/mbeans/ java/org/apache/catalina/startup/ java/org/apache/catalina/util/ test
Author: markt Date: Fri Feb 9 14:04:42 2018 New Revision: 1823658 URL: http://svn.apache.org/viewvc?rev=1823658&view=rev Log: Refactor the code that searches for a matching error page by working up the class hierarchy of an exception type to ErrorPageSupport to enable re-use. Modified: tomcat/trunk/java/org/apache/catalina/Context.java tomcat/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java tomcat/trunk/java/org/apache/catalina/mbeans/ContextMBean.java tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java tomcat/trunk/java/org/apache/catalina/util/ErrorPageSupport.java tomcat/trunk/test/org/apache/tomcat/unittest/TesterContext.java Modified: tomcat/trunk/java/org/apache/catalina/Context.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Context.java?rev=1823658&r1=1823657&r2=1823658&view=diff == --- tomcat/trunk/java/org/apache/catalina/Context.java (original) +++ tomcat/trunk/java/org/apache/catalina/Context.java Fri Feb 9 14:04:42 2018 @@ -969,14 +969,31 @@ public interface Context extends Contain /** + * @param exceptionType Exception type to look up + * * @return the error page entry for the specified Java exception type, - * if any; otherwise return null. + * if any; otherwise return {@code null}. * - * @param exceptionType Exception type to look up + * @deprecated Unused. Will be removed in Tomcat 10. + * Use {@link #findErrorPage(Throwable)} instead. */ +@Deprecated public ErrorPage findErrorPage(String exceptionType); +/** + * Find and return the ErrorPage instance for the specified exception's + * class, or an ErrorPage instance for the closest superclass for which + * there is such a definition. If no associated ErrorPage instance is + * found, return null. + * + * @param throwable The exception type for which to find an ErrorPage + * + * @return the error page entry for the specified Java exception type, + * if any; otherwise return {@code null}. + */ +public ErrorPage findErrorPage(Throwable throwable); + /** * @return the set of defined error pages for all specified error codes Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1823658&r1=1823657&r2=1823658&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Fri Feb 9 14:04:42 2018 @@ -3278,17 +3278,18 @@ public class StandardContext extends Con } -/** - * Return the error page entry for the specified Java exception type, - * if any; otherwise return null. - * - * @param exceptionType Exception type to look up - */ @Override +@Deprecated public ErrorPage findErrorPage(String exceptionType) { return errorPageSupport.find(exceptionType); } + +@Override +public ErrorPage findErrorPage(Throwable exceptionType) { +return errorPageSupport.find(exceptionType); +} + /** * Return the set of defined error pages for all specified error codes Modified: tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java?rev=1823658&r1=1823657&r2=1823658&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardHostValve.java Fri Feb 9 14:04:42 2018 @@ -293,9 +293,9 @@ final class StandardHostValve extends Va return; } -ErrorPage errorPage = findErrorPage(context, throwable); +ErrorPage errorPage = context.findErrorPage(throwable); if ((errorPage == null) && (realError != throwable)) { -errorPage = findErrorPage(context, realError); +errorPage = context.findErrorPage(realError); } if (errorPage != null) { @@ -397,40 +397,6 @@ final class StandardHostValve extends Va // Report our failure to process this custom page container.getLogger().error("Exception Processing " + errorPage, t); return false; - } } - - -/** - * Find and return the ErrorPage instance for the specified exception's - * class, or an ErrorPage instance for the closest superclass for which - * there is such a definition. If no associated ErrorPage instance is - * found, return null. - *
[Bug 62090] New: NPE in o.a.t.util.modeler.Util when servlet-name does not exist in web.xml
https://bz.apache.org/bugzilla/show_bug.cgi?id=62090 Bug ID: 62090 Summary: NPE in o.a.t.util.modeler.Util when servlet-name does not exist in web.xml Product: Tomcat 9 Version: 9.0.4 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: csuth...@apache.org Target Milestone: - When using a web.xml that specifies a servlet element, but excludes servlet-name a NPE is observed and the webapp fails to deploy. A check should be added in the StandardWrapper and it should throw a ServletException when servlet-name is missing. To reproduce, add a serlvet tag to your web.xml with no servlet-name. For example: com.example.servlets.HelloServlet Then start Tomcat and observe the exception in catalina.out: SEVERE [main] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to initialize component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/test].StandardWrapper[null]] at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493) Caused by: java.lang.NullPointerException at org.apache.tomcat.util.modeler.Util.objectNameValueNeedsQuote(Util.java:26) at org.apache.catalina.core.StandardWrapper.getObjectNameKeyProperties(StandardWrapper.java:1619) at org.apache.catalina.util.LifecycleMBeanBase.initInternal(LifecycleMBeanBase.java:61) at org.apache.catalina.core.ContainerBase.initInternal(ContainerBase.java:885) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136) ... 49 more Setting xmlValidation="true" on the Context may handle this differently, but it's off by default so we should check for null and handle that case. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 62090] NPE in o.a.t.util.modeler.Util when servlet-name does not exist in web.xml
https://bz.apache.org/bugzilla/show_bug.cgi?id=62090 Coty Sutherland changed: What|Removed |Added Keywords||Beginner -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 8.5.28
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 2/6/18 6:33 PM, Mark Thomas wrote: > The proposed Apache Tomcat 8.5.28 release is now available for > voting. > > The major changes compared to the 8.5.27 release are: > > - Fix truncated request input streams when using NIO2 with TLS. > > - Improved error handling and reporting for TLS configuration. > > - Enhance the JMX support for jdbc-pool in order to expose > PooledConnection and JdbcInterceptors. > > Along with lots of other bug fixes and improvements. > > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.5.28/ The > Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-117 1/ > > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tc8.5.x/tags/TOMCAT_8_5_28/ > > The proposed 8.5.28 release is: [ ] Broken - do not release [X] > Stable - go ahead and release as 8.5.28 Survives a smoke-test on a simple application in development environment. Standard 3.x-style servlets with basic JSP, no async, websocket, etc. Details: (note: test failures for OpenSSL and multicast are expected in this environment) * Environment * Java (build): java version "1.8.0_151" Java(TM) SE Runtime Environment (build 1.8.0_151-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode) * Java (test): java version "1.8.0_151" Java(TM) SE Runtime Environment (build 1.8.0_151-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode) * OS: Linux 2.6.32-312-ec2 x86_64 * cc: cc (Debian 4.7.2-5) 4.7.2 * make: GNU Make 3.81 * OpenSSL: OpenSSL 1.0.2k 26 Jan 2017 * APR: 1.4.6 * * Valid MD5 signature for apache-tomcat-8.5.28.zip * Valid GPG signature for apache-tomcat-8.5.28.zip * Valid MD5 signature for apache-tomcat-8.5.28.tar.gz * Valid GPG signature for apache-tomcat-8.5.28.tar.gz * Valid MD5 signature for apache-tomcat-8.5.28.exe * Valid GPG signature for apache-tomcat-8.5.28.exe * Valid MD5 signature for apache-tomcat-8.5.28-src.zip * Valid GPG signature for apache-tomcat-8.5.28-src.zip * Valid MD5 signature for apache-tomcat-8.5.28-src.tar.gz * Valid GPG signature for apache-tomcat-8.5.28-src.tar.gz * * Binary Zip and tarball: Same * Source Zip and tarball: Same * * Building dependencies returned: 0 * tcnative builds cleanly * Tomcat builds cleanly * Junit Tests: FAILED * * Tests that failed: * org.apache.catalina.session.TestStandardSessionIntegration.APR.txt * org.apache.catalina.session.TestStandardSessionIntegration.NIO.txt * org.apache.catalina.session.TestStandardSessionIntegration.NIO2.txt * org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.APR.txt * org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.NIO.txt * org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.NIO2.tx t * org.apache.catalina.tribes.group.TestGroupChannelSenderConnections.APR.t xt * org.apache.catalina.tribes.group.TestGroupChannelSenderConnections.NIO.t xt * org.apache.catalina.tribes.group.TestGroupChannelSenderConnections.NIO2. txt * org.apache.catalina.tribes.group.TestGroupChannelStartStop.APR.txt * org.apache.catalina.tribes.group.TestGroupChannelStartStop.NIO.txt * org.apache.catalina.tribes.group.TestGroupChannelStartStop.NIO2.txt * org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator .APR.txt * org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator .NIO.txt * org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator .NIO2.txt * org.apache.catalina.tribes.group.interceptors.TestOrderInterceptor.APR.t xt * org.apache.catalina.tribes.group.interceptors.TestOrderInterceptor.NIO.t xt * org.apache.catalina.tribes.group.interceptors.TestOrderInterceptor.NIO2. txt * org.apache.catalina.tribes.group.interceptors.TestTcpFailureDetector.APR .txt * org.apache.catalina.tribes.group.interceptors.TestTcpFailureDetector.NIO .txt * org.apache.catalina.tribes.group.interceptors.TestTcpFailureDetector.NIO 2.txt * org.apache.tomcat.util.net.openssl.ciphers.TestCipher.APR.txt * org.apache.tomcat.util.net.openssl.ciphers.TestCipher.NIO.txt * org.apache.tomcat.util.net.openssl.ciphers.TestCipher.NIO2.txt * org.apache.tomcat.util.net.openssl.ciphers.TestOpenSSLCipherConfiguratio nParser.APR.txt * org.apache.tomcat.util.net.openssl.ciphers.TestOpenSSLCipherConfiguratio nParser.NIO.txt * org.apache.tomcat.util.net.openssl.ciphers.TestOpenSSLCipherConfiguratio nParser.NIO2.txt -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlp8aJQdHGNocmlzQGNo cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFiu2g//VwwwAKNzx270jmPW e/mp423szJDL5jm3X31wb/LlDk1XILp59bnHXY4ddKO2KlWvGkra3ofQgB5AUHHb 7tfHhj2Tg9nyzbpLmS8jH9J8Ux4Bth9AklQUGPsLGqPgyl8Uq25qA3V3SPorOeZu +Fkw0SOrdwwp2QAzKdn4dYb5ZnPaWKxV2QQb8x6xcLEcWfmFZKn+xuCcTw2ba4VF ys7QjepDyGA1csU1s1NCE19gLF4rt3hYtfO/2pfLnHXPfEHx9AD
svn commit: r1823670 - /tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java
Author: remm Date: Fri Feb 9 15:46:52 2018 New Revision: 1823670 URL: http://svn.apache.org/viewvc?rev=1823670&view=rev Log: Fix window size reservation deadlock. Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java?rev=1823670&r1=1823669&r2=1823670&view=diff == --- tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java (original) +++ tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java Fri Feb 9 15:46:52 2018 @@ -226,14 +226,18 @@ class Http2AsyncParser extends Http2Pars readUnknownFrame(streamId, frameType, flags, payloadSize, payload); } } -} catch (Exception e) { +} catch (StreamException e) { error = e; +} catch (Exception e) { +unRead(payload); +failed(e, null); +return; } unRead(payload); } if (state == CompletionState.DONE) { // The call was not completed inline, so must start reading new frames -// or process any error +// or process the stream exception upgradeHandler.upgradeDispatch(SocketEvent.OPEN_READ); } } @@ -241,10 +245,8 @@ class Http2AsyncParser extends Http2Pars @Override public void failed(Throwable e, Void attachment) { error = e; -if (state == CompletionState.DONE) { -// The call was not completed inline, so must start reading new frames -// or process any error -upgradeHandler.upgradeDispatch(SocketEvent.OPEN_READ); +if (state == null || state == CompletionState.DONE) { +upgradeHandler.upgradeDispatch(SocketEvent.ERROR); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building . Full details are available at: https://ci.apache.org/builders/tomcat-trunk/builds/3048 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' triggered this build Build Source Stamp: [branch tomcat/trunk] 1823670 Blamelist: remm BUILD FAILED: failed compile_1 Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1823672 - /tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java
Author: remm Date: Fri Feb 9 16:16:55 2018 New Revision: 1823672 URL: http://svn.apache.org/viewvc?rev=1823672&view=rev Log: Revert the "fixes" not related to the window size deadlock fix. Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java?rev=1823672&r1=1823671&r2=1823672&view=diff == --- tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java (original) +++ tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncParser.java Fri Feb 9 16:16:55 2018 @@ -226,12 +226,8 @@ class Http2AsyncParser extends Http2Pars readUnknownFrame(streamId, frameType, flags, payloadSize, payload); } } -} catch (StreamException e) { -error = e; } catch (Exception e) { -unRead(payload); -failed(e, null); -return; +error = e; } unRead(payload); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 62090] NPE in o.a.t.util.modeler.Util when servlet-name does not exist in web.xml
https://bz.apache.org/bugzilla/show_bug.cgi?id=62090 --- Comment #1 from Christopher Schultz --- The XML schema *requires the servlet-name element. (Note that the servlet-class element is not required.) Tomcat simply doesn't use the schema to validate web.xml, so this "error" falls through the cracks. I understand why we don't validate context.xml and server.xml against a schema... but why not enable validation of web.xml against the correct schema? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 62090] NPE in o.a.t.util.modeler.Util when servlet-name does not exist in web.xml
https://bz.apache.org/bugzilla/show_bug.cgi?id=62090 --- Comment #2 from Remy Maucherat --- XML validation is annoying IMO, having checks for functionally significant items can be useful (also, the issue here might exist with embedded or some other use maybe ?). -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 62090] NPE in o.a.t.util.modeler.Util when servlet-name does not exist in web.xml
https://bz.apache.org/bugzilla/show_bug.cgi?id=62090 --- Comment #3 from Christopher Schultz --- How is it annoying? Just set "setSchema(schema); setValidating(false);". It's only going to validate once per context-launch, so this isn't a performance problem. Validating XML documents against their respective schemas is a good way to ensure that everything is sane before Tomcat tries to use the data. It allows the Tomcat code to rely on a sane document before proceeding. Otherwise, you get NPEs and other stupid things like that. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 62093] New: Allow use_server_errors to apply to specific status code only
https://bz.apache.org/bugzilla/show_bug.cgi?id=62093 Bug ID: 62093 Summary: Allow use_server_errors to apply to specific status code only Product: Tomcat Connectors Version: 1.2.42 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: mod_jk Assignee: dev@tomcat.apache.org Reporter: a.peis...@reply.com Target Milestone: --- Hi all, currently, the 'use_server_errors' directive returns pages with a status code bigger or equal to use_server_errors. We would like to propose a change to the current behaviour where an explicit list of codes is used, (similar to fail_on_status). This would allow a mix of both dynamic and static error pages to be used, (including ones specified by ErrorDocument directives). Regards, Alex. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 62093] Allow use_server_errors to apply to specific status code only
https://bz.apache.org/bugzilla/show_bug.cgi?id=62093 Alex Peissel changed: What|Removed |Added Severity|normal |enhancement -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 62094] New: Certificate verification using CRL with Tomcat APR connector does not work
https://bz.apache.org/bugzilla/show_bug.cgi?id=62094 Bug ID: 62094 Summary: Certificate verification using CRL with Tomcat APR connector does not work Product: Tomcat Native Version: 1.2.7 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Library Assignee: dev@tomcat.apache.org Reporter: twsatw...@gmail.com Target Milestone: --- [Title] Certificate verification using CRL with Tomcat APR connector does not work [Frequency of Occurrence] Always [Details] Neither SSLCARevocationFile nor SSLCARevocationPath has any effect for certificate verification. [System/Software Info] OS: Red Hat Enterprise Linux Server release 7.3 (Maipo) Tomcat: 8.0.44 Tomcat Native: 1.2.7 Tomcat APR: 1.5.2 OpenSSL: 1.0.2k Note: The issue also exists in Windows platform. [Prerequisites] 1. OpenSSL binary/utility (usually available on common Linux distribution) 2. OpenSSL library. See the References section. 3. APR library for Linux. See the References section. 4. Tomcat Native library for Linux (this needs to be built from the source code. Tomcat does not include this for Linux.) See the References section. [Setup Steps] I. Certificates 1. Use OpenSSL to create the certificates as follows. See the information regarding how to create certificates in the References section (1.1) a private CA certificate (1.2) a server identity certificate, signed by the private CA certificate created in Step (1.1) (1.3) a client/browser identity certificate, signed by the private CA certificate created in Step (1.1). Convert the client/browser identity certificate from PEM to PKCS12, say "browsercert.p12". 2. After creating the client/browser identity certificate, revoke it. 3. Create a CRL from the private CA. 4. Import the client/browser identity certificate to to the browser of your choice. II. Tomcat Setup 1. Get Tomcat for Linux and deploy it onto a Linux test server. 2. Configure the connectors in Tomcat server.xml as follows: // --- Tomcat 'server.xml' [S] --- // --- Tomcat 'server.xml' [E] --- 3. Create the file "setenv.sh" with the contents as below (adjust to the actual deployment environment accordingly) // --- "setenv.sh" [S] --- export CATALINA_HOME=_WHERE_TOMCAT_IS_ export CATALINA_BASE=_WHERE_TOMCAT_IS_ export LD_LIBRARY_PATH=$CATALINA_HOME/bin export JRE_HOME=_WHERE_JRE_IS_ export JRE_BIN=$JRE_HOME/bin/java // --- "setenv.sh" [E] --- 4. Copy the required APR libraries to "$CATALINA_HOME\bin" (4.1) APR: libapr-1.so.0 (4.2) tcnative: libtcnative-1.so (4.3) OpenSSL: libssl.so.1.0.0, libcrypto.so.1.0.0 5. Create the folder "ssl" under "$CATALINA_HOME". 6. Put the following certificates to the locations as follows, where "$CATALINA_HOME" is where Tomcat locates. (2.1) the private CA certificate -> "$CATALINA_HOME/ssl/ca" (2.2) the server identity certificate -> "$CATALINA_HOME/ssl/cert" (2.3) the private CA CRL -> "$CATALINA_HOME/ssl/crl" [Test Procedure] *Ensure all setup is complete properly. 1. Start Tomcat. 2. Start the web browser and connect to Tomcat using "https://_TOMCAT_SERVER_ADDR:18443/index.jsp";. When prompted, choose the imported client/browser idenity certificate for the connection. Expected Results: 1. The connection would fail due to the revoked client/browser certificate. Actual Results: 1. The connection still goes through and Tomcat "index.jsp" is accessible. [Investigation Findings] 1. In tcnative, CRL check flags for OpenSSL is not set for the corresponding SSLContext. See the function “TCN_IMPLEMENT_CALL(void, SSLContext, setVerify)” in “tomcat-native-1.2.7-src\native\src\sslcontext.c”. 2. In tcnative, CRL cert store is not set in the corresponding SSLContext. See the function “TCN_IMPLEMENT_CALL(void, SSLContext, setVerify)” in “tomcat-native-1.2.7-src\native\src\sslcontext.c”. [Proposed Fixes] The fix is courtesy of C.Y. Chen. See the attached file "sslconext.c". Look for "CRL Fix" for the modification. [References] 1. Certificate Creation https://jamielinux.com/docs/openssl-certificate-authority/introduction.html 2. Default OpenSSL configuration file may be available on a Linux server at: "/etc/pki/tls/openssl.cnf" 3. Tomcat (3.1) Main: https://tomcat.apache.org/index.html (3.2) 8.0.44 download: https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.44/ 4. Tomcat APR: (4.1) Main: http://apr.apache.org/ (4.2) 1.5.2 download: http://archive.apache.org/dist/apr/ 5. Tomcat Native (5.1) Main: https://tomcat.apache.org/native-doc/ (5.2) 1.2.7 download: https://archive.apache.org/dist/tomcat/tomcat-connectors/native/1.2.7/ 6. OpenSSL (6.1) Main: https://www.openssl.org/ (6.2) 1.0.2k: https://www.openssl.org/source/old/1.0.2/ -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubs
[Bug 62094] Certificate verification using CRL with Tomcat APR connector does not work
https://bz.apache.org/bugzilla/show_bug.cgi?id=62094 twsatw...@gmail.com changed: What|Removed |Added CC||twsatw...@gmail.com --- Comment #1 from twsatw...@gmail.com --- Created attachment 35725 --> https://bz.apache.org/bugzilla/attachment.cgi?id=35725&action=edit The source code with the proposed fix. Look for "CRL FIX" for the places of the proposed modifications. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 62094] Certificate verification using CRL with Tomcat APR connector does not work
https://bz.apache.org/bugzilla/show_bug.cgi?id=62094 Christopher Schultz changed: What|Removed |Added Attachment #35725|text/x-csrc |text/plain mime type|| -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 58624] Websocket send blocks indefinitely in FutureToSendHandler
https://bz.apache.org/bugzilla/show_bug.cgi?id=58624 --- Comment #17 from SAIRAM NATARAJAN --- Using tomcat version 8.0.38. Seeing the block on sendText message indefinitely. "pool-2-thread-2" #26 prio=5 os_prio=0 tid=0x0bc22c00 nid=0x5ca7 waiting for monitor entry [0x8636f000] java.lang.Thread.State: BLOCKED (on object monitor) at org.apache.tomcat.websocket.WsSession.registerFuture(WsSession.java:662) - waiting to lock <0x9324a678> (a java.lang.Object) at org.apache.tomcat.websocket.FutureToSendHandler.get(FutureToSendHandler.java:109) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendPartialString(WsRemoteEndpointImplBase.java:256) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:195) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:37) -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org