forked from MarseyWorld/MarseyWorld
Redirect cuts off end of url for username redirect (#326)
* Redirect cuts off end of url for username redirect username redirect cuts off end of url, For example: Username: faygo_sucks Old_username: geese_suck Behavior: "https://rdrama.net/@geese_suck" -> "https://rdrama.net/@faygo_suck" Expected Behavior: "https://rdrama.net/@geese_suck" -> "https://rdrama.net/@faygo_sucks" * Update users.pymaster
parent
5aff344efe
commit
3c506d768c
|
@ -922,7 +922,7 @@ def u_username(username, v=None):
|
||||||
|
|
||||||
|
|
||||||
if username != u.username:
|
if username != u.username:
|
||||||
return redirect(SITE_FULL + request.full_path.replace(username, u.username)[:-1])
|
return redirect(SITE_FULL + request.full_path.replace(username, u.username))
|
||||||
|
|
||||||
if u.reserved:
|
if u.reserved:
|
||||||
if request.headers.get("Authorization") or request.headers.get("xhr") or request.path.endswith(".json"):
|
if request.headers.get("Authorization") or request.headers.get("xhr") or request.path.endswith(".json"):
|
||||||
|
@ -1321,4 +1321,4 @@ def toggle_pins(sort):
|
||||||
|
|
||||||
if is_site_url(request.referrer):
|
if is_site_url(request.referrer):
|
||||||
return redirect(request.referrer)
|
return redirect(request.referrer)
|
||||||
return redirect('/')
|
return redirect('/')
|
||||||
|
|
Loading…
Reference in New Issue