New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bittorrent-dht

Package Overview
Dependencies
Maintainers
8
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bittorrent-dht - npm Package Compare versions

Comparing version 7.8.1 to 7.8.2

2

client.js

@@ -549,3 +549,3 @@ module.exports = DHT

var port = query.a.implied_port ? peer.port : query.a.port
if (!port || typeof port !== 'number') return
if (!port || typeof port !== 'number' || port <= 0 || port > 65535) return
var infoHash = query.a.info_hash

@@ -552,0 +552,0 @@ var token = query.a.token

{
"name": "bittorrent-dht",
"description": "Simple, robust, BitTorrent DHT implementation",
"version": "7.8.1",
"version": "7.8.2",
"author": {

@@ -6,0 +6,0 @@ "name": "WebTorrent, LLC",

@@ -195,2 +195,18 @@ var Buffer = require('safe-buffer').Buffer

test('`announce_peer` with bad port', function (t) {
t.plan(1)
var dht1 = new DHT({ bootstrap: false })
dht1.listen(function () {
var dht2 = new DHT({ bootstrap: '127.0.0.1:' + dht1.address().port, timeout: 100 })
var infoHash = common.randomId()
dht2.announce(infoHash, 99999, function (err) {
dht1.destroy()
dht2.destroy()
t.ok(err, 'had error')
})
})
})
test('`announce_peer` query gets ack response', function (t) {

@@ -197,0 +213,0 @@ t.plan(5)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc