From fa5638f3b89f3f73cffc82232d926c445d6b5cb8 Mon Sep 17 00:00:00 2001 From: Peter Cottle Date: Wed, 25 Sep 2019 10:40:43 +0800 Subject: [PATCH] Resolves #608 -- enforce word boundary --- src/js/sandbox/commands.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/sandbox/commands.js b/src/js/sandbox/commands.js index 7f4e359d..1a4c1365 100644 --- a/src/js/sandbox/commands.js +++ b/src/js/sandbox/commands.js @@ -15,12 +15,12 @@ var Warning = Errors.Warning; var CommandResult = Errors.CommandResult; var instantCommands = [ - [/^ls/, function() { + [/^ls\b/, function() { throw new CommandResult({ msg: intl.str('ls-command') }); }], - [/^cd/, function() { + [/^cd\b/, function() { throw new CommandResult({ msg: intl.str('cd-command') });