diff options
author | Jason Cox <me@jasoncarloscox.com> | 2024-02-22 20:25:20 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-04-13 21:46:44 +0200 |
commit | 480637d9ed8cf979f4be377cb37fdd14b60ceef3 (patch) | |
tree | b4a42644e0e3b1b2718c4f9f4a638828b61bfc94 /lib/ipc | |
parent | f4cf6ca5c13fce8fe1f84f37cdafe62c1d2d8b0c (diff) | |
download | aerc-480637d9ed8cf979f4be377cb37fdd14b60ceef3.tar.gz |
ipc: disable IPC completely when disable-ipc=true
Truly disable IPC when disable-ipc is set to true in aerc.conf. Don't
run commands over IPC and don't start an IPC server.
Being able to disable IPC in the config is useful because it allows
making aerc open mailto links in a new instance without modifying the
aerc.desktop file. There are of course potential security benefits as
well.
Changelog-changed: The `disable-ipc` option in `aerc.conf` completely
disables IPC.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib/ipc')
-rw-r--r-- | lib/ipc/receive.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/ipc/receive.go b/lib/ipc/receive.go index ff837d0f..bba365b6 100644 --- a/lib/ipc/receive.go +++ b/lib/ipc/receive.go @@ -9,7 +9,6 @@ import ( "sync/atomic" "time" - "git.sr.ht/~rjarry/aerc/config" "git.sr.ht/~rjarry/aerc/lib/log" "git.sr.ht/~rjarry/aerc/lib/xdg" ) @@ -97,9 +96,6 @@ func (as *AercServer) Serve() { } func (as *AercServer) handleMessage(req *Request) *Response { - if config.General.DisableIPC { - return &Response{Error: "command rejected: IPC is disabled"} - } err := as.handler.Command(req.Arguments) if err != nil { return &Response{Error: err.Error()} |