https://gitlab.synchro.net/main/sbbs/-/commit/bdd892ad87e61dc4e0d98d56
Modified Files:
exec/chat_sec.js email_sec.js filescancfg.js exec/load/shell_lib.js exec/tempxfer.js user_personal.js user_settings.js user_terminal.js userlist.js viewimsgs.js
Log Message:
Fix wide-spread misuse of console.getkeys()
Confusingly, console.getkeys() has a default maxnum argument value of 4294967295, so if you don't pass 0 as the second argument, digits are always acceptable input characters.
At this point, it's probably too late to change the default maxnum value to 0 (a sensible default I think I would much prefer now). :-(
There were a few cases where the script author (i.e. I) skipped the maxnum value altogether and provided a mode argument instead (e.g. K_UPPER, which
is 1), so some prompts would allow '1' as the only digit/number. K_UPPER is
the default mode, so I didn't notice that it was being interpretted as the maxnum value instead.
So if you're a JS script author and you're using console.getkeys(), you might be surprised to find that it returns a number when you don't expect it.
--- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)