Skip to content

Commit 3ec7aac

Browse files
committed
Ensure infoHash is lowercase
1 parent e782ff3 commit 3ec7aac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function Client (opts) {
5151
self._peerIdBinary = self._peerIdBuffer.toString('binary')
5252

5353
self.infoHash = typeof opts.infoHash === 'string'
54-
? opts.infoHash
54+
? opts.infoHash.toLowerCase()
5555
: opts.infoHash.toString('hex')
5656
self._infoHashBuffer = Buffer.from(self.infoHash, 'hex')
5757
self._infoHashBinary = self._infoHashBuffer.toString('binary')

0 commit comments

Comments
 (0)