1832 Commits

Author SHA1 Message Date
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 8effea58d7281fd4f2b6c31d534195dba27a850b)
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
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 531c0ecff2ca57c4bc0aacee66a0746814fefc78)
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
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 15bbe6979bade530171420721ee8d99b3a1eacd9)
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 5663fd596b567d53587fcc4052df3095520c08a7)
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 21784446c1d0e1e9b2433727986e04a7e7ff86e5)
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 604c00905987cf38336754aef408d837b368a8e5)
2022-02-16 00:51:11 +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 58447640eb4704ce5bed612f84cb86b84afa17fa)
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 292e19888448599f5169cc158b00071e020e9c27)
2022-02-16 00:49:04 +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 50af81193c3ae78b23a4573f3fb69136462a883b)
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 de4c4f7fd445e7a59691e50edead472900270e59)
2022-02-16 00:37:54 +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 a812b26cb8cde56c8083349f665d762ae6a1826a)
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 d775279dbd0da284af7f74b31b5d3b0eddcf80bc)
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 ad360ec00a3667d530fa1a911ac19515b132d588)
2022-02-16 00:36:34 +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 d513f1461fae9cc67425c38e6ca6711932d12d38)
2022-02-16 00:36:05 +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 22e2bfb09667e167a93b5eca4487ac41669126d9)
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 8752701b0d01a81d0bd0a735be733f24ad11ab69)
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 e0ff3ff933e39597cf4a158d237c7eebb359e1bd)
2022-01-19 12:12:01 +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 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
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
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
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
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
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