Commit graph

3702 commits

Author SHA1 Message Date
Hannu Nyman
ebcfdda51a timezone data: update to 2022e
Update timezone data to 2022e.
* http://mm.icann.org/pipermail/tz-announce/2022-September/000073.html
* http://mm.icann.org/pipermail/tz-announce/2022-October/000074.html

 - Palestine transitions are now Saturdays at 02:00.
 - Simplify three Ukraine zones into one.
 - Jordan and Syria switch from +02/+03 with DST to year-round +03.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 10d762eab7)
2022-10-24 19:04:20 +03:00
Viktor Tsvetkov
afd0012939 sysauth: add autocomplete and id attributes to login inputs
this let browser automatically fill according to HTML spec for input elements.
luci-theme-bootstrap and luci-base are affected.

Signed-off-by: Viktor Tsvetkov <zwetvik@gmail.com>
[indentation fix]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3e9d9a9dbb)
2022-10-15 14:32:35 +02:00
Hannu Nyman
3923199f8e treewide: Backport and sync translations
Backport from master, sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-10-04 23:05:34 +03:00
Jo-Philipp Wich
30ba277989 luci-mod-system: sshkeys.js: prevent XSS through pubkey comments
Ensure to not display public key comments verbatim in order to prevent
injection of markup.

Reported-by: Eric McDonald <ericmcdonald@protonmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 944b55738e)
2022-09-21 14:49:49 +02:00
Hannu Nyman
63bfee6c8d timezone data: update to 2022c
Update timezone data to 2022c.

http://mm.icann.org/pipermail/tz-announce/2022-August/000071.html
http://mm.icann.org/pipermail/tz-announce/2022-August/000072.html
* Iran no longer observes DST after 2022.
* Rename Europe/Kiev to Europe/Kyiv.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 10bcb228a7)
2022-09-03 00:32:55 +03:00
Hannu Nyman
77c916e54b luci-mod-network: Offer ft-over-air by default for 802.11r
OpenWrt commit 2984a0420 (cb650143 for 21.02) changed the default 802.11r
Fast Transition method to be ft-over-air instead of ft-over-ds.

Offer ft-over-air as the first item in the drop-down list, so that
it gets selected by default when 802.11r option is enabled.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 2c3c7f5c50)
2022-09-01 18:15:18 +03:00
Hannu Nyman
bdaec14361 treewide: Backport translations - i18n
Backport from master, sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-08-28 19:14:32 +03:00
Florian Eckert
cb08713227
Merge pull request #5751 from MaxSKash/21.02-DHCP-lease-table
[21.02]luci-mod-status,mod-network: Added fqdn-name to DHCPv4 lease table
2022-08-10 07:20:58 +02:00
Jo-Philipp Wich
87836cadba luci-base: sys.lua: make timeout optional when parsing conntrack entries
Fixes: #5909
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit abd9125fbf)
2022-08-01 11:59:24 +02:00
Hannu Nyman
c6d28851d7 treewide: Backport translations - sync
Backport from master, sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-07-28 20:19:40 +03:00
Hannu Nyman
cbf33ce913 treewide: backport and sync translations
Backport translations from master.
(also remove erroneous English translations)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-07-03 13:40:37 +03:00
Jo-Philipp Wich
ee8170b63b luci-base: network.js: consider uci config for Device.getType()/getParent()
For network devices declared in uci but not yet created by netifd, the
runtime status information will be unavailable, causing methods such as
`getType()` to assume plain ethernet interfaces and `getParent()` to fail
resolving parent devices.

Fall back to infer the information from uci configuration settings in such
cases to give accurate type hints to callers.

In particular, this prevents LuCI from turning wireless target networks
containing a to-be-created bridge device into bridges themselves.

Fixes: https://github.com/openwrt/packages/issues/18768
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 8effea58d7)
2022-06-16 09:53:31 +02:00
Hannu Nyman
a037a14b7a treewide: Backport and sync translations
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-06-12 19:54:57 +03:00
Hannu Nyman
7387ec8e18 treewide: Backport translations and sync
Backport from master, sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-05-15 20:15:29 +03:00
Alexey Dobrovolsky
21f99bde2b luci-mod-system: add interface selection for NTPD
UCI option `interface` for sysntpd server was introduced in
OpenWrt commit 4da60500ebd2. NTP server binds to the specified interface,
or if unspecified, to all.

