]> git.pond.sub.org Git - empserver/commit
client: Delay additional input processing until after send
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 25 Jun 2017 09:13:00 +0000 (11:13 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 09:22:29 +0000 (11:22 +0200)
commitb3383c7423aad2daf9ddbd2c1280a6a7795484b7
treed78a3e396b7e5ee91d4cb1b6a88d2bf5dcbded1a
parent26372eb85d3008c356b20e9eae506dc464dc0856
client: Delay additional input processing until after send

We need to copy input to @auxfp to implement command line option -2,
and pass it to save_input() to enable protection against a rogue
server exploiting redirection and execute.  We currently do this right
when input enters the ring buffer, in recv_input().

Calling save_input() before sending input to the server is sloppy: it
can make the client accept "future" redirections and executes.

Delay save_input() until after input is sent.  For simplicity, delay
copying to @auxfp as well.

This is actually pretty close to how things worked before commit
8b7d0b9 (v4.3.11).

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/client/play.c