From 94fdd99ab5ce2481d7b2be75cb047d491c1bcf14 Mon Sep 17 00:00:00 2001 From: advplyr Date: Tue, 24 Dec 2024 15:07:11 -0600 Subject: [PATCH] Fix wrong url used for SSRF filter in fileUtils --- server/utils/fileUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/utils/fileUtils.js b/server/utils/fileUtils.js index 109cab5b..3725481f 100644 --- a/server/utils/fileUtils.js +++ b/server/utils/fileUtils.js @@ -277,8 +277,8 @@ module.exports.downloadFile = (url, filepath, contentTypeFilter = null) => { 'User-Agent': 'audiobookshelf (+https://audiobookshelf.org)' }, timeout: 30000, - httpAgent: global.DisableSsrfRequestFilter?.(feedUrl) ? null : ssrfFilter(feedUrl), - httpsAgent: global.DisableSsrfRequestFilter?.(feedUrl) ? null : ssrfFilter(feedUrl) + httpAgent: global.DisableSsrfRequestFilter?.(url) ? null : ssrfFilter(url), + httpsAgent: global.DisableSsrfRequestFilter?.(url) ? null : ssrfFilter(url) }) .then((response) => { // Validate content type