home · contact · privacy
In web client index selection, disallow non-number replies.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 14 Dec 2020 21:25:12 +0000 (22:25 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 14 Dec 2020 21:25:12 +0000 (22:25 +0100)
rogue_chat.html

index dd8de5b783bbf835fa73d5a1b92b7c80f5901629..d810c2e580aabb3f4cc1443d8ff040b4f657374a 100644 (file)
@@ -1045,7 +1045,7 @@ let tui = {
   },
   pick_selectable: function(task_name) {
       const i = parseInt(this.inputEl.value);
-      if (isNaN(i) || i < 0 || i >= this.selectables.length) {
+      if (isNaN(this.inputEl.value) || i < 0 || i >= this.selectables.length) {
           tui.log_msg('? invalid index, aborted');
       } else {
           server.send(['TASK:' + task_name, tui.selectables[i]]);