From 0a87ba6930948ebfec9a3ad2e336c0c7e6037d8a Mon Sep 17 00:00:00 2001 From: syeopite Date: Mon, 24 May 2021 06:52:55 -0700 Subject: [PATCH] Decode URL encoded preference cookie when parsing --- src/invidious.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index de89b9c3..ebba52b1 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -166,7 +166,7 @@ end before_all do |env| 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 Preferences.from_json("{}") end