mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
do a sanity check on the provided ucid
Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com> Co-Authored-By: Samantaz Fox <coding@samantaz.fr>
This commit is contained in:
parent
3acfe202cc
commit
bc602a49e7
1 changed files with 5 additions and 1 deletions
|
@ -146,7 +146,11 @@ module Invidious::Routes::Feeds
|
||||||
env.response.headers["Content-Type"] = "application/atom+xml"
|
env.response.headers["Content-Type"] = "application/atom+xml"
|
||||||
env.response.content_type = "application/atom+xml"
|
env.response.content_type = "application/atom+xml"
|
||||||
|
|
||||||
ucid = env.params.url["ucid"]
|
if env.params.url["ucid"].matches?(/^[\w-]+$/)
|
||||||
|
ucid = env.params.url["ucid"]
|
||||||
|
else
|
||||||
|
return error_atom(400, InfoException.new("Invalid channel ucid provided."))
|
||||||
|
end
|
||||||
|
|
||||||
params = HTTP::Params.parse(env.params.query["params"]? || "")
|
params = HTTP::Params.parse(env.params.query["params"]? || "")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue