From 3ec7aace265f92ec35d0d3f542df0c1fdd3954bf Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 20 Apr 2018 18:23:43 -0700 Subject: [PATCH] Ensure infoHash is lowercase --- client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.js b/client.js index dec7fa6..ee18dd0 100644 --- a/client.js +++ b/client.js @@ -51,7 +51,7 @@ function Client (opts) { self._peerIdBinary = self._peerIdBuffer.toString('binary') self.infoHash = typeof opts.infoHash === 'string' - ? opts.infoHash + ? opts.infoHash.toLowerCase() : opts.infoHash.toString('hex') self._infoHashBuffer = Buffer.from(self.infoHash, 'hex') self._infoHashBinary = self._infoHashBuffer.toString('binary')