This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 072fcce0ef6569e4c6110a505c91799e21fc5e30 Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri Dec 10 14:55:53 2021 +0000 Revert the previous fix for BZ 65714. Dispatching from the handshake completion handler was addressing the symptom of the lack of permissions rather than the cause. --- java/org/apache/tomcat/util/net/SecureNio2Channel.java | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/java/org/apache/tomcat/util/net/SecureNio2Channel.java b/java/org/apache/tomcat/util/net/SecureNio2Channel.java index 5f1037f..56a9ebf 100644 --- a/java/org/apache/tomcat/util/net/SecureNio2Channel.java +++ b/java/org/apache/tomcat/util/net/SecureNio2Channel.java @@ -100,17 +100,12 @@ public class SecureNio2Channel extends Nio2Channel { if (result.intValue() < 0) { failed(new EOFException(), attachment); } else { - // When running under a security manager always dispatch so the - // processing occurs on a thread with the correct security - // context. - endpoint.processSocket(attachment, SocketEvent.OPEN_READ, Constants.IS_SECURITY_ENABLED); + endpoint.processSocket(attachment, SocketEvent.OPEN_READ, false); } } @Override public void failed(Throwable exc, SocketWrapperBase<Nio2Channel> attachment) { - // When running under a security manager always dispatch so the - // processing occurs on a thread with the correct security context. - endpoint.processSocket(attachment, SocketEvent.ERROR, Constants.IS_SECURITY_ENABLED); + endpoint.processSocket(attachment, SocketEvent.ERROR, false); } } @@ -122,17 +117,12 @@ public class SecureNio2Channel extends Nio2Channel { if (result.intValue() < 0) { failed(new EOFException(), attachment); } else { - // When running under a security manager always dispatch so the - // processing occurs on a thread with the correct security - // context. - endpoint.processSocket(attachment, SocketEvent.OPEN_WRITE, Constants.IS_SECURITY_ENABLED); + endpoint.processSocket(attachment, SocketEvent.OPEN_WRITE, false); } } @Override public void failed(Throwable exc, SocketWrapperBase<Nio2Channel> attachment) { - // When running under a security manager always dispatch so the - // processing occurs on a thread with the correct security context. - endpoint.processSocket(attachment, SocketEvent.ERROR, Constants.IS_SECURITY_ENABLED); + endpoint.processSocket(attachment, SocketEvent.ERROR, false); } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org