Disallow /query on non-nicks

This commit is contained in:
Jérémie Astori 2016-03-26 13:18:55 -04:00
parent 7ee7dc79f0
commit fefc6c5132

View File

@ -14,6 +14,11 @@ exports.input = function(network, chan, cmd, args) {
return; return;
} }
// If target doesn't start with an allowed character, ignore
if (!/^[a-zA-Z_\\\[\]{}^`|]/.test(target)) {
return;
}
var newChan = new Chan({ var newChan = new Chan({
type: Chan.Type.QUERY, type: Chan.Type.QUERY,
name: target name: target