aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJason Cox <me@jasoncarloscox.com>2024-02-22 20:25:20 -0500
committerRobin Jarry <robin@jarry.cc>2024-04-13 21:46:44 +0200
commit480637d9ed8cf979f4be377cb37fdd14b60ceef3 (patch)
treeb4a42644e0e3b1b2718c4f9f4a638828b61bfc94 /lib
parentf4cf6ca5c13fce8fe1f84f37cdafe62c1d2d8b0c (diff)
downloadaerc-480637d9ed8cf979f4be377cb37fdd14b60ceef3.tar.gz
aerc-480637d9ed8cf979f4be377cb37fdd14b60ceef3.zip
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')
-rw-r--r--lib/ipc/receive.go4
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()}