Disable JavaScript object macros for security
masterIf you are concerned about security risks associated with users injecting JavaScript via object macros, you can disable the parsing of JavaScript object macros directly within RiveScript source files using setHandler("javascript", null).
Warning: Using the origMessage approach with untrusted users is potentially dangerous, as they might introduce syntax errors or attempt to inject JavaScript object macros.
var bot = new RiveScript();
// This will prevent `> object * javascript` in source code from being
// parsed and executed.
bot.setHandler("javascript", null);
// You can still define macros from the program side via subroutines
bot.setSubroutine("learn", function(rs, args) {
// Implementation for learning logic
});