3655 Commits

Author SHA1 Message Date
Jo-Philipp Wich
b3cd473517 luci.js: remove unsafe fallback code from dom.parse()
Do not fallback to .innerHTML if DOMParser() failed for whatever reason.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 63d9bcb6825fac92fd7dfa4ba858c8d5aafa23e8)
2021-12-23 17:10:18 +01:00
Jo-Philipp Wich
db88156dff luci-base: form.js: do not execute embedded script code in stripTags()
Instead of relying on .innerHTML which executes embedded script code to
parse a given HTML fragment, use dom.parse() which utilizies DOMParser()
internally in order to extract textContent in a safe manner.

Fixes: FS#4199
Ref: https://bugs.openwrt.org/index.php?do=details&task_id=4199
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 993151504e8e810c083d3257555bdcdc2f00673a)
2021-12-23 17:10:18 +01:00
Hannu Nyman
eaad9d920b treewide: i18n - backport translations
Backport translations from master. Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-12-18 09:59:57 +02:00
Hannu Nyman
06a2913d1d treewide: Backport translations from master - i18n
Backport and sync translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-12-10 19:15:18 +02:00
Florian Eckert
61cc3b1c99
Merge pull request #5576 from BKPepe/login-syslog
[21.02] luci-base: send failed/successfull login to syslog
2021-12-06 14:36:12 +01:00
Jan Pavlinec
ae0c92af2a
luci-base: send failed/successfull login to syslog
Note: This change is relevant for systems that don't
use uhttpd for LuCI.
This log can be later used for fail2ban etc.

Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
(cherry picked from commit be8d749599a11229435141d85cfe5eba2dcf96d2)
2021-12-03 23:27:39 +01:00
Jo-Philipp Wich
5091496ea3 luci-mod-network: fix loading ra_mtu and ra_hoplimit options
Fixes: #5565
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d19d717de241fccb655cb9651f3b10e998dd62c3)
2021-12-01 23:20:27 +01:00
Jo-Philipp Wich
ecc3c03e25 luci-mod-network: allow IPv6 dns, dns_service and domain for RA only mode
Fixes: #5564
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 5f98f8cac4ebf7d952d71d44f6a2791c769ab907)
2021-12-01 23:20:27 +01:00
Hannu Nyman
deeb842434 treewide: i18n backport translations
Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-11-27 09:24:05 +02:00
Jo-Philipp Wich
7f37a5840b luci-base: cbi.js: properly handle falsy values in cbi_update_table()
Fixes: #5544
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e982c05671229b3d13622b38c9536812e8c5f05c)
2021-11-23 19:12:41 +01:00
Hannu Nyman
ca98f879c8 treewide: backport Danish translations
Backport Danish translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-11-20 11:28:12 +02:00
Hannu Nyman
f2d9c4039b treewide: Backport translations - i18n
Backport translations and sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-11-20 10:19:36 +02:00
Hannu Nyman
1965682047 treewide: Backport i18n translations
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-11-11 21:42:14 +02:00
Jo-Philipp Wich
e1ccb6621c luci-base: network.js: ignore wireless ifname patterns on retrieving devices
Only treat the given identifier as Linux netdev name if we can find a
corresponding entry in the device info cache and do not consider strings
starting with "wlan", "ath" or "wl" to be existing devices.

This fixes incorrectly adding wireless sections as ifnames to network
interfaces when the wifi-iface section name begins with one of the
`iface_patterns_wireless` patterns.

Fixes: #5069
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d4092b15ce92cda2d7711b57b2251ebebef32b5c)
2021-11-10 11:57:59 +01:00
Jo-Philipp Wich
47026f54ca luci-base: tools.widgets: adjust zone selector dropdown markup
No functional changes but required for styling rules.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 7fba52de91afc60a49345a75b805ff73f18f6f26)
2021-11-08 20:45:34 +01:00
Jo-Philipp Wich
388dae96c7 luci-mod-system: add missing require to none led trigger class
Also convert ES6 to ES5 syntax while we're at it.

Fixes: #5476
Fixes: 5b42cd5b46 ("luci-mod-system: move default option from defaul-on trigger to none trigger")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit fceabd74465f2aafc40edc084429f30837deff2c)
2021-11-01 21:42:47 +01:00
Hannu Nyman
f28aaa35cd timezone data: update to 2021e
Update timezone data to 2021e.

http://mm.icann.org/pipermail/tz-announce/2021-September/000066.html
* Jordan now starts DST on February's last Thursday.
* Samoa no longer observes DST.
* Rename Pacific/Enderbury to Pacific/Kanton.

http://mm.icann.org/pipermail/tz-announce/2021-October/000068.html
* Fiji will suspend observance of DST for the 2021/2022 season.

