From cf797657ed619f4908a3d47b7e37c25fb7133454 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 12 Aug 2014 15:33:45 +0200 Subject: AllCommands: close connection after syntax error Stop HTTP clients from exploiting MPD via forged POST requests. --- src/command/AllCommands.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/command') diff --git a/src/command/AllCommands.cxx b/src/command/AllCommands.cxx index d29950eeb..6a4b18198 100644 --- a/src/command/AllCommands.cxx +++ b/src/command/AllCommands.cxx @@ -369,7 +369,9 @@ command_process(Client &client, unsigned num, char *line) current_command = nullptr; - return CommandResult::ERROR; + /* this client does not speak the MPD protocol; kick + the connection */ + return CommandResult::FINISH; } unsigned argc = 1; -- cgit v1.2.3