Skip to content

Commit

Permalink
remove slashes only at start & end of path
Browse files Browse the repository at this point in the history
  • Loading branch information
kritzl committed Oct 30, 2023
1 parent 01e9888 commit 2cfc4dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mafiasi/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def handler500(request):
def handler404(request, exception):
try:
apps.get_app_config("wiki")
path = str(request.path).replace("/", "", 2)
path = str(request.path).strip("/")
if "/" in path:
return HttpResponse("Page not found", status=404)

Expand Down

0 comments on commit 2cfc4dd

Please sign in to comment.