mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-18 20:21:36 +00:00
http server: error on invalid peer_id
This commit is contained in:
parent
aceca28b78
commit
65c44e81f7
@ -133,6 +133,8 @@ Server.prototype._onHttpRequest = function (req, res) {
|
||||
|
||||
if (!infoHash) return error('invalid info_hash')
|
||||
if (infoHash.length !== 20) return error('invalid info_hash')
|
||||
if (!peerId) return error('invalid peer_id')
|
||||
if (peerId.length !== 20) return error('invalid peer_id')
|
||||
if (!port) return error('invalid port')
|
||||
if (!peerId) return error('invalid peer_id')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user