Commit graph

14978 commits

Author SHA1 Message Date
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
161880046f luci-app-firewall: CBIProtocolSelect: properly handle unrecognized protos
Prevent incorrectly replacing unrecognized protocol numbers with -1.

Fixes: #5587
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4381816315)
2022-02-16 00:52:03 +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
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 6a60d2434e)
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 c81b09ec3d)
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 1a9afa2a90)
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 e0888d70a9)
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 b11a7d8e49)
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 4720a025e8)
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 6f4708ca68)
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 7f26e86a9f)
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 00dc07bb84)
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 5bd111f58f)
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 8055acc9be)
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 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
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