Decode URL encoded preference cookie when parsing

This commit is contained in:
syeopite 2021-05-24 06:52:55 -07:00
parent 065c104f27
commit 0a87ba6930
No known key found for this signature in database
GPG Key ID: 6FA616E5A5294A82

View File

@ -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