Skip to content

bug: error when importing podcast with escaped characters in files url

Describe the bug

When a podcast to import has escaped characters in files url to import, error 404 is raised.

Steps to reproduce

  1. Go to import a podcast
  2. Select a podcast from Anchor (eg. https://anchor.fm/s/4dc1d304/podcast/rss )
  3. Launch import
  4. See the error

Expected behavior

Podcast should be imported.

Actual behavior

Podcast is not imported.

Relevant logs and/or screenshots

Screenshot_from_2021-04-10_12-41-26

Screenshot_from_2021-04-10_12-41-57

Import is trying to import
https://anchor.fm/s/4dc1d304/podcast/play/27458623/https:/d3ctxlq1ktw2nl.cloudfront.net/staging/2021-1-26/b0514a0e-a5a0-4ccd-d558-6b50cb7ea15a.mp3
instead of
https://anchor.fm/s/4dc1d304/podcast/play/27458623/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2021-1-26%2Fb0514a0e-a5a0-4ccd-d558-6b50cb7ea15a.mp3

Context

  • Castopod: alpha-45
  • OS: Ubuntu
  • Browser: Any
  • Web server: Any

Possible fixes

media_helper download_file($file_url) is using \CodeIgniter\HTTP\URI which messes everything up with URLs. Do not use \CodeIgniter\HTTP\URI as \Config\Services::curlrequest()->get() want a string parameter anyway…

Edited by Benjamin Bellamy