luci/modules/luci-base/luasrc/view/cbi
Jo-Philipp Wich e5a1ac0228 treewide: rework rollback/apply workflow
Rework the apply confirmation mechanism to be session agnostic in order to
circumvent cross domain restrictions which prevent the JS code from issuing
apply confirm requests in some cases, e.g. when changing the LAN IP.

Confirmation calls may now be done from unauthenticated pages, as long as a
matching confirmation token is sent along with the request.

The reasoning behind this is that there is little security impact in
confirming pending apply sessions, especially since those sessions can only
be initiated while being authenticated.

After this change, LuCI will now launch a confirmation process on every
rendered page when a rollback is pending. The confirmation will happen
regardless of whether the user is logged in or not, or if the current page
is a CBI form or static template.

A confirmation request now also requires a random one-time token which is
rendered along with the confirmation JavaScript code in order to succeed.

This token is not meant to provide security but to ensure that the confirm
was triggered from an interactive browser session and not some background
HTTP requests that happened to end up in the admin ui.

As a consequence, the different apply/confirm/rollback code paths in CBI
maps and the UCI change/revert pages have been consolidated into one common
implementation residing in the common global theme agnostic footer template.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-27 14:07:23 +02:00
..
apply_widget.htm treewide: rework rollback/apply workflow 2018-07-27 14:07:23 +02:00
browser.htm luci-base: fix browser.htm template 2018-03-01 12:31:50 +01:00
button.htm luci-base: globally cleanup markup 2018-06-23 17:13:22 +02:00
cell_valuefooter.htm treewide: convert HTML tables to div 2018-05-28 15:18:45 +02:00
cell_valueheader.htm luci-base: add description annotations to tblsection cells 2018-07-22 17:45:03 +02:00
compound.htm Rework LuCI build system 2015-01-08 16:26:20 +01:00
delegator.htm Rework LuCI build system 2015-01-08 16:26:20 +01:00
dropdown.htm luci-base: globally cleanup markup 2018-06-23 17:13:22 +02:00
dvalue.htm Rework LuCI build system 2015-01-08 16:26:20 +01:00
dynlist.htm luci-base: cbi: further refactoring 2016-02-10 18:11:49 +01:00
error.htm Globally convert headline anchors into name attributes. 2015-10-06 13:30:33 +02:00
filebrowser.htm luci-base: escape path strings and field parameter 2018-04-07 11:43:44 +02:00
firewall_zoneforwards.htm luci-base: globally cleanup markup 2018-06-23 17:13:22 +02:00
firewall_zonelist.htm treewide: switch firewall zone, network and iface lists to dropdown code 2018-06-08 08:19:20 +02:00
footer.htm luci-base: rework CBI footer template 2018-07-18 12:05:05 +02:00
full_valuefooter.htm luci-base: globally cleanup markup 2018-06-23 17:13:22 +02:00
full_valueheader.htm luci-base: refactor cbi dependency handling code 2016-01-18 17:05:36 +01:00
fvalue.htm luci-base: view: make checkboxes and radio buttons styleable 2016-03-03 22:06:39 +01:00
header.htm luci-base: fix placement of CBI strings 2018-07-09 17:04:10 +02:00
lvalue.htm luci-base: view: make checkboxes and radio buttons styleable 2016-03-03 22:06:39 +01:00
map.htm treewide: rework rollback/apply workflow 2018-07-27 14:07:23 +02:00
mvalue.htm luci-base: mvalue: fix column wrapping 2017-01-26 00:07:26 +01:00
network_ifacelist.htm luci-base: fix handling alias interfaces in ifacelist widget 2018-07-15 17:28:38 +02:00
network_netinfo.htm Rework LuCI build system 2015-01-08 16:26:20 +01:00
network_netlist.htm treewide: switch firewall zone, network and iface lists to dropdown code 2018-06-08 08:19:20 +02:00
nsection.htm luci-base: globally cleanup markup 2018-06-23 17:13:22 +02:00
nullsection.htm luci-base: globally cleanup markup 2018-06-23 17:13:22 +02:00
simpleform.htm luci-base: rework simpleform template 2018-07-18 12:05:05 +02:00
tabcontainer.htm Rework LuCI build system 2015-01-08 16:26:20 +01:00
tabmenu.htm luci-base: improve tab hide logic 2016-01-18 11:23:11 +01:00
tblsection.htm luci-base: fix bad CSS class names in table section template 2018-07-20 11:35:09 +02:00
tsection.htm luci-base: globally cleanup markup 2018-06-23 17:13:22 +02:00
tvalue.htm luci-base: cbi: refactor event handling js 2016-01-18 19:34:02 +01:00
ucisection.htm luci-base: strip superfluous space in additional field markup 2018-07-23 15:10:55 +02:00
upload.htm luci-base: globally cleanup markup 2018-06-23 17:13:22 +02:00
value.htm luci-base: rework reveal/hide CBI password template button 2018-07-23 14:30:03 +02:00
valuefooter.htm Rework LuCI build system 2015-01-08 16:26:20 +01:00
valueheader.htm Rework LuCI build system 2015-01-08 16:26:20 +01:00