projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b49fb7b
)
luci-base: dispatcher.uc: urldecode URL components
author
Jo-Philipp Wich
<jo@mein.io>
Fri, 13 Jan 2023 20:15:03 +0000
(21:15 +0100)
committer
Jo-Philipp Wich
<jo@mein.io>
Fri, 13 Jan 2023 20:18:09 +0000
(21:18 +0100)
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>
modules/luci-base/ucode/dispatcher.uc
patch
|
blob
|
history
diff --git
a/modules/luci-base/ucode/dispatcher.uc
b/modules/luci-base/ucode/dispatcher.uc
index 9500528743f0ed1620947ef44275da859662a366..24769f0037b42865e2aa0b1dbab37eb46ea42a43 100644
(file)
--- 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);