diff --git a/bin/rhizome.js b/bin/rhizome.js index 2eed0b1..f7a9556 100755 --- a/bin/rhizome.js +++ b/bin/rhizome.js @@ -40,6 +40,7 @@ var httpServer, wsServer, oscServer var httpValidator = new coreValidation.ChaiValidator({ port: function(val) { expect(val).to.be.a('number') + expect(val).to.be.within(0, 65535) }, staticDir: function(val, doneDirName) { expect(val).to.be.a('string') diff --git a/lib/osc/BlobClient.js b/lib/osc/BlobClient.js index ec31cf1..ff01f16 100644 --- a/lib/osc/BlobClient.js +++ b/lib/osc/BlobClient.js @@ -78,11 +78,11 @@ _.extend(Client.prototype, coreValidation.ValidateConfigMixin, { }, blobsPort: function(val) { expect(val).to.be.a('number') - expect(val).to.be.within(1025, 49150) + expect(val).to.be.within(0, 65535) }, serverBlobsPort: function(val) { expect(val).to.be.a('number') - expect(val).to.be.within(1025, 49150) + expect(val).to.be.within(0, 65535) }, serverHostname: function(val) { expect(val).to.be.an.ip diff --git a/lib/osc/Server.js b/lib/osc/Server.js index dc49d4a..f2160fe 100644 --- a/lib/osc/Server.js +++ b/lib/osc/Server.js @@ -93,11 +93,11 @@ _.extend(OSCServer.prototype, coreValidation.ValidateConfigMixin, coreServer.Ser configValidator: new coreValidation.ChaiValidator({ blobsPort: function(val) { expect(val).to.be.a('number') - expect(val).to.be.within(1025, 49150) + expect(val).to.be.within(0, 65535) }, port: function(val) { expect(val).to.be.a('number') - expect(val).to.be.within(1025, 49150) + expect(val).to.be.within(0, 65535) } }), diff --git a/lib/websockets/Client.js b/lib/websockets/Client.js index 42cf3e9..702eec5 100644 --- a/lib/websockets/Client.js +++ b/lib/websockets/Client.js @@ -200,6 +200,7 @@ _.extend(Client.prototype, EventEmitter.prototype, coreValidation.ValidateConfig configValidator: new coreValidation.ChaiValidator({ port: function(val) { expect(val).to.be.a('number') + expect(val).to.be.within(0, 65535) }, hostname: function(val) { expect(val).to.be.a('string') diff --git a/lib/websockets/Server.js b/lib/websockets/Server.js index 396d656..e808f7b 100644 --- a/lib/websockets/Server.js +++ b/lib/websockets/Server.js @@ -78,6 +78,7 @@ _.extend(WebSocketServer.prototype, coreServer.Server.prototype, coreValidation. port: function(val) { if (this.serverInstance) return expect(val).to.be.a('number') + expect(val).to.be.within(0, 65535) }, usersLimit: function(val) { expect(val).to.be.a('number') diff --git a/package.json b/package.json index ca5df65..0623190 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ }, "scripts": { "test": "mocha test/ --recursive --timeout 20000", - "coverage": "istanbul cover _mocha -- test --reporter spec --recursive" + "coverage": "istanbul cover _mocha -- test --reporter spec --recursive", + "cloc": "cloc bin/ lib/" } }