14974 Commits

Author SHA1 Message Date
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
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 1dc16d9d3ffeee30d072c569e9a3c693d303e9fc)
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 b39b7fc0d2882e19e9d6a1d9ab1ef57c10ec5db5)
2022-02-16 00:47:42 +01:00
Jo-Philipp Wich
41f18098bb luci-theme-bootstrap: fix translation for username and password captions
Fixes: c81b09ec3d ("luci-theme-bootstrap: simplify login dialog")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 6a60d2434e92b422d9eb47ca2282a8bafdbbba35)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
40051f0302 luci-theme-bootstrap: simplify login dialog
Use an traditional HTML form with post submit action to the same URL in
order to simplify the login process and not rely on the discarded login
XHR reply properly setting the login cookie.

This will also avoid one useless request on login and hopefully fix login
issues reported with various browser environments.

As a bonus, the resulting code is somewhat smaller as well.

Ref: https://forum.openwrt.org/t/login-does-not-work/113360
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c81b09ec3d83542b9d4be6297c45d0e66896265e)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
1390f78fad luci-theme-bootstrap: add bottom margin to log views
Prevent the log output textareas to touch the footer border.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1a9afa2a90e823b0fbd0fc0ca3f64d7ed5f8aedb)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
2cc139ce6a luci-theme-bootstrap: prevent hiding header bar on long vertical scrolls
Ref: b11a7d8e49 (commitcomment-60968071)
Fixes: 8055acc9be ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e0888d70a92a832a9e720d3ba903341e4b03c252)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
18cc1c79d7 luci-theme-bootstrap: various style corrections
- Add proper top and bottom margin for tab descriptions
 - Allow flex wrapping for cbi-value rows
 - Ensure that nested table/grid sections always take the full width
 - Make table/grid section row action buttons are as narrow as possible

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b11a7d8e4940a3f68b93c5d93f16c900c9371bc2)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
119cfee890 luci-theme-bootstrap: fix cbi-value caption alignment
Since the removal of the clearfix styles, overlong captions will displace
subsequent input field rows.

Fix the issue by replace floating label + field margin with flexbox styles.

Fixes: #5535
Fixes: 8055acc9be ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4720a025e8ab5a28541f7d066fb9b2f35ddb2cb1)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
071a3b0d12 luci-theme-bootstrap: fix inner border radius in ifaceboxes, progressbars
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 6f4708ca68bb02c9d4d76d3cd1f130d62558f5f1)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
f1e5639df1 luci-theme-bootstrap: hide scrollbars in modal overlay
Only enable scrollbars if content overflows.

Fixes: #5505
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 7f26e86a9f840eb1b9ef11831fa8f6c9eeade079)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
c1745bdb85 luci-theme-bootstrap: further uci changelog style fixes
- Use the proper dialog class name to apply changelog styles
 - Darken grey background and borders

Fixes: 5bd111f58f ("luci-theme-bootstrap: fix uci changelog and readonly input styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 00dc07bb84f0bc1cc8d27c8f95e533aca07501d4)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
7884d8ac01 luci-theme-bootstrap: fix uci changelog and readonly input styles
- Rework uci changelog styling rules to work with unmodified markup
 - Drop redundant readonly input styles, don't fade readonly input texts

Fixes: 8055acc9be ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 5bd111f58faee1a2eeaa28845f7df4b727c13d99)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
883834c3dd luci-theme-bootstrap: overhaul styles
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 8055acc9be89f0bed31b6692ad08e6196611d478)
2022-02-16 00:42: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 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
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 849772df96784a0d5480ddf6305e30e7d442740f)
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 0b4b6380d0698954c2f45e301cf653810b861a87)
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 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
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 0ad54e4a7ca8f9b526442954b12a6b04e5c7403c)
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 d513f1461fae9cc67425c38e6ca6711932d12d38)
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 22296fb07276159f6d1dae719f32920ad52d5873)
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 5ff3ef7cbb9719d3476feb836cac86ee421f666d)
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 1661ac6bf888e4563546cc63fe0e228af8889bf0)
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 114dc38dc2ce82a9f32fdc16adaa6f435ee36881)
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 6a8ad40b057e6a7f0d3343ec06dbe487b352fe47)
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 ebb676ef7b03a7fed4062931be147d43d3855b64)
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 e3fbfe99094cc27ea7ad551fea193bc67c201ef0)
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 22e2bfb09667e167a93b5eca4487ac41669126d9)
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 18b1130711b6ff7aacba98034e2bd7f4893b33df)
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 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
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 0ef82b3c581fca05521637421cfc4b516d9099a2)
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 da3bb1e80bc98f90d1128f332fc5ceecc20bf6d5)
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 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
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 6d782d2bd2fadfc0968540f0c78f05db53334513)
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 f4dd8b6413cfd8f2f9093993b6ef396ca3dcef01)
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 2ef810062b67605f86f28eb608885b64c88a127d)
2021-12-04 00:23:10 +01:00