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>
This commit is contained in:
parent
b49fb7b42e
commit
9634086efc
1 changed files with 1 additions and 1 deletions
|
@ -892,7 +892,7 @@ dispatch = function(_http, path) {
|
||||||
try {
|
try {
|
||||||
let menu = menu_json();
|
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);
|
let resolved = resolve_page(menu, path);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue