summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-olsr/luasrc/model
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-02-21 14:59:16 +0100
committerJo-Philipp Wich <jo@mein.io>2022-02-21 14:59:16 +0100
commit5663fd596b567d53587fcc4052df3095520c08a7 (patch)
tree9685e07b21407ede0353cd590a5634be0e98330c /applications/luci-app-olsr/luasrc/model
parente870775d39238dbaea693eff892d0b33e1dec76c (diff)
luci-base: properly handle promise targets in Request.request()
Under some circumstances, ubus RPC requests may be initiated while LuCI is still resolving the `rpcBaseURL` value. In this situation, the `target` argument of the `request()` call will be a pending promise object which results in an invalid URL when serialized by `expandURL()`, leading to an `Failed to execute 'open' on 'XMLHttpRequest': Invalid URL` exception. This commonly occured on the index status page which immediately initiates ubus RPC calls on load to discover existing status page partials. Solve the issue by filtering the given `target` argument through `Promise.resolve()` before expanding the URL and initiating the actual request. Fixes: #3747 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-olsr/luasrc/model')
0 files changed, 0 insertions, 0 deletions