This patch adds selection widget to LuCI.

Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>
(cherry picked from commit 24ac5a2bf6)
2022-05-10 03:10:35 +03:00
Jo-Philipp Wich
a993714790 luci-base: sys.lua: fix parsing conntrack entries without timeout
Flow offloaded conntrack entries carry no timeout value and trip up the
record parsing routine. Adjust the code to properly deal with such entries.

Ref: https://forum.openwrt.org/t/offloading-breaks-connections-list/126423
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 531c0ecff2)
2022-04-29 12:18:46 +02:00
Hannu Nyman
fe09ab9902 treewide: Backport translations and sync
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-04-09 19:18:33 +03:00
Max S Kash
d4f0b06a47
luci-mod-status,mod-network: Added fqdn-name to DHCPv4 lease table
Added code to display fcdn-name in DHCPv4 lease table.
(based on code in DHCPv6 lease table)

Signed-off-by: Max S Kash <asukms@ya.ru>
Indentation adjused and wrapped commit message
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-03-31 00:26:59 +05:00
Hannu Nyman
f4a5b6c435 treewide: Backport translations
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-03-26 08:52:33 +02:00
Hannu Nyman
0a0ce2ae6e timezone data: update to 2022a
Update timezone data to 2022a.

http://mm.icann.org/pipermail/tz-announce/2022-March/000070.html
* Palestine will spring forward on 2022-03-27, not 2022-03-26.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 15bbe6979b)
2022-03-24 21:12:18 +02:00
Hannu Nyman
9be6f29162 treewide: Backport and sync translations - i18n
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-03-13 18:20:22 +02:00
Jo-Philipp Wich
31a27f3087 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>
(cherry picked from commit 5663fd596b)
2022-02-21 15:06:41 +01:00
Jo-Philipp Wich
9d5786026f treewide: resync and merge master translations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-02-16 00:58:01 +01:00
Jo-Philipp Wich
59c3392946 luci-app-firewall: fix setting unspecified zone on forwardings
Fixes: #5685
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 21784446c1)
2022-02-16 00:52:37 +01:00
Jo-Philipp Wich
2be076e5b1 luci-base: ui.js: avoid error tooltips overlapping dropdowns
Fixes: #5588
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 604c009059)
2022-02-16 00:51:11 +01:00
Paul Dee
0ac2542085 luci-mod-status: Add Target Platform (e.g. ath79/ipq806x/etc)
revealed under:
ubus call system board
board.release.target

Useful reminder for what to download

Signed-off-by: Paul Dee <systemcrash@users.noreply.github.com>
(cherry picked from commit 2890d1842a)
2022-02-16 00:49:44 +01:00
Helge Mader
f08a0f6b8f luci-base: prevent empty field for adding new entry
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 58447640eb)
2022-02-16 00:49:04 +01:00
Paul Spooren
274df9df00 luci-base: fix request timeout docstring
The `timeout` is defined in milliseconds, not seconds.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 292e198884)
2022-02-16 00:49:04 +01:00
Jo-Philipp Wich
92329dcd46 luci-mod-status: fix raw ipt counter buton style
Fixes: #4928
Fixes: b39b7fc0d2 ("luci-mod-status: allow displaying raw iptables counter values")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1dc16d9d3f)
2022-02-16 00:47:54 +01:00
Jo-Philipp Wich
dcd61d74dc luci-mod-status: allow displaying raw iptables counter values
Fixes: #4852
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b39b7fc0d2)
2022-02-16 00:47:42 +01:00
Jo-Philipp Wich
9775b6ab24 luci-base: apply Browser/OS dark mode preference to index redirect page
Turn white body, black link into black body, white link if the Browser/OS
indicates dark mode preference.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 50af81193c)
2022-02-16 00:37:58 +01:00
Jo-Philipp Wich
d79b81b852 luci-base: luci.js: fix undefined variable access in Request.request()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit de4c4f7fd4)
2022-02-16 00:37:54 +01:00
Jo-Philipp Wich
dd54dcef26 luci-mod-network: use firewall.getZoneColorStyle() in interface view
Use the new `firewall.getZoneColorStyle()` helper to apply background
zone color styles to the interface boxes.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 849772df96)
2022-02-16 00:37:41 +01:00
Jo-Philipp Wich
4aa1c79138 luci-base: widget.js: use firewall.getZoneColorStyle() in zone widgets
Use the new `firewall.getZoneColorStyle()` helper to apply background
color styles.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a812b26cb8)
2022-02-16 00:37:33 +01:00
Jo-Philipp Wich
a6bad6d9f8 luci-base: firewall.js: add getZoneColorStyle() helper
The getZoneColorStyle() function will produce CSS style properties that
describe the color value of the zone. The color declaration is divided
into a CSS variable called `--zone-color-rgb` which holds the RGB value
of the color and a `background-color` property assigning these values
as background property.

This allows themes to override the color with derived values, e.g. by
applying an alpha channel.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d775279dbd)
2022-02-16 00:37:24 +01:00
Jo-Philipp Wich
5a092b3ad2 luci-base: add legacy directory, file and device validator JS stubs
Fixes: #5466
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ad360ec00a)
2022-02-16 00:36:34 +01:00
Jo-Philipp Wich
d1255a5f5e luci-mod-status: disable DSL status if not present
Fixes: #5465
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0ad54e4a7c)
2022-02-16 00:36:09 +01:00
Jo-Philipp Wich
c051cfc4e8 luci-base: add "dsl" system feature
Allows LuCI views to probe DSL presence using `L.hasSystemFeature('dsl')`.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d513f1461f)
2022-02-16 00:36:05 +01:00
Vladislav Grigoryev
39fae47e3d luci-mod-network: support network.interface.sourcefilter
Allow to modify the sourcefilter option in the network.interface config.
This is required for custom policy routing with IPv6 MWAN and/or NAT6.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
(cherry picked from commit 22296fb072)
2022-02-16 00:35:10 +01:00
Hannu Nyman
b55a1dc155 treewide: Backport i18n translations
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-02-13 12:21:17 +02:00
Hannu Nyman
b620cca41a treewide: Backport translations
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-02-05 12:15:28 +02:00
Jo-Philipp Wich
4ec18ec765 luci-base: explicitly invoke busybox applet for password change
Ensure to invoke the Busybox `passwd` applet to change the system password
in a non-interactive manner. Non-Busybox variants may not take the new
password input from stdin or use password hashes which are not supported
by musl's `crypt()` implementation by default.

Fixes: #5629
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 22e2bfb096)
2022-01-25 22:59:37 +01:00
Hannu Nyman
f1a6523817 treewide: sync translations i18n, backport
Backport translations from master and sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-01-23 12:30:17 +02:00
Jo-Philipp Wich
2360ebc2e8 luci-base: sys: prevent path traversal via sys.init routines
Filter the init script name parameter through fs.basename() to avoid
invoking paths outside of /etc/init.d/.

Reported-by: Graham R <gr348@cam.ac.uk>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 8752701b0d)
2022-01-19 16:34:07 +01:00
Jo-Philipp Wich
7a37d02882 luci-mod-system: mention ED25519 keys
Also update translations source strings accordingly.

Fixes: #5649
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e0ff3ff933)
2022-01-19 12:12:01 +01:00
Jo-Philipp Wich
dd9390c81f luci-mod-network: fix reading back rpfilter configuration value
Fixes: #5635
Fixes: faad7464a8 ("luci-mod-network: add support for network.device sections")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0ef82b3c58)
2022-01-07 19:20:44 +01:00
Hannu Nyman
fc3aa657c4 treewide: Backport translations - i18n
Sync translations and backport from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-12-31 12:54:33 +02:00
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 63d9bcb682)
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 993151504e)
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