summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamantaz Fox <coding@samantaz.fr>2024-02-12 22:30:48 +0100
committerSamantaz Fox <coding@samantaz.fr>2024-02-12 22:30:48 +0100
commitc85b908613f39894e5de5ca6911f8adb2a911297 (patch)
tree27bf3af2c495507f8ecca227e7a315557e30ce36 /src
parentf32764c840216f403ad73e09f0dde9c4a997f530 (diff)
parent0917efd9cbf4129d508217dbf38c98db5eba13cf (diff)
downloadinvidious-c85b908613f39894e5de5ca6911f8adb2a911297.tar.gz
invidious-c85b908613f39894e5de5ca6911f8adb2a911297.tar.bz2
invidious-c85b908613f39894e5de5ca6911f8adb2a911297.zip
API: Fix missing wildcards after login redirect (#4348)
This PR fixes an issue where the `scopes` parameter would see its wildmark characters (*) removed during the login page redirection, after that a call to `/authorize_token` was made while the user was not logged in. Closes issue 4200
Diffstat (limited to 'src')
-rw-r--r--src/invidious/helpers/utils.cr2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/helpers/utils.cr b/src/invidious/helpers/utils.cr
index a006d602..e438e3b9 100644
--- a/src/invidious/helpers/utils.cr
+++ b/src/invidious/helpers/utils.cr
@@ -262,7 +262,7 @@ def get_referer(env, fallback = "/", unroll = true)
end
referer = referer.request_target
- referer = "/" + referer.gsub(/[^\/?@&%=\-_.:,0-9a-zA-Z]/, "").lstrip("/\\")
+ referer = "/" + referer.gsub(/[^\/?@&%=\-_.:,*0-9a-zA-Z]/, "").lstrip("/\\")
if referer == env.request.path
referer = fallback