mirror of
https://github.com/iv-org/invidious.git
synced 2026-07-27 16:06:47 -05:00
fix: check known_tabs against downcased selected_tab
This commit is contained in:
parent
b8026934a0
commit
492eab04e3
@ -338,7 +338,7 @@ module Invidious::Routes::Channels
|
||||
def self.potential_brand_redirect(env)
|
||||
# Check for known tab in url before trying to brand_redirect (avoids unneeded request to YouTube)
|
||||
|
||||
selected_tab = env.params.url["tab"]?
|
||||
selected_tab = env.params.url["tab"]?.try &.downcase
|
||||
|
||||
if KNOWN_TABS.includes? selected_tab
|
||||
brand_redirect(env)
|
||||
@ -369,7 +369,7 @@ module Invidious::Routes::Channels
|
||||
return error_template(404, I18n.translate(locale, "This channel does not exist."))
|
||||
end
|
||||
|
||||
selected_tab = env.params.url["tab"]?
|
||||
selected_tab = env.params.url["tab"]?.try &.downcase
|
||||
|
||||
if KNOWN_TABS.includes? selected_tab
|
||||
url = "/channel/#{ucid}/#{selected_tab}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user