{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/8463","repository_url":"https://api.github.com/repos/netty/netty","labels_url":"https://api.github.com/repos/netty/netty/issues/8463/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/8463/comments","events_url":"https://api.github.com/repos/netty/netty/issues/8463/events","html_url":"https://github.com/netty/netty/issues/8463","id":377380614,"node_id":"MDU6SXNzdWUzNzczODA2MTQ=","number":8463,"title":"Java 11: javax.net.ssl.SSLException not 'swallowed' when log level is set to Debug","user":{"login":"JStroom","id":3798158,"node_id":"MDQ6VXNlcjM3OTgxNTg=","avatar_url":"https://avatars3.githubusercontent.com/u/3798158?v=4","gravatar_id":"","url":"https://api.github.com/users/JStroom","html_url":"https://github.com/JStroom","followers_url":"https://api.github.com/users/JStroom/followers","following_url":"https://api.github.com/users/JStroom/following{/other_user}","gists_url":"https://api.github.com/users/JStroom/gists{/gist_id}","starred_url":"https://api.github.com/users/JStroom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JStroom/subscriptions","organizations_url":"https://api.github.com/users/JStroom/orgs","repos_url":"https://api.github.com/users/JStroom/repos","events_url":"https://api.github.com/users/JStroom/events{/privacy}","received_events_url":"https://api.github.com/users/JStroom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-05T12:33:08Z","updated_at":"2018-11-05T12:42:57Z","closed_at":null,"author_association":"NONE","body":"### Expected behavior\r\nNo \"javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify\" is thrown when running a netty application with Java 11 and log level set to debug. \r\n\r\n### Actual behavior\r\nThe following exception is logged with Java 11 and netty in log level debug: \r\nSSLEngine.closeInbound() raised an exception.\r\njavax.net.ssl.SSLException: closing inbound before receiving peer's close_notify\r\n\tat java.base/sun.security.ssl.Alert.createSSLException(Alert.java:129)\r\n\tat java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)\r\n\tat java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)\r\n\tat java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)\r\n\tat java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:255)\r\n\tat java.base/sun.security.ssl.SSLEngineImpl.closeInbound(SSLEngineImpl.java:724)\r\n\tat io.netty.handler.ssl.SslHandler.setHandshakeFailure(SslHandler.java:1561)\r\n\tat io.netty.handler.ssl.SslHandler.channelInactive(SslHandler.java:1045)\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)\r\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:224)\r\n\tat io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1429)\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)\r\n\tat io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:947)\r\n\tat io.netty.channel.AbstractChannel$AbstractUnsafe$8.run(AbstractChannel.java:822)\r\n\tat io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:163)\r\n\tat io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java)\r\n\tat io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)\r\n\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:466)\r\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)\r\n\tat io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\r\n\tat java.base/java.lang.Thread.run(Thread.java:834)\r\n\r\n\r\n### Steps to reproduce\r\nRun the netty HttpHelloWorldServer example with Java 11 and change the log level to debug (logback.xml).\r\nOpen a browser and point the URL to the listening port: https://localhost:8443/\r\n\r\n### Minimal yet complete reproducer code (or URL to code)\r\nhttps://github.com/netty/netty/tree/4.1/example/\r\n\r\n### Netty version\r\n4.1.32.Final-SNAPSHOT\r\n\r\n### JVM version (e.g. `java -version`)\r\nopenjdk version \"11\" 2018-09-25\r\nOpenJDK Runtime Environment 18.9 (build 11+28)\r\nOpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)\r\n\r\n### OS version (e.g. `uname -a`)\r\nwindows 10\r\n\r\n### Suggestion to change:\r\n```java\r\nif (msg == null || !msg.contains(\"possible truncation attack\")) {\r\n    logger.debug(\"{} SSLEngine.closeInbound() raised an exception.\", ctx.channel(), e);\r\n}\r\n```\r\nto \r\n```java\r\nif (msg == null || !msg.contains(\"before receiving peer's close_notify\")) {\r\n    logger.debug(\"{} SSLEngine.closeInbound() raised an exception.\", ctx.channel(), e);\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/435860564","html_url":"https://github.com/netty/netty/issues/8463#issuecomment-435860564","issue_url":"https://api.github.com/repos/netty/netty/issues/8463","id":435860564,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTg2MDU2NA==","user":{"login":"normanmaurer","id":439362,"node_id":"MDQ6VXNlcjQzOTM2Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/439362?v=4","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"created_at":"2018-11-05T12:42:57Z","updated_at":"2018-11-05T12:42:57Z","author_association":"MEMBER","body":"@JStroom I think we should also keep the old `contains` check but also add the new one.\r\n\r\nAre you interested in doing a PR ?"}}
{"actor":{"display_login":"normanmaurer"}}