{"action":"created","issue":{"url":"https://api.github.com/repos/elixir-lang/plug/issues/413","repository_url":"https://api.github.com/repos/elixir-lang/plug","labels_url":"https://api.github.com/repos/elixir-lang/plug/issues/413/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/plug/issues/413/comments","events_url":"https://api.github.com/repos/elixir-lang/plug/issues/413/events","html_url":"https://github.com/elixir-lang/plug/issues/413","id":163009159,"number":413,"title":"SSL issues","user":{"login":"MarkNijhof","id":119686,"avatar_url":"https://avatars.githubusercontent.com/u/119686?v=3","gravatar_id":"","url":"https://api.github.com/users/MarkNijhof","html_url":"https://github.com/MarkNijhof","followers_url":"https://api.github.com/users/MarkNijhof/followers","following_url":"https://api.github.com/users/MarkNijhof/following{/other_user}","gists_url":"https://api.github.com/users/MarkNijhof/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkNijhof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkNijhof/subscriptions","organizations_url":"https://api.github.com/users/MarkNijhof/orgs","repos_url":"https://api.github.com/users/MarkNijhof/repos","events_url":"https://api.github.com/users/MarkNijhof/events{/privacy}","received_events_url":"https://api.github.com/users/MarkNijhof/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-06-29T19:39:51Z","updated_at":"2016-06-30T11:56:52Z","closed_at":"2016-06-29T23:12:51Z","body":"We are running Elixir in production based on Cowboy and we see quite regularly one of the following errors (crashes) happening, the majority are the \"insufficient security\" one. I am guessing these are just bots or browsers with outdated SSL versions.\r\n\r\n- SSL: :certify: ssl_alert.erl:93:Fatal error: bad certificate\r\n- SSL: :hello: tls_handshake.erl:118:Fatal error: inappropriate fallback\r\n- SSL: :hello: tls_handshake.erl:167:Fatal error: insufficient security\r\n- SSL: :hello: tls_handshake.erl:174:Fatal error: protocol version\r\n\r\nSo currently this throws a 500, but I much rather want to return a 405 Not Allowed. Also because this is a crash we get notified via Rollbar which just clutters the log. So since these errors are kind of expected I was wondering if we can hook into the cowboy pipeline with a Plug early enough to catch these scenarios and return a 405 instead?"},"comment":{"url":"https://api.github.com/repos/elixir-lang/plug/issues/comments/229637569","html_url":"https://github.com/elixir-lang/plug/issues/413#issuecomment-229637569","issue_url":"https://api.github.com/repos/elixir-lang/plug/issues/413","id":229637569,"user":{"login":"sumerman","id":222471,"avatar_url":"https://avatars.githubusercontent.com/u/222471?v=3","gravatar_id":"","url":"https://api.github.com/users/sumerman","html_url":"https://github.com/sumerman","followers_url":"https://api.github.com/users/sumerman/followers","following_url":"https://api.github.com/users/sumerman/following{/other_user}","gists_url":"https://api.github.com/users/sumerman/gists{/gist_id}","starred_url":"https://api.github.com/users/sumerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sumerman/subscriptions","organizations_url":"https://api.github.com/users/sumerman/orgs","repos_url":"https://api.github.com/users/sumerman/repos","events_url":"https://api.github.com/users/sumerman/events{/privacy}","received_events_url":"https://api.github.com/users/sumerman/received_events","type":"User","site_admin":false},"created_at":"2016-06-30T11:56:52Z","updated_at":"2016-06-30T11:56:52Z","body":"All these messages actually originate from the depths of standard `ssl` library. Maybe [`ranch`](https://github.com/ninenines/ranch) (underlying socket library of `cowboy`) is the only place where it can (and should) be caught. But then the question arise — what to do with them? Dropping them silently doesn't sound like a good option."}}
{"actor":{"display_login":"sumerman"}}