luci/modules/luci-base/htdocs/luci-static/resources
Jo-Philipp Wich 5663fd596b 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>
2022-02-21 14:59:16 +01:00
..
cbi luci-base: move old cbi icons to luci-compat 2020-05-07 19:40:29 +02:00
icons luci-base: optimize some PNG files 2020-05-07 20:05:52 +02:00
protocol treewide: drop MAC and MTU from interfaces (protocols) 2021-05-28 15:34:41 +02:00
tools luci-app-firewall: fix setting unspecified zone on forwardings 2022-02-16 00:27:37 +01:00
cbi.js luci-base: cbi.js: properly handle non-strings in %h and %q formats 2021-12-09 16:25:50 +01:00
firewall.js luci-base: firewall.js: add getZoneColorStyle() helper 2021-11-11 13:00:50 +01:00
form.js luci-base: form.js: do not execute embedded script code in stripTags() 2021-12-23 17:08:21 +01:00
fs.js luci-base: harmonize JS class naming and requesting 2020-04-02 21:51:20 +02:00
luci.js luci-base: properly handle promise targets in Request.request() 2022-02-21 14:59:16 +01:00
network.js luci-base: network.js: ignore wireless ifname patterns on retrieving devices 2021-11-10 11:57:43 +01:00
promis.min.js luci-base: add ES6 Promise polyfill for IE < Edge 2019-07-07 15:25:49 +02:00
rpc.js luci-base: don't append object.method to the RPC url 2020-09-23 16:54:18 +02:00
uci.js luci-base: uci.js: merge changes when retrieving entire sections 2021-03-29 22:35:50 +02:00
ui.js luci-base: ui.js: avoid error tooltips overlapping dropdowns 2021-12-09 15:29:36 +01:00
validation.js Merge pull request #5442 from lvoegl/validation-error-popup-message 2021-11-18 11:39:45 +01:00
xhr.js luci-base: luci.js: add HTTP request functions 2019-07-07 15:25:49 +02:00