http://mm.icann.org/pipermail/tz-announce/2021-October/000069.html
* Palestine will fall back 10-29 (not 10-30)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 0740023a3c44ebfb47126b8c9bb4e9a20985aa55)
2021-10-28 21:29:56 +03:00
Florian Eckert
7a677b1fde luci-mod-system: move default option from defaul-on trigger to none trigger
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 5b42cd5b46c32bf168b7156602bfa0ba841904a1)
2021-10-28 15:49:39 +02:00
Hannu Nyman
5624b5c2e4 treewide: i18n - Backport translations
Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-10-26 18:09:56 +03:00
Jo-Philipp Wich
13df80d429 luci-base: remove further related section types on deleting network
When removing a `config interface` section in `/etc/config/network`, drop
related `rule` and `rule6` sections too, as well as related `dhcp` sections
in `/etc/config/dhcp`.

Ref: https://forum.openwrt.org/t/grooming-etc-config/109764/7
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 63034c36073bedf87db18d05d3fe8cca016c6490)
2021-10-22 20:37:34 +02:00
Jo-Philipp Wich
4d3de0e1bb luci-mod-network: remove related bridge-vlan sections on deleting device
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 216767f420a92468b865a5ef301a1e94283dcb0e)
2021-10-22 20:37:28 +02:00
Paul Dee
4c87f02cc0 luci-mod-network: spelling / grammar
"Setup" is a noun, the thing. "Set up" is a verbal idiom, the action.

One cannot setup a DHCP server, just as one cannot fuckup a test, or
ripup some paper. One can, however, set a DHCP server up, and one can
fuck a test up, and rip some paper up.

Signed-off-by: Paul Dee <systemcrash@users.noreply.github.com>
(cherry picked from commit c0299e2c3d09c48b515447b2c6fefd00ffd2950b)
2021-10-22 20:36:55 +02:00
Jo-Philipp Wich
32fc8941b8 luci-base: cbi.js: use IEC 80000-13 units to format base 2 byte values
Fixes: #5354
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0a31efc858b02cd5aa9f38c1b5b40a9a14a61c1a)
2021-10-22 20:36:47 +02:00
Rosen Penev
8acd0d76c4 fix wrong ed25519 information
ECDH is not used for the ed25519. The scheme is called EdDSA.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 738f36a1c31eda6d322e18c1b7fca4b6498e46a9)
2021-10-22 20:35:03 +02:00
Fritz D. Ansel
5155364eab network: hide dnamsq (dhcp+dns) item
.. when no dnsmasq is installed, as it
tells only that there are no settings available

Signed-off-by: Fritz D. Ansel <fdansel@yandex.ru>
(cherry picked from commit 2393289367bb3c4e366ee36cc66af9149687139b)
2021-10-22 20:33:12 +02:00
Fritz D. Ansel
853a128c31 status: make buffered conditional
when buffered could not be read, there is
just a questionmark (on e8450 non-ubi)

Signed-off-by: Fritz D. Ansel <fdansel@yandex.ru>
(cherry picked from commit 61425793a78ea60b564f9767b60b001da0e4cc96)
2021-10-22 20:32:59 +02:00
Fritz D. Ansel
71181af8ed system: more text lines for crontab
10 lines are very few and there is much unused space

Signed-off-by: Fritz D. Ansel <fdansel@yandex.ru>
(cherry picked from commit 8fb2d82f703743d3432fc26f5d2cb14895bf57f7)
2021-10-22 20:32:52 +02:00
Jo-Philipp Wich
d744c54220 luci-mod-network: allow sorting static leases
Fixes: #5453
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f4f64b91ca4d443af9e7bc0dfc2565ae0a796ea3)
2021-10-19 23:14:22 +02:00
Jo-Philipp Wich
68815c88b0 luci-mod-system: fix time display logic
Use the system/info ubus call to obtain a TZ adjusted epoch value and
format the date time string manually instead of relying on the browsers
local representation.

Fixes: #5454
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 07569c5af23d74bad8b78905b25d7e85bd2d3141)
2021-10-19 23:11:16 +02:00
Hannu Nyman
790bb936f2 treewide: Backport and sync i18n translations
Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-10-19 22:22:39 +03:00
Jo-Philipp Wich
4fd8c836b3 luci-base: sysauth.htm: switch https detection URL
The `up.gif` icon is not present by default anymore, it has been moved to
luci-compat. Probe loading.gif instead which is guaranteed to be available
by default.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ea9b5e87e6ec3fbab52a02ab5f18bb51292bd249)
2021-10-12 23:05:22 +02:00
Jo-Philipp Wich
62d45da4a5 luci-base: dispatcher: fix null access on dispatching unknown urls
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4d28c390ab181636b101a17203b2db3391784687)
2021-10-12 23:05:16 +02:00
Jo-Philipp Wich
cfd0bdd206 luci-base: form.js: add drag-drop sorting support for mobile
Fixes: #5416
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit df75163e6842efc553ad8dcaedf06ea64570ed95)
2021-10-12 23:04:25 +02:00
Jo-Philipp Wich
48b829616e luci-mod-network: fix disabling 11w MFP for WPA3
Fixes: #5394
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0b49ed45c6e9f4bc10abdcea392125aec3794e58)
2021-10-12 23:04:02 +02:00
Ansuel Smith
06419e9a9c luci-mod-status: fix wrong logic for maclist adding feature
Currently any new entry added to the black/whitelist deletes the
others. Fix this and improve the rule apply by firstly disconnect
the wifi client.

Fixes: #5343

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit 085c4a08f5bf50919731304a962cfcd2b592d523)
2021-10-12 23:03:33 +02:00
Ansuel Smith
2fe3d0ab4a luci-mod-status: cosmetic fix for isWPSEnabled in wifi status
Drop isWPSEnabled table as it's really not needed and can directly
included in the network table.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit 2a97d5533cba419f51da0b550b00a34bc9f50cce)
2021-10-12 23:03:29 +02:00
Vladislav Grigoryev
9da9d65c35 luci-mod-network: fix option ip6table in network/interfaces
Fix the incorrectly displayed value for the option "ip6table".

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
(cherry picked from commit 3ebdf51f9b2e713cd655c0f97f2542c96736cae5)
2021-10-12 23:02:45 +02:00
Jo-Philipp Wich
5806ff0531 luci-base: fix off-by-one in cbi_update_table()
Fixes: #5189
Fixes: f919635310 ("luci-base: batch DOM updates to prevent slowdown")
Ref: f919635310 (commitcomment-53495580)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 7d9ab8d4a741cbc97e9553982e9e352b21ddf5f3)
2021-10-12 23:01:45 +02:00
Olli Asikainen
d7be4983cf luci-base: batch DOM updates to prevent slowdown
Signed-off-by: Olli Asikainen <olli.asikainen@gmail.com>
(cherry picked from commit f919635310286b3b905aedb716d707da1ea2c811)
2021-10-12 23:01:35 +02:00
Jo-Philipp Wich
0ac19f6a85 luci-mod-network: fix 60GHz radio frequency configuration
Fix incorrect minimum 60GHz frequency value and ensure that a 60GHz band
choice option is available once corresponding channels are found on the
system.

Ref: http://lists.openwrt.org/pipermail/openwrt-devel/2021-July/035810.html
Suggested-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e5626ece12236f6be9dbb6da6eb90fcbb469a1f0)
2021-10-12 23:01:29 +02:00
Jo-Philipp Wich
16e807edc9 luci-mod-network: dhcp.js: don't fail on not existing interface
Fixes: #5177
Fixes: 7e56289538 ("luci-mod-network: improve static DHCP lease validation")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f57d20bffffda026ab203d328a859a3f38c0c8d0)
2021-10-12 23:01:23 +02:00
Jo-Philipp Wich
8b02f53a37 luci-mod-network: fixes to DHCP lease validation
- validate current form value IP instead of stored uci one
 - ensure to not pass non-string values to the validator
 - remove leftover debug code
 - simplify obtaining formvalues

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9d15a4e70c10a43911c7f9d48240a01c23eb81b6)
2021-10-12 23:01:00 +02:00
Jo-Philipp Wich
e8b8a9be64 luci-mod-network: improve static DHCP lease validation
- Ensure that MAC addresses are unique within the same pool
 - Ensure that IP addresses are globally unique
 - Ensure that IP addresses are within any DHCP pool range

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 7e562895380d6bbe89ed88fe7576272c078f3b59)
2021-10-12 23:00:52 +02:00
Michael Pratt
f0ba6c8475 luci-mod-network: do not remove enable_vlan from config
There are many switch drivers where VLAN functionality is enabled by default.
In this situation, LuCI cannot be used to disable VLAN functionality,
because removing the line from configuration results in VLAN remaining enabled
by the driver.

When enable_vlan is set to 0 by default
by using functions in board.d,
and an unrelated change is made on the Switch webpage,
then the enable_vlan option gets deleted when changes are saved.

Therefore, the option needs to be preserved, whether set to 0 or 1.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
(cherry picked from commit 51ab737a4ba2b0f2a9d479cf114837c570f8d05c)
2021-10-12 23:00:10 +02:00
Hannu Nyman
e10e960b4d treewide: i18n - Backport translations
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-10-05 21:53:09 +03:00
Jo-Philipp Wich
b613f3a2ae luci-mod-network: fix name of network.device.isolate uci option
Fixes: #5383
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e0053fe79d7c2167298907b06f161795f9c38031)
2021-09-23 17:34:41 +02:00
Hannu Nyman
efb535e5c7 treewide: i18n - Sync, backport translations
Backport translations from master.
Sync translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-09-23 18:19:52 +03:00
Hannu Nyman
f24d61dd49 treewide: i18n - Backport translations
Backport translations from master.
Sync translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-09-09 18:01:47 +03:00
Vladislav Grigoryev
d9a228ec4a luci-mod-network: fix route6 source autocomplete
Fix the wrong value for the "source" option of the "route6" section.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
(cherry picked from commit 8b4015036d6f298cbfe0291ab8fdc23b4133cca7)
2021-08-31 09:00:35 +02:00
Hannu Nyman
3c115cddd4 treewide: i18n - Backport translations, sync.
Sync translations.
Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-08-25 20:22:45 +03:00