15562 Commits

Author SHA1 Message Date
Hannu Nyman
b13d8c7a33 luci-mod-network: Offer ft-over-air by default for 802.11r
OpenWrt commit 2984a0420 (0588b124e in 22.03) 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 2c3c7f5c50efd71bf87c068359cb0110a513186f)
2022-09-01 18:13:38 +03:00
Hannu Nyman
17fde96892 treewide: Backport translations - i18n
Backport from master, sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-08-28 19:04:48 +03:00
Jo-Philipp Wich
08fb38399f luci-base: use different cookie names for HTTP and HTTPS
Since HTTP cookies may not overwrite HTTPS ("secure") ones, users are
frequently unable to log into LuCI when a stale, "secure" `sysauth` cookie
is still present in the browser as it commonly happens after e.g. a
sysupgrade operation or when frequently jumping between HTTP and HTTPS
access.

Rework the dispatcher to set either a `sysauth_http` or `sysauth_https`
cookie, depending on the HTTPS state of the server connection and accept
both cookie names when verifying the session ID.

This allows users to log into a HTTP-only LuCI instance while a stale,
"secure" HTTPS cookie is still present.

Requires commit 2b0539ef9d ("lucihttp: update to latest Git HEAD") to
function properly.

Fixes: #5843
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e1932592c3e0804eec5d85fee989ceeed1e1050a)
2022-08-25 10:56:38 +02:00
Stan Grishin
6fceae5150
Merge pull request #5946 from stangri/openwrt-22.03-luci-app-simple-adblock-luci-app-simple-adblock
[22.03] luci-app-simple-adblock: update to 1.9.0-1
2022-08-24 03:52:37 +03:00
Stan Grishin
bdda1d12ec luci-app-simple-adblock: update to 1.9.0-1
* Support for (upcoming) dnsmasq nftset

Depends on https://github.com/openwrt/packages/pull/19212

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 9b71a35428e0ddbf0347c8ba62da2f4168ddb21b)
2022-08-24 00:28:52 +00:00
Dirk Brenken
7971fe0bd2
luci-app-travelmate: sync with travelmate 2.1.0
* expose new options to LuCI
* cosmetics

Signed-off-by: Dirk Brenken dev@brenken.org
Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit bcb046c488aad54b13ff20a93155ce3c0d0fd9af)
2022-08-20 22:02:27 +02:00
Stan Grishin
7b701aeea1
Merge pull request #5921 from stangri/openwrt-22.03-luci-app-advanced-reboot
[22.03] luci-app-advanced-reboot: Fix Linksys EA4500 descriptor file
2022-08-02 13:05:16 -06:00
Andy Bartolo
df624de481 luci-app-advanced-reboot: Fix Linksys EA4500 descriptor file
Signed-off-by: Andy Bartolo <andrew.bartolo@gmail.com>
(cherry picked from commit 5d7446e1be05baef6463c29dc00587e5952db9fc)
2022-08-02 18:55:24 +00:00
Jo-Philipp Wich
18e6040bb8 luci-proto-wireguard: handle multiple peers in imported configuration
When importing a fully configuration, import all peer entries from it
instead of non-deterministically merging all peer keys into one.

When importing a remote configuration as peer, only use the setting from
the peer section matching our local interface pubkey.

Also relabel the `Import peer configuration` button to
`Import configuration as peer` in order to be more explicit.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 94bfa33452ad7db683e9f47ea9921e92b5175558)
2022-08-01 13:06:41 +02:00
Jo-Philipp Wich
d09fbe0bbf 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 abd9125fbf5e2fadc0c5ae293496680df08e6e1b)
2022-08-01 11:59:09 +02:00
Jo-Philipp Wich
92dd6a7808 luci-proto-wireguard: configuration import improvements
- Reword texts in import dialogs for better clarity, use different
   descriptions for full import and peer import

 - Allow importing configurations without [Peer] section

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2ae74b909b4acf35b72142d913f9e61090febf6d)
2022-08-01 11:57:42 +02:00
Jo-Philipp Wich
bf5d9d4a0f luci-proto-wireguard: gracefully deal with missing uci configs
The /etc/config/ddns in particular might not be present on the system,
don't fail if it is absent.

Fixes: #5838
Fixes: 9ba20645b0 ("luci-proto-wireguard: rewrite protocol handler")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 340183786e5441197141efaf7d8cf0e682047bfe)
2022-08-01 11:57:42 +02:00
Jo-Philipp Wich
ae2b636612 luci-proto-wireguard: grant uci read access to system and ddns config
The configuration export requires access to /e/c/system and /e/c/ddns for
external hostname hints.

Fixes: #5838
Fixes: 9ba20645b0 ("luci-proto-wireguard: rewrite protocol handler")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4769bf11aa5d33cda4785faec8046c67cb51a606)
2022-08-01 11:57:42 +02:00
Jo-Philipp Wich
de6638b794 luci-proto-wireguard: rewrite protocol handler
This commit rewrites large chunks of the WireGuard protocol handler in order
to simplify the process of importing and exporting configuration. The major
changes are:

1) The wireguard interface configuration tab (General Settings) gained an
   import assistant which allows dragging or pasting a native WireGuard
   configuration file in order to import required settrings into uci

2) The peer configuration tab gained a similar import assistant which allows
   importing the settings for a WireGuard peer from an existing native
   WireGuard configuration file

3) The QR code export feature has been rewritten to make the resulting codes
   actually useful for importing into a WireGuard client application.
   Additionally the plaintext native WireGuard configuration is displayed
   to allow copy-pasting it for use on a Linux or OS X system

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9ba20645b01aacb391ab8c69f57b3da60db8f630)
2022-08-01 11:57:42 +02:00
Lukas Voegl
c1ab5148cc luci-proto-wireguard: add generate psk button
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
(cherry picked from commit b6925a12277224b4a02dc1febb58de8d4d6fdbe0)
2022-08-01 11:57:42 +02:00
Jo-Philipp Wich
ee5a7c6fc5 luci-base: form.js: save parent map on opening nested modal map
Before opening (rendering) a nested modal map, make sure to save the parent
modal map in order to persist any structural uci changes, such as newly added
anonymous sections to prevent the nested map from operating on stale values
or ephemeral config section IDs.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3be479446bdeaf446468c5e7ac3b9bc49da023da)
2022-08-01 11:57:42 +02:00
Jo-Philipp Wich
156009aae3 luci-base: form.js: handle SectionValue objects in GridSection modals
The existing logic for cloning section options into the modal form section
container did not properly handle SectionValue objects. Introduce a new
`cloneOptions()` helper to recursively traverse and properly clowning
such nested sections.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f24606b1ffd59cc82c7251243a18f4cfdc4f78d5)
2022-08-01 11:57:42 +02:00
Jo-Philipp Wich
9780bc0152 luci-base: form.js: reset parent maps on returning from nested section modal
The nested section modal might have changed values also covered/displayed by
the parent map, so ensure to reload all parent maps in the current modal
view stack to ensure that no stale values are shown on return.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0c81e25faa9ff9cb6edec477d56145d70be87cf3)
2022-08-01 11:57:42 +02:00
Jo-Philipp Wich
b556cdf93e luci-base: form.js: rework stacked modal CBI map logic
Only stack a new modal CBI map on top of the currently displayed modal one
if the related map or section differs. This prevents misbehavior when
switching the protocol of interfaces.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f2fa59e89af3d4bdae9b12471184425b307ad5d6)
2022-08-01 11:57:42 +02:00
Paul Spooren
69231a7d62 luci-app-attendedsysupgrade: s/res/response/
The variable was party called `res` or `response`, always call it
`response` from now on. This also solves a typo where
`data.request_hash` is never set to a correct value.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit af23d0dfc3176511ada5fb3d081f1b0a287a11bc)
2022-07-29 17:02:33 +02:00
Paul Spooren
ce09206d62 luci-app-attendedsysupgrade: request filesystem
It is possible to request a specific filesystem so no other filesystems
are used. This speeds up the build process and may prevent failures in
edge cases.

A recent edge case is installing more packages than ext4 can handle
while squashfs works fine due to compression.

Since  `rootfs_type` is now always available via `procd`, remove the
hack of reading `/proc/mounts`.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 8936e3c386e77c2dc090dbbd5a87907196f9149b)
2022-07-29 17:01:44 +02:00
Paul Spooren
aeeac6d0c5 luci-app-attendedsysugprade: allow to reinstall image
Now it's possible to re-install the currently running version in
advanced mode. This can be useful when installing packages via `opkg`
and then requesting the firmware with the packages stored in squashfs.

FIXES: https://github.com/openwrt/luci/issues/5809

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit fd72e1c23ef1569fd8f8ab71bdcb4a94f802435a)
2022-07-29 16:51:49 +02:00
Paul Spooren
d0828b3672 luci-app-attendedsysupgrade: report used client version
This allows the backend to track popular app versions and drop support for
unsed version in case of API changes.

Specifically the app sends a version string in the format "luci/GIT_HASH" to
the backend.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit f368faf6789a43c2e1a26b721f8115473672eb29)
2022-07-29 16:50:37 +02:00
John Kohl
010119fb5a luci-app-watchcat: add support for run_script mode
Signed-off-by: John Kohl <jtk.git@bostonpog.org>
(cherry picked from commit ae5677b8c24b7be5cbca5dbef00178b88a1161ac)
2022-07-29 08:18:19 +02:00
John Kohl
adeb2baa3a luci-app-watchcat: add support for IP family selection
Signed-off-by: John Kohl <jtk.git@bostonpog.org>
(cherry picked from commit 20fdd8dd9d0c90c9fb157c6314d6ae32e7f4d39c)
2022-07-29 08:18:06 +02:00
Hannu Nyman
3dd66c443a treewide: Backport translations - sync
Backport from master and sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-07-28 20:15:05 +03:00
Jo-Philipp Wich
9a18337350 luci-base: form.js: allow overriding section placeholder of TableSections
The existing implementation was hardcoding the empty TableSection placeholder
instead of invoking `renderSectionPlaceholder()` which might be overridden by
various forms.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 818776451d96e8f1a187eafca4a5ebbf0770fbde)
2022-07-23 13:53:42 +02:00
Jo-Philipp Wich
f5ebd6ec5b luci-base: form.js: remove stray <br> elements from section placeholder
Theme CSS styles shoudl take care of introducing padding as needed.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e4e001b59657e4cd0f333a3f43ce66b8f789deb2)
2022-07-23 13:53:42 +02:00
Jo-Philipp Wich
e06751f5a3 luci-base: form.js: trim option description
If a whitespace-only description is set on an element, the CSS :empty
selector will not match, causing description icons to be shown when
there's no actual content.

To avoid that, trim the description string when building the element.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b6ae1d4f4aec94b38e59b11e5fd9c28799dae05b)
2022-07-23 13:53:42 +02:00
Jo-Philipp Wich
8d9e9775ec luci-base: form.js: minor tweaks for mobile styling
- Annotate gridsection textvalue cells as CBI.DummyValue widgets
 - Replace `<br>` elements with newlines in `stripTags()`

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9c136c9beaa7639aecc351c5725de33cfe4d2e5c)
2022-07-23 13:53:42 +02:00
Jo-Philipp Wich
69d981aea3 luci-proto-ncm: rename service option to mode
Package luci-proto-ncm depends on comgt-ncm which uses an option
called 'mode' to set the radiomode of the modem. There is no option
'service' in the comgt-ncm scripts.

Suggested-by: breenstorm <49235337+breenstorm@users.noreply.github.com>
[fix commit subject, add commit message, rebase onto master branch]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4d6642b636a9feaa173c568c99f4129c440ed8b8)
2022-07-23 13:19:46 +02:00
Jo-Philipp Wich
1e7d9e4461 luci-base: form.js: fix removing just created named GridSection
Since the `handleModalSave()` handler of the GridSection class invokes
`handleModalCancel()` after saving the data but before removing the
`addedSection` property, the `handleModalCancel` handler incorrectly
removed the uci section that has just been created.

This bug didn't affect anonymous GridSections because after saving the
id of the created section changes, causing the remove command to fail,
but for named ones with stable section IDs, the bug manifested.

Solve the issue by passing a flag to `handleModalCancel()` indicating
whether the method was called from a safe operation and use it do
decide whether to delete the new staged uci section or not.

Fixes: #5760
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2771360108cb3e2011c7c9cb4921a9047ea70910)
2022-07-23 00:15:06 +02:00
Jo-Philipp Wich
df15ea39ff luci-base: uci.js: prevent sending empty uci set operations
Under certain circumstances, a staged uci option value might get unset
again before saving the config, leaving an empty section change set
behind, causing the save call to send an empty uci set request via rpc,
triggering an ubus code 4 (Resource not found) error.

In particular this prevented bridge VLANs from getting saved properly.

Fixes: #5876
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 25dcd0b77c4450b83cd8b8307397e58c34ebfcd1)
2022-07-23 00:14:38 +02:00
Jo-Philipp Wich
cd97091715 luci.mk: ignore language directories not explicitly mentioned
Only create translation packages for languages mentioned in luci.mk

Fixes: #5886
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-07-22 16:11:42 +02:00
Jo-Philipp Wich
f19d41cb14 luci-mod-network: demote WPA-PSK to "low" security in the choice list
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ef7fe79ffc4a0725d51eb554db02fd8e3e73534d)
2022-07-12 16:13:03 +02:00
Jo-Philipp Wich
e0f0502b22 luci-app-ddns: fix broken translation call
Fixes: #5874
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 57b88211c14dd71da44b537ac9062f99e1efbe80)
2022-07-12 15:45:01 +02:00
Jo-Philipp Wich
be3df7c2e2 lucihttp: update to latest Git HEAD
6e68a10 utils: also compare attribute name length in lh_header_attribute()
7b721af testcases: adjust urldecode tests

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2b0539ef9d1849b42fae206f0647bc647323c75d)
2022-07-08 15:29:19 +02:00
Markus Stockhausen
a57db983db rpcd-mod-luci: update filter for rpc_luci_get_network_devices
When kernel bonding module is loaded it will create a special
file /sys/class/net/bonding_masters. This is no network device.
Filter it out for getNetworkDevices() call.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
(cherry picked from commit 77d29c9dc0226faa9374ca25fba8dc642c99f303)
2022-07-08 15:29:10 +02:00
Alexander Georgievskiy
6731190ac8 luci-mod-status: nftables.js: fix OOM on big nftables IP sets
Signed-off-by: Alexander Georgievskiy <galeksandrp@gmail.com>
(cherry picked from commit 88c62fe2187ebf28937cb49f880dada09937b194)
2022-07-08 15:28:21 +02:00
Hannu Nyman
ee5576f5e3 treewide: backport and sync tranlations
Backport translations from master.
(also remove the erronenous Portuguese translations from English)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-07-03 13:37:08 +03:00
Jo-Philipp Wich
c4e1fcd458 treewide: sync with master translations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-06-21 23:58:54 +02:00
Jo-Philipp Wich
28d70baeaa luci-mod-network: wireless.js: fix typo in description string
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 53a998895b81ac393d1a9d62e4c3ae0e8708515b)
2022-06-21 23:55:21 +02:00
Jo-Philipp Wich
ac36cb549f treewide: sync with master translations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-06-21 12:30:45 +02:00
Jo-Philipp Wich
42cc1b402a luci-mod-network: wireless.js: expose wifi-iface macaddr option
Fixes: #5845
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f039069ac52e0da00ce9f3486926fbddd29a6ea0)
2022-06-21 08:57:41 +02:00
Jo-Philipp Wich
b528725635 luci-base: remove redundant english translations
Drop translations that match the msgid as well as stry, misplaced spanish
ones.

Ref: https://forum.openwrt.org/t/openwrt-22-03-0-rc4/129874/50
Ref: https://forum.openwrt.org/t/openwrt-22-03-0-rc4/129874/60
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit cc3d97ccecec041128462d44d85f9393a502f60e)
2022-06-20 11:25:41 +02:00
Jo-Philipp Wich
8a4486a792 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:14 +02:00
Hannu Nyman
2b78a18d7b treewide: Backport translations and sync
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-06-12 19:51:16 +03:00
Jo-Philipp Wich
28e92e3f8c luci-app-opkg: fix parsing package dependencies with version constraints
Due to improper ordering of regexp alternatives, version constraint operators
might get undermatched.

Fixes: https://github.com/openwrt/openwrt/issues/9982
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b84791bd029c2aaa67cbc06a15d23828f62f4608)
2022-06-03 13:38:01 +02:00
Dirk Brenken
69cbdb87e0
luci-app-banip: mark as broken
banIP 0.7.x is not compatible with new nft firewall (default in master and 22.03).
Mark the package as BROKEN for now.

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 8837f7608adf770ff33249821d28da097324c54d)
2022-05-27 21:32:44 +02:00
Jo-Philipp Wich
d8ecf48f20 luci-theme-bootstrap: restore initramfs warning
Restore accidentally removed the initramfs boot warning banner.

Ref: 8055acc9be (commitcomment-73447330)
Fixes: 8055acc9be ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 56fab648caa78422aac47ab8cec168e8a0999316)
2022-05-21 18:27:45 +02:00