Commit graph

14958 commits

Author SHA1 Message Date
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
d61c4486d5 luci-app-firewall: use firewall.getZoneColorStyle() in views
Use the new `firewall.getZoneColorStyle()` helper to apply background
color styles.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0b4b6380d0)
2022-02-16 00:37:37 +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
Jo-Philipp Wich
a7b0fe1af1 protocols: make APN option optional again
Fixes: #5284
Fixes: 1661ac6bf8 ("luci-proto-ncm: add APN and PIN validation")
Fixes: 114dc38dc2 ("luci-proto-qmi: add APN and PIN validation")
Fixes: 6a8ad40b05 ("luci-proto-3g: add APN and PIN validation")
Fixes: ebb676ef7b ("luci-proto-modemmanager: add APN and PIN validation")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 5ff3ef7cbb)
2022-02-16 00:34:28 +01:00
Nicholas Smith
ebfdbce797 luci-proto-ncm: add APN and PIN validation
Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
[squash commits, fix whitespace]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1661ac6bf8)
2022-02-16 00:34:16 +01:00
Nicholas Smith
f8ea3df634 luci-proto-qmi: add APN and PIN validation
Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
[squash commits, fix whitespace]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 114dc38dc2)
2022-02-16 00:34:16 +01:00
Nicholas Smith
9a802398f1 luci-proto-3g: add APN and PIN validation
Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
[squash commits, fix whitespace]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 6a8ad40b05)
2022-02-16 00:34:16 +01:00
Nicholas Smith
badce00804 luci-proto-modemmanager: add APN and PIN validation
Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
[squash commits, fix white space]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ebb676ef7b)
2022-02-16 00:34:16 +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
Hannu Nyman
df07e6b833 luci-app-uhttpd: support 'organization' option
Support the organization option, added in 2020.
Mention in help text that a random/unique value is used in
certificate generation if the organization option is empty.

Re-order the certificate items to logical order.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit e3fbfe9909)
2022-01-29 17:06:15 +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
Jo-Philipp Wich
e927a11d4e luci-app-openvpn: fix stray uci permission warning
The OpenVPN file view uses a dummy Map() instance to render the breadcrumb
template which triggers a uci permission error since the view is being
rendered by a form() action which does not set up the expected permission
flags. CBI Map() instances should only be used for cbi() dispatch targets.

Solve the issue by appending the breadcrumb template directly to the
SimpleForm() instance and by removing the redundant dummy Map() instance.

Fixes: #4370
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 18b1130711)
2022-01-25 22:44:58 +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
Stan Grishin
0818d835ca
Merge pull request #5620 from stangri/openwrt-21.02
[21.02] luci-app-https-dns-proxy: add AhaDNS and minor fixes
2021-12-28 14:44:34 -08:00
Stan Grishin
af67bd9ace luci-app-https-dns-proxy: add AhaDNS and minor fixes
* Add AhaDNS: thanks to @Jefe777 (account now deleted) and their PR at
  https://github.com/openwrt/luci/pull/5612
* Update email addresses
* Add missing new line to ControlD files
* Add RPCD reload to uci-defaults file

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit da3bb1e80b)
2021-12-28 22:42:57 +00: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
Claudio Mezzasalma
b5a40b3a98 luci-app-ddns: Fix Domain Tooltip in ddns form
Signed-off-by: Claudio Mezzasalma <claudio.mezzasalma@gmail.com>
(cherry picked from commit 6d782d2bd2)
2021-12-15 10:15:42 +01: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
Hannu Nyman
2e5b2abe97 luci-app-statistics: re-order CPU utilization graph classes
Reorder the CPU utilization classes to be in a more logical order
(from hardware toward user) instead of alphabetical order.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit f4dd8b6413)
2021-12-04 21:24:48 +02:00
Jo-Philipp Wich
285c5899ce luci-app-transmission: make menu node depend on corresponding ACL
Fixes: #5577
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2ef810062b)
2021-12-04 00:23:10 +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 be8d749599)
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 d19d717de2)
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 5f98f8cac4)
2021-12-01 23:20:27 +01:00
Hannu Nyman
d63d9c54f5 luci-app-statistics: increase default amount of data items in RRD
Increase the default number of data items in the RRD database
from 144 to 288. This leads to smaller summarising/averaging periods,
visible especially in the day & week graphs. The averaging intervals
will be: 30s, 5min, 35min, 2h35min, 1d6h30min

(Note: this change only applies in a live router if the RRD database is
empty. E.g after reboot or after emptying the RRD database dir.)

Reference to discussion at #4065

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit c21c6668ed)
2021-11-28 20:26:30 +02: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 e982c05671)
2021-11-23 19:12:41 +01:00
Stan Grishin
f3611f1973
Merge pull request #5534 from stangri/openwrt-21.02
[21.02] luci-app-https-dns-proxy: Add HE.net DNS
2021-11-20 12:26:31 -08:00
Paul Dee
21ac6be5ac luci-app-https-dns-proxy: Add HE.net DNS
Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com>
(cherry picked from commit a25d56c28d)
2021-11-20 20:25:11 +00:00
Josef Schlehofer
b9a31683bd luci-app-rosy-file-server: drop
This package was marked as broken [1], so it's time to remove it.
As package rosy-file-server will be dropped soon [2].

Reasons:
1. it's broken (and package requires LuCI, which was marked as broken,
   thus it is useless)
2. maintainer is inactive
3. maintainer's company does not seem to work.

[1] 34b682afac
[2] https://github.com/openwrt/packages/pull/17031

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit ec5e336e55)
2021-11-20 16:43:34 +02: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
6d2dde4835 translation: add Danish to luci.mk
Define Dansk/Danish language in luci.mk.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 887d8a8fd0)
2021-11-20 10:22:39 +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
Jo-Philipp Wich
0cee46bc63 luci-theme-bootstrap: don't overwrite theme selection upon install
Revert to the previous uci-defaults behaviour of only setting the
selected theme to Bootstrap if the Bootstrap entry didn't exist yet
in the configuration.

Ref: https://forum.openwrt.org/t/luci-theme-behaviour-change/112047
Fixes: ed86f03a9f ("luci-theme-bootstrap: add explicit dark/light mode selection")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0bc09cc749)
2021-11-16 13:20:46 +01: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 d4092b15ce)
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