best way to save what you love
Svelte collaborationdownloaderinstagramjavascriptmusicredditsocial-mediasoundcloudsveltetiktoktwittertypescriptvideovimeovkwebappyoutubeyoutube-downloader
attempt to fix the weird issue with authorization
wukko038c07c1b836
diff --git a/src/config.json b/src/config.jsonindex 91915bcf..d4505721 100644--- a/src/config.json+++ b/src/config.json@@ -28,7 +28,7 @@"litecoin": "ltc1qvp0xhrk2m7pa6p6z844qcslfyxv4p3vf95rhna"},"links": {- "boosty": "https://boosty.to/wukko"+ "boosty": "https://boosty.to/wukko/donate"}},"links": {diff --git a/src/localization/languages/en.json b/src/localization/languages/en.jsonindex 73677098..a6d15b73 100644--- a/src/localization/languages/en.json+++ b/src/localization/languages/en.json@@ -29,7 +29,7 @@"ErrorCouldntFetch": "i couldn't find anything about this link. check if it works and try again! some content may be region restricted, so keep that in mind.","ErrorLengthLimit": "i can't process videos longer than {s} minutes, so pick something shorter instead!","ErrorBadFetch": "something went wrong when i tried getting info about your link. are you sure it works? check if it does, and try again.",- "ErrorNoInternet": "there's no internet or {appName} api is down. check your connection and try again.",+ "ErrorNoInternet": "there's no internet or {appName} api is temporarily unavailable. check your connection and try again.","ErrorCantConnectToServiceAPI": "i couldn't connect to the service api. maybe it's down, or {appName} got blocked. try again, but if error persists, {ContactLink}.","ErrorEmptyDownload": "i don't see anything i could download by your link. try a different one!","ErrorLiveVideo": "this is a live video, i am yet to learn how to look into future. wait for the stream to finish and try again!",diff --git a/src/modules/stream/manage.js b/src/modules/stream/manage.jsindex ed2d2902..2a6011c8 100644--- a/src/modules/stream/manage.js+++ b/src/modules/stream/manage.js@@ -44,9 +44,9 @@ export function createStream(obj) {export function verifyStream(ip, id, hmac, exp) {try {- if (id.length === 21) {- let streamInfo = streamCache.get(id);- if (!streamInfo) return { error: 'this stream token does not exist', status: 400 };+ if (id.toString().length === 21) {+ let streamInfo = streamCache.get(id.toString());+ if (!streamInfo) return { error: "requested stream does not exist", status: 400 };let ghmac = sha256(`${id},${ip},${streamInfo.service},${exp}`, streamSalt);if (String(hmac) === ghmac && String(exp) === String(streamInfo.exp) && ghmac === String(streamInfo.hmac)@@ -54,7 +54,7 @@ export function verifyStream(ip, id, hmac, exp) {return streamInfo;}}- return { error: "i couldn't verify whether you have access to this stream. try again or refresh the page!", status: 401 };+ return { error: "i couldn't verify whether you have access to this download. try again or refresh the page!", status: 401 };} catch (e) {return { status: 500, body: { status: "error", text: "Internal Server Error" } };}