3982 Commits

Author SHA1 Message Date
fbf88f69ae test 2026-01-30 18:36:45 +08:00
Hannu Nyman
487e58a0a6 timezone data: update to 2022c
Update timezone data to 2022c.

http://mm.icann.org/pipermail/tz-announce/2022-August/000071.html
http://mm.icann.org/pipermail/tz-announce/2022-August/000072.html
* Iran no longer observes DST after 2022.
* Rename Europe/Kiev to Europe/Kyiv.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 10bcb228a7fc02a8e9ecb1ff584fd63b77a55afd)
2022-09-03 00:32:08 +03:00
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
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
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
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
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
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
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
ef99568d88 luci-base: ui.js: warn about connectivity loss on changing iface settings
If specific settings such as the protocol, IP address or netmask of an
interface the user is connected to are changed, the apply/rollback
mechanism might interfere. Display an additional warning dialog in this
case, instructing the user to manually reconnect and offering to continue
with a less safe unchecked apply mechanism.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 733ee9a7b6312e9b5fe2a4aa8107baf5379602ab)
2022-05-20 20:24:28 +02:00
Jo-Philipp Wich
ea5f85f3f0 luci-base: ui.js: make "Apply unchecked" available from the changes dialog
Previously, "Apply unchecked" was only possible from the save action of CBI
maps, allow to invoke it from the configuration change dialog as well.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 8583efb5a92785fd56ff4abb0ce56a142eb6602f)
2022-05-20 20:24:27 +02:00
Jo-Philipp Wich
514a459b9b luci-base: ui.js: gracefully handle failing confirm calls on rollback
Do not abort the poll loop if some confirm request attempts fail, which
might happen when the device starts rolling back its configuration.

Before that fix, the rollback information dialog offering an unchecked
apply was not reliably presented in such situations.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b6797821b86678d8dd604ce4805691784e6dc3ce)
2022-05-20 20:24:27 +02:00
Jo-Philipp Wich
07cf1a33a2 luci-base: fix DSL feature detection
On boards with ADSL instead of VDSL support we need to expect an
`/sbin/dsl_cpe_control` instead of an `/sbin/vdsl_cpe_control` executable.

Ref: https://forum.openwrt.org/t/dsl-line-stats/126580
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 111c551cdb8d14e8e5ef7c7a66ffdceb6d3cbb55)
2022-05-20 20:23:26 +02:00
Jo-Philipp Wich
ec7cadc37e luci-mod-network: routes: allow prefixes as route source
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 904c174cafe46a6414058d242df279c09e23be29)
2022-05-20 20:23:26 +02:00
Jo-Philipp Wich
02913bef60 luci-mod-system: enforce availability of english as language choice
Always offer english, regardless of whether a dummy language pack for it
is installed or not.

Fixes: #5783
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c2eb30bba7451d16e1de37411624b2bcc449c037)
2022-05-20 20:23:26 +02:00
Jo-Philipp Wich
f777bf78c1 luci-mod-network: diagnostics: peg max traceroute hops to rpc timeout
In the worst case, traceroute might take up to 30s to complete when tracing
a completely unreachable path, due to the default limit of 30 hops multiplied
by the per-hop deadline of 1 second (-w 1).

Limit the maximum amount of hops to the configured rpc execution timeout,
20 second by default, in order to avoid running into timed out rpc requests.

Fixes: #5782
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1ae142d7d11862b11a6e0cea06562875cc778ae7)
2022-05-20 20:23:26 +02:00
Jo-Philipp Wich
3886866ad6 luci-mod-status: hide iptables firewall status when nft is present
Do not expose the iptables status page as menu item when nftables is present
on the system. Instead add a warning banner to the nftables status page
directing the user to the hidden iptables status page when we encounter
legacy rules on the system.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2f80fe3767207e2dbb8c5286603f49808b66a60d)
2022-05-20 20:23:26 +02:00
Jo-Philipp Wich
f29452ced0 luci-base: dispatcher.lua: support "absent" fs dependency for menu nodes
The "absent" dependency type requires the given path to not exist on the
local system for the condition to be satisified. This is useful to disable
menu nodes depending on the presence of specific files.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2e4b5fb8ff2fb3bfd1400bf7cbf721057f02fab9)
2022-05-20 20:23:26 +02:00
Chen Minqiang
272611d74e luci-mod-network: switch: Fix multi instances handling
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
(cherry picked from commit d65c5e64960273939e05e615cdcfe9019c1e2f37)
2022-05-20 20:23:26 +02:00
Jo-Philipp Wich
791e458a77 luci-mod-status: nftables: add translations for further expression kinds
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f2f7e0c1f71199f945e4f936bb1396e0c1f30b33)
2022-05-20 20:23:26 +02:00
Hannu Nyman
b8e6cdda04 treewide: Backport translations and sync
Backport from master, sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-05-15 20:12:41 +03:00
Alexey Dobrovolsky
26fcbd5df2 luci-mod-system: add interface selection for NTPD
UCI option `interface` for sysntpd server was introduced in
OpenWrt commit 4da60500ebd2. NTP server binds to the specified interface,
or if unspecified, to all.

This patch adds selection widget to LuCI.

Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>
(cherry picked from commit 24ac5a2bf6d713c6878cf7be7d4e4516965c2884)
2022-05-10 03:05:31 +03:00
Jo-Philipp Wich
66994a580e 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:35 +02:00
Jo-Philipp Wich
4c263cff5c luci-mod-network: avoid needlessly writing none RA flags
Fixes: #5725
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f04011f0683dbacb8b831733c708bad760ca61df)
2022-04-27 12:20:07 +02:00
Hannu Nyman
3645670952 treewide: Backport translations from master - i18n
Backport translations.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-04-24 18:33:21 +03:00
Florian Eckert
0c0cf782f3 luci-mod-system: Set description to blank if the trigger has none
In this case the cbi description div will not be generated and when
switching to another trigger later, attempts to change the description
div contents will fail.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit b6fb2b16971f80afcfb7c3dd1d257c60f6cced7f)
2022-04-12 14:20:06 +02:00
Florian Eckert
0dedf21108 Revert "luci-mod-system: Set description to blank if the trigger has none"
This reverts commit 3de544600385ca365c833aec99f89113daa12292.

I have unfortunately edited the wrong line!

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 2135525b7213220476388fbed0d7525df712a937)
2022-04-12 14:19:57 +02:00
Florian Eckert
ba7d0c7ddd luci-mod-system: Set description to blank if the trigger has none
In this case the cbi description div will not be generated and when
switching to another trigger later, attempts to change the description
div contents will fail.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 3de544600385ca365c833aec99f89113daa12292)
2022-04-12 10:13:38 +02:00
Hannu Nyman
0e4eeeb9a2 treewide: Backport translations and sync
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-04-09 19:14:45 +03:00
Max S Kash
66d9387eb3
luci-mod-status,mod-network: Added fqdn-name to DHCPv4 lease table
Added code to display fcdn-name in DHCPv4 lease table.
(based on code in DHCPv6 lease table)

Signed-off-by: Max S Kash <asukms@ya.ru>
Indentation adjused and wrapped commit message
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-03-31 00:09:15 +05:00
Hannu Nyman
f4a1fe6c4f treewide: Backport translations from master
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-03-26 08:49:19 +02:00
Hannu Nyman
af8e91c5fb 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:11:45 +02:00