ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix signup and import
Chocobozzz724339327243
diff --git a/server/core/controllers/api/videos/import.ts b/server/core/controllers/api/videos/import.tsindex 185215cc9c..5e6694899f 100644--- a/server/core/controllers/api/videos/import.ts+++ b/server/core/controllers/api/videos/import.ts@@ -237,7 +237,8 @@ async function processTorrentOrAbortRequest (req: express.Request, res: express.torrentfile.path = newTorrentPathconst buf = await readFile(torrentfile.path)- const parsedTorrent = parseTorrent(buf) as Instance+ // FIXME: typings: parseTorrent now returns an async result+ const parsedTorrent = await (parseTorrent(buf) as unknown as Promise<Instance>)if (parsedTorrent.files.length !== 1) {cleanUpReqFiles(req)diff --git a/server/core/lib/signup.ts b/server/core/lib/signup.tsindex a5e9e93c98..f4e0aef650 100644--- a/server/core/lib/signup.ts+++ b/server/core/lib/signup.ts@@ -38,7 +38,7 @@ export function isSignupAllowedForCurrentIP (ip: string) {let matched = ''// if there is a valid, non-empty whitelist, we exclude all unknown addresses too- if (CONFIG.SIGNUP.FILTERS.CIDR.WHITELIST.filter(cidr => isIPV4Cidr(cidr) || isIPV6Cidr(cidr))) {+ if (CONFIG.SIGNUP.FILTERS.CIDR.WHITELIST.some(cidr => isIPV4Cidr(cidr) || isIPV6Cidr(cidr))) {excludeList.push('unknown')}