audiobookshelf/server
Conner McCall f460297daf
fix: allow upgrading HTTP to HTTPS for redirects
Re: #3142 and #3658

When adding certain podcasts, the server encountered a redirect from an HTTP URL to an HTTPS domain, causing an error that was difficult for end users to diagnose without inspecting logs or HTML.

This issue arose due to SSRF security measures that blocked such redirects. Instead of failing in these cases, we now detect when the error is caused by an HTTP-to-HTTPS upgrade. If confirmed, we upgrade the initial URL to HTTPS and resend the request.

Since this change does not allow cross-protocol or cross-domain redirections, it remains secure while resolving most of the reported issues.

Affected podcasts that are now fixed:

- D&D is for Nerds
- The New Yorker: The Writer's Voice - New Fiction from The New Yorker
- Radiolab
2025-02-13 09:19:02 -06:00
..
controllers Fix: Users with update permission unable to remove books from collection #3947 2025-02-07 17:09:48 -06:00
finders Support rich text book descriptions 2025-01-22 08:53:23 +02:00
libs Update custom metadata provider results to sanitize html descriptions #3880 2025-01-26 10:51:18 -06:00
managers Fix server crash when feed cover image is requested but doesnt exist 2025-02-11 16:14:49 -06:00
migrations Update changelog with v2.19.1 migration 2025-02-09 21:39:43 +02:00
models Update server/models/Book.js 2025-02-08 10:19:13 -06:00
objects Fix API including basepath in tracks contentUrl 2025-02-01 16:47:36 -06:00
providers Update custom metadata provider results to sanitize html descriptions #3880 2025-01-26 10:51:18 -06:00
routers Revert case-insensitive cache manager update in #3780 2025-01-20 08:59:45 -06:00
scanner Improve page load queries on title, titleIgnorePrefix, and addedAt sort order 2025-02-08 12:29:23 +02:00
utils fix: allow upgrading HTTP to HTTPS for redirects 2025-02-13 09:19:02 -06:00
Auth.js Security fix for GHSA-pg8v-5jcv-wrvw 2025-02-11 22:02:51 +02:00
Database.js Update clean database to remove invalid CollectionBook records 2025-01-28 16:58:42 -06:00
Logger.js Fix Logger.fatal to be a promise to ensure crash_logs.txt write 2025-01-30 17:27:32 -06:00
Server.js Merge branch 'advplyr:master' into master 2025-01-04 20:15:59 -05:00
SocketAuthority.js
Watcher.js