diff options
author | Ingela Anderton Andin <[email protected]> | 2015-03-05 15:45:02 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2015-04-07 22:59:20 +0200 |
commit | 0f7e72999e65c293ea421cd931aff4fc60aa647e (patch) | |
tree | 3cf156c7c7c9bb5a7f6e19e4b2988d1329b75e1e /lib/ssh | |
parent | 545890576542e4be630df8772654b99bd0306f62 (diff) | |
download | otp-0f7e72999e65c293ea421cd931aff4fc60aa647e.tar.gz otp-0f7e72999e65c293ea421cd931aff4fc60aa647e.tar.bz2 otp-0f7e72999e65c293ea421cd931aff4fc60aa647e.zip |
ssh: Remove error report
The error report was assumed to only happen if our code was wrongly
implemented "internal error". However it would also occur when
bad input was recived from the peer, and could hence cause extensive
logging on DoS attacks.
Diffstat (limited to 'lib/ssh')
-rw-r--r-- | lib/ssh/src/ssh_connection_handler.erl | 7 | ||||
-rw-r--r-- | lib/ssh/test/ssh_basic_SUITE.erl | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl index 68523aa72b..1610364287 100644 --- a/lib/ssh/src/ssh_connection_handler.erl +++ b/lib/ssh/src/ssh_connection_handler.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2014. All Rights Reserved. +%% Copyright Ericsson AB 2008-2015. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -1241,10 +1241,9 @@ event(Event, StateName, State) -> handle_disconnect(DisconnectMsg, State); throw:{ErrorToDisplay, #ssh_msg_disconnect{} = DisconnectMsg} -> handle_disconnect(DisconnectMsg, State, ErrorToDisplay); - _:Error -> - log_error(Error), + _:_ -> handle_disconnect(#ssh_msg_disconnect{code = error_code(StateName), - description = "Internal error", + description = "Invalid state", language = "en"}, State) end. error_code(key_exchange) -> diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl index 45c03035cb..9354482b81 100644 --- a/lib/ssh/test/ssh_basic_SUITE.erl +++ b/lib/ssh/test/ssh_basic_SUITE.erl @@ -970,7 +970,7 @@ max_sessions(Config, ParallelLogin, Connect0) when is_function(Connect0,2) -> %% Due to timing the error message may or may not be delivered to %% the "tcp-application" before the socket closed message is recived -check_error("Internal error") -> +check_error("Invalid state") -> ok; check_error("Connection closed") -> ok; |