Skip to content
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

TypeError: Cannot read property 'toString' of null #21

Open
egyptianbman opened this issue Oct 1, 2018 · 1 comment
Open

TypeError: Cannot read property 'toString' of null #21

egyptianbman opened this issue Oct 1, 2018 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@egyptianbman
Copy link
Member

return s.toString().replace(/[^a-zA-Z0-9.]+/g, '');

I'm creating this issue as a reminder for myself to look into this.

TypeError: Cannot read property 'toString' of null
    at getSafeString (node_modules/stratum-pool/lib/stratum.js:143:34)
    at getSafeWorkerString (node_modules/stratum-pool/lib/stratum.js:146:17)
    at handleAuthorize (node_modules/stratum-pool/lib/stratum.js:158:28)
    at handleMessage (node_modules/stratum-pool/lib/stratum.js:85:17)
    at messages.forEach.message (node_modules/stratum-pool/lib/stratum.js:291:25)
    at Array.forEach (<anonymous>)
    at Socket.socket.on.d (node_modules/stratum-pool/lib/stratum.js:273:26)

I couldn't ask for a better stack trace! Ok, it looks like someone was submitting requests to authenticate but the miner isn't sending any params through which leads message.params[0] being null. I'm tempted to create a PR that instabans any requests such as this.

@egyptianbman egyptianbman added the bug Something isn't working label Oct 1, 2018
@egyptianbman egyptianbman self-assigned this Oct 1, 2018
@GaryChicago
Copy link
Contributor

@egyptianbman use that ban hammer. 🔨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants