AllCommands: close connection after syntax error

Stop HTTP clients from exploiting MPD via forged POST requests.
This commit is contained in:
Max Kellermann 2014-08-12 15:33:45 +02:00
parent c597538b40
commit cf797657ed
2 changed files with 4 additions and 1 deletions

1
NEWS
View File

@ -8,6 +8,7 @@ ver 0.19 (not yet released)
- "list" on album artist falls back to the artist tag
- "list" and "count" allow grouping
- new "search"/"find" filter "modified-since"
- close connection after syntax error
* database
- proxy: forward "idle" events
- proxy: forward the "update" command

View File

@ -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;