From fefc6c5132815893967e6c24b1ec4604e891a8ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Sat, 26 Mar 2016 13:18:55 -0400 Subject: [PATCH] Disallow /query on non-nicks --- src/plugins/inputs/query.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/inputs/query.js b/src/plugins/inputs/query.js index 53548bf3..cb093015 100644 --- a/src/plugins/inputs/query.js +++ b/src/plugins/inputs/query.js @@ -14,6 +14,11 @@ exports.input = function(network, chan, cmd, args) { return; } + // If target doesn't start with an allowed character, ignore + if (!/^[a-zA-Z_\\\[\]{}^`|]/.test(target)) { + return; + } + var newChan = new Chan({ type: Chan.Type.QUERY, name: target