diff --git a/CHANGELOG.md b/CHANGELOG.md index f84dc790..c0718686 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## vX.Y.0 (future) +## v2.20250504.0 + +Small release with quick workaround fix for issue #4251 (Nil assertion failed). + +PR: https://github.com/iv-org/invidious/issues/5263 + ## v2.20250314.0 ### Wrap-up diff --git a/config/config.example.yml b/config/config.example.yml index d6119f29..8d3e6212 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -90,14 +90,14 @@ db: ## ## API key for Invidious companion, used for securing the communication ## between Invidious and Invidious companion. -## The size of the key needs to be more or equal to 16. +## The key needs to be exactly 16 characters long. ## ## Note: This parameter is mandatory when Invidious companion is enabled ## and should be a random string. ## Such random string can be generated on linux with the following ## command: `pwgen 16 1` ## -## Accepted values: a string +## Accepted values: a string (of length 16) ## Default: ## #invidious_companion_key: "CHANGE_ME!!" diff --git a/src/invidious/routes/video_playback.cr b/src/invidious/routes/video_playback.cr index b1c788c2..083087a9 100644 --- a/src/invidious/routes/video_playback.cr +++ b/src/invidious/routes/video_playback.cr @@ -21,7 +21,7 @@ module Invidious::Routes::VideoPlayback end # Sanity check, to avoid being used as an open proxy - if !host.matches?(/[\w-]+.googlevideo.com/) + if !host.matches?(/[\w-]+\.(?:googlevideo|c\.youtube)\.com/) return error_template(400, "Invalid \"host\" parameter.") end @@ -37,7 +37,8 @@ module Invidious::Routes::VideoPlayback # See: https://github.com/iv-org/invidious/issues/3302 range_header = env.request.headers["Range"]? - if range_header.nil? + sq = query_params["sq"]? + if range_header.nil? && sq.nil? range_for_head = query_params["range"]? || "0-640" headers["Range"] = "bytes=#{range_for_head}" end