Commit graph

5 commits

Author SHA1 Message Date
Daniel Martí
72f55b857b lib: fix an out of bounds panic in the server
If the message doesn't contain ':', we don't properly discard the
message, so we end up slicing it like msg[:-1].

This can be reproduced if one runs 'aerc foo', as the server receives
'foo' as the message.

'aerc foo' still doesn't do anything very user friendly, but at least it
doesn't panic horribly.

While at it, do the 'got message' log at the very beginning, so that the
user can see what message the server got before reporting the command as
invalid.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
2020-02-13 10:26:12 -05:00
Heiko Carrasco
70c16fc346 Print success to socket if no error was thrown
When Reto Brunners patch is applied (which works really well for me), the user gets to see the message
returned by AercServer. Since this is nil if no errors were thrown it
prints "result: <nil>" to the cmd. This patch fixes that by just
returning success instead of the error message when err != nil.
2019-09-29 12:36:34 -04:00
Drew DeVault
3d578d376b Fix test failures 2019-07-29 15:44:28 -04:00
Drew DeVault
66a9052f0f Forward mailto links to server via ./aerc <mailto> 2019-07-19 14:34:13 -04:00
Drew DeVault
7a489cb001 Add Unix socket for communicating with aerc 2019-07-19 14:15:48 -04:00