Furry / 2captcha

A wrapper around the 2captcha api
71 stars 23 forks source link

Show private API Key in the error message! #32

Closed NabiKAZ closed 2 years ago

NabiKAZ commented 2 years ago

Sometimes I get this error:

Error: request to https://2captcha.com/in.php?invisible=false&googlekey=6Ld2sf4SAAAAAKSgzs0Q13IZhY02Pyo31S2jgOB5&pageurl=https%3A%2F%2Fexample.com%2F&method=userrecaptcha&key=xxxxxxxxxxxxxxxxxxx&json=1&header_acao=1&soft_id=3316 failed, reason: connect ECONNREFUSED 65.108.194.67:443

The error is not issue, Note that, the xxxxxxxxxxxxxxxxxxx in here is exactly my real private API Key! In terms of security I thinks should not show key in app.

Furry commented 2 years ago

This error seems to originate from Node-Fetch in the situation where the 2captcha API/Website is down, (or the machine's internet fails).

I see the concern, I'll add a commit to suppress the full URI of the request if node-fetch errors

Furry commented 2 years ago

Resolved in /next branch, with commit: https://github.com/Furry/2captcha/commit/b7fa4afd452f3835ec1b7504155ddd69d01c9e5e