-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyntaxError with simple-recaptcha #28
Comments
Weird, .. could you put a log statement right before the parse statement on line 44 response.on('end', function() {
console.log(options, body); // add this one
// also to prevent the crash you wrap it with a try/catch
var data = {};
try{ data = JSON.parse( body ); }
catch (e) {}
if (!data.success) return cb(new Error(data['error-codes']));
cb(null);
}); the simple-recaptcha module that I'm using a fork, so we can't create issues but we can create pull requests if you can help me debug the issue Remember to obfuscate your private key if it shows up in the logs |
Changes have been applied and I've activated recaptcha again, I'll report back once I get another error. |
There we go, now I have an update for you;
I think the problem is that a space seems to have appeared at the end of my private key, no idea when this happened though since I haven't touched the keys since first adding them when installing the plugin... Maybe something to check, just to be sure. Strip spaces from the value when saving, if they're going to be fed directly into a request URI later on. |
ah ok, thanks, I will also add a try/catch block in the core so it won't crash the server. |
Forum has been crashing with the following error recently;
I'm running NodeBB v0.6.0 with spam-be-gone v0.4.0, if that helps.
The text was updated successfully, but these errors were encountered: