Closed Wodki closed 7 years ago
I reverted some code that should handle the bad chars in the response. There appears to be some issues with escape chars in JSON responses that I need to figure out. The fix I put in place is dirty, but it should work.
Indeed the fix is kind of dirty, as a matter of fact I had applied almost the same fix in my celverbot.js, nonetheless thank you
@Wodki Do you mind sharing what your fix was? I am not satisfied with this because I think there is a possibility of crafting a request that would enable remote code execution. I would hate to see something like FOO\"} , console.log(1), {"bar":"
trigger something unexpected. I wasn't able to build a string that would cause the cleverbot API to return a malicious string, but there are smarter people than I that could possibly do it.
Sorry for being away the past few days but you didnt really miss anything. I too had used an eval, but a module, not the native cause it seems at least to me a bit unsafe and I tend to avoid it, eval's in general.
I have the latest celeverbot version and I call the cleverbot simply by using the example code
Before I get this error I have noticed cleverbot takes more time to answer progressively and eventually leading to this error.