mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
server/rest: unescape percent-encoded route parameters
for routes that address things by name instead of ID, e.g. /tag/tagname, where we allow special characters, we need to unescape the values.
This commit is contained in:
@ -101,7 +101,7 @@ def application(
|
|||||||
for hook in middleware.pre_hooks:
|
for hook in middleware.pre_hooks:
|
||||||
hook(ctx)
|
hook(ctx)
|
||||||
try:
|
try:
|
||||||
response = handler(ctx, match.groupdict())
|
response = handler(ctx, {k: urllib.parse.unquote(v) for k, v in match.groupdict().items()})
|
||||||
except Exception:
|
except Exception:
|
||||||
ctx.session.rollback()
|
ctx.session.rollback()
|
||||||
raise
|
raise
|
||||||
|
Reference in New Issue
Block a user