mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-23 22:39:31 -05:00
Decode URL encoded preference cookie when parsing
This commit is contained in:
parent
065c104f27
commit
0a87ba6930
@ -166,7 +166,7 @@ end
|
|||||||
|
|
||||||
before_all do |env|
|
before_all do |env|
|
||||||
preferences = begin
|
preferences = begin
|
||||||
Preferences.from_json(env.request.cookies["PREFS"]?.try &.value || "{}")
|
Preferences.from_json(URI.decode_www_form(env.request.cookies["PREFS"]?.try &.value || "{}"))
|
||||||
rescue
|
rescue
|
||||||
Preferences.from_json("{}")
|
Preferences.from_json("{}")
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user