From a15c8f6e8a20d60d1097ede16a63b7f350af052c Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Mon, 30 Aug 2010 20:35:01 +0200 Subject: Only allow 'get' to be used from local (unix) connections. --- commands.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands.c b/commands.c index bde61cd..21b482a 100644 --- a/commands.c +++ b/commands.c @@ -3,6 +3,7 @@ #include "servers.h" #include "server_communication.h" +#include #include GQuark commands_quark() { @@ -210,7 +211,7 @@ void commands_handle(GSocketConnection *connection, const gchar *cmd, GError **e commands_find(connection, cmd, error); } else if(g_strncasecmp(cmd, "exit", 4) == 0) { commands_exit(connection, cmd, error); - } else if(g_strncasecmp(cmd, "get", 3) == 0) { + } else if(G_IS_UNIX_CONNECTION(connection) && g_strncasecmp(cmd, "get", 3) == 0) { commands_get(connection, cmd, error); } else { g_debug("unknown command"); -- cgit v1.2.3