summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2023-01-13 21:15:03 +0100
committerJo-Philipp Wich <jo@mein.io>2023-01-13 21:18:09 +0100
commit9634086efc6d58224899037c92c896ab27373d8a (patch)
tree936c64ba5174355b8113c7b365e9e47f388bf1f8
parentb49fb7b42e660e30ebb539225b8d11f3ba54a7d5 (diff)
luci-base: dispatcher.uc: urldecode URL components
In order to maintain compatibility with the old Lua runtime, ensure to URL decode the request path segments since they might end up as arguments to invoked action functions. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--modules/luci-base/ucode/dispatcher.uc2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/ucode/dispatcher.uc b/modules/luci-base/ucode/dispatcher.uc
index 9500528743..24769f0037 100644
--- a/modules/luci-base/ucode/dispatcher.uc
+++ b/modules/luci-base/ucode/dispatcher.uc
@@ -892,7 +892,7 @@ dispatch = function(_http, path) {
try {
let menu = menu_json();
- path ??= map(match(http.getenv('PATH_INFO'), /[^\/]+/g), m => m[0]);
+ path ??= map(match(http.getenv('PATH_INFO'), /[^\/]+/g), m => urldecode(m[0]));
let resolved = resolve_page(menu, path);