From 29a21860aef1c468493118f460dc779580c08c66 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Wed, 5 Sep 2018 21:07:19 -0500 Subject: [PATCH] Strip leading slashes from referers --- src/invidious/helpers/utils.cr | 1 + 1 file changed, 1 insertion(+) diff --git a/src/invidious/helpers/utils.cr b/src/invidious/helpers/utils.cr index fec20189..c5facac8 100644 --- a/src/invidious/helpers/utils.cr +++ b/src/invidious/helpers/utils.cr @@ -184,6 +184,7 @@ def get_referer(env, fallback = "/") end referer = referer.full_path + referer = "/" + referer.lstrip("\/\\") if referer == env.request.path referer = fallback