Merge pull request #2439 from thelounge/xpaw/identd-parseint

Specify parseInt base in respondToIdent
This commit is contained in:
Pavel Djundik 2018-05-15 16:42:28 +03:00 committed by GitHub
commit db4661339a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,8 +47,8 @@ class Identification {
respondToIdent(socket, data) { respondToIdent(socket, data) {
data = data.toString().split(","); data = data.toString().split(",");
const lport = parseInt(data[0]); const lport = parseInt(data[0], 10) || 0;
const fport = parseInt(data[1]); const fport = parseInt(data[1], 10) || 0;
if (lport < 1 || fport < 1 || lport > 65535 || fport > 65535) { if (lport < 1 || fport < 1 || lport > 65535 || fport > 65535) {
return; return;