diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 6db0d135b..2b2bab3bc 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -12,7 +12,7 @@ jobs: pull-requests: write steps: - - uses: actions/stale@v7 + - uses: actions/stale@v8 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: 'Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?' diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bf4f32cf..c6365c39b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [10.0.11](https://github.com/webtorrent/bittorrent-tracker/compare/v10.0.10...v10.0.11) (2023-08-01) + + +### Bug Fixes + +* mangled scrape infohashes ([#486](https://github.com/webtorrent/bittorrent-tracker/issues/486)) ([11cce83](https://github.com/webtorrent/bittorrent-tracker/commit/11cce83ddd858813f5684da8a116de4bee6e518b)) + ## [10.0.10](https://github.com/webtorrent/bittorrent-tracker/compare/v10.0.9...v10.0.10) (2023-06-16) diff --git a/lib/client/http-tracker.js b/lib/client/http-tracker.js index 162c68fb6..9eefd892a 100644 --- a/lib/client/http-tracker.js +++ b/lib/client/http-tracker.js @@ -4,7 +4,7 @@ import clone from 'clone' import Debug from 'debug' import get from 'simple-get' import Socks from 'socks' -import { bin2hex, hex2bin, arr2text } from 'uint8-util' +import { bin2hex, hex2bin, arr2text, text2arr, arr2hex } from 'uint8-util' import common from '../common.js' import Tracker from './tracker.js' @@ -244,12 +244,14 @@ class HTTPTracker extends Tracker { return } - keys.forEach(infoHash => { + keys.forEach(_infoHash => { // TODO: optionally handle data.flags.min_request_interval // (separate from announce interval) - const response = Object.assign(data[infoHash], { + const infoHash = _infoHash.length !== 20 ? arr2hex(text2arr(_infoHash)) : bin2hex(_infoHash) + + const response = Object.assign(data[_infoHash], { announce: this.announceUrl, - infoHash: bin2hex(infoHash) + infoHash }) this.client.emit('scrape', response) }) diff --git a/package.json b/package.json index 21c87e40e..e7b039d73 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bittorrent-tracker", "description": "Simple, robust, BitTorrent tracker (client & server) implementation", - "version": "10.0.10", + "version": "10.0.11", "author": { "name": "WebTorrent LLC", "email": "feross@webtorrent.io", @@ -51,12 +51,12 @@ "ws": "^8.0.0" }, "devDependencies": { - "@mapbox/node-pre-gyp": "1.0.10", - "@webtorrent/semantic-release-config": "1.0.9", + "@mapbox/node-pre-gyp": "1.0.11", + "@webtorrent/semantic-release-config": "1.0.10", "magnet-uri": "7.0.5", - "semantic-release": "21.0.5", + "semantic-release": "21.0.7", "standard": "*", - "tape": "5.6.3", + "tape": "5.6.6", "webtorrent-fixtures": "2.0.2", "wrtc": "0.4.7" },