209 Commits
Author SHA1 Message Date
Ivan Kvashonkin 9aff465238 treewide: wrap loose view content in cbi-section
Views that returned headings, tables and control rows with nothing around
them now wrap that content in a section: the system and kernel logs,
Processes, the nftables and iptables views, Startup, the wireless station
list, DSL stats and the package manager. The nftables rule tables also
drop an !important that no theme could override.

Nothing changes in the stock bootstrap theme; themes that draw
.cbi-section as a panel get the structure they need.

Signed-off-by: Ivan Kvashonkin <vizzlef@gmail.com>
2026-09-06 21:47:04 +03:00
Jo-Philipp Wich 96a255dbd9 rpcd: fix file ACLs for symlinked /proc paths
Several ACL files referenced /proc paths that are symlinks (e.g.
/proc/mounts -> /proc/self/mounts -> /proc/$PID/mounts), which
resolve to paths not covered by the existing ACL rules under the
new rpcd symlink-aware ACL check.

Add the resolved path patterns (/proc/*/mounts, /proc/*/net/ipv6_route)
alongside the original symlink paths so that both the original and
the realpath-resolved path are matched by ACL rules.

Fixes: #8867
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2026-07-24 11:56:35 +02:00
Jo-Philipp Wich 903af34855 luci-mod-system: cleanup mount ACL group
Remove stray write grant for crontab.

Fixes: GHSA-v5f9-62c7-cw29
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2026-07-20 20:45:25 +02:00
Andy Chiang 01188f66f1 luci-mod-system: i18n string context
i18n string context

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2026-07-11 14:05:48 +03:00
Christian Korber c57dd78909 luci-mod-system: enforce password policy
Validation is performed if the password complies to password policy.

Signed-off-by: Christian Korber <ckorber@tdt.de>
2026-06-03 13:49:07 +03:00
Christian Korber 5aa08be2cb luci-mod-system: add password policy
Initial commit to add password policy options to `luci-mod-system`.

Signed-off-by: Christian Korber <ckorber@tdt.de>
2026-06-03 13:49:07 +03:00
Christian Korber 331948ff36 luci-mod-system: unify password change
A flag is added to choose if Password of rpcd user is changed or unix
user.
If rpc is chosen the old password has to be specified.

Signed-off-by: Christian Korber <ckorber@tdt.de>
2026-06-03 13:49:07 +03:00
Paul Donald c3b03826fa luci-mod-system: correctness fixes
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 15:49:46 +03:00
Paul Donald f199b4f912 luci-mod-system: improve handling of absent plugins
add cleanup functionality; remove orphaned config for absent plugins
render placeholder title when plugin is absent

follow-up to 617f364333

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 13:41:14 +03:00
Paul Donald cbcb9315b7 luci-mod-system: add write for luci_plugins
This allows uci calls to write skeleton configs for new plugins

follow-up to 617f364333

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-20 22:18:22 +03:00
Zadkiel AHARONIAN 7fac2bef4f luci-mod-system: add current host to reset reconnect
When performing a sysupgrade without keeping settings, the reconnect
logic only tries the hardcoded 192.168.1.1 and openwrt.lan. This fails
silently when the device uses a different static IP.

Prepend window.location.host to the reconnect target list, keeping the
existing defaults as fallbacks. This matches the behavior already used
when settings are kept.

Common use case: custom images built with the OpenWrt Image Builder and
pre-configured static IPs land on a known address that differs from the
defaults after a factory reset. The current host is the most likely
correct target since the user is already connected to it.


Signed-off-by: Zadkiel AHARONIAN <hello@zadkiel.fr>
2026-05-14 13:53:09 +03:00
Han Yiming 4a308bab37 luci-base: add authentication plugin mechanism
This commit introduces a generic authentication plugin mechanism
to the LuCI dispatcher, enabling multi-factor authentication
(MFA/2FA) and other custom verification methods without
modifying core files.

This implementation integrates with the new plugin UI architecture
introduced in commit 617f364 (luci-mod-system: implement plugin UI
architecture), allowing authentication plugins to be managed
through the unified System > Plugins interface.

Signed-off-by: Han Yiming <moebest@outlook.jp>
2026-04-09 14:26:09 +02:00
Paul Donald 1837866a6a luci-mod-system: add luci_plugins uci permission
follow-up to 617f364333

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-04-02 21:04:55 +02:00
Paul Donald 617f364333 luci-mod-system: implement plugin UI architecture
include some example plugins also.
JS files provide UI to configure behaviour of plugins
which typically live in

/usr/share/ucode/luci/plugins/<class>/<type>

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-03-31 00:13:54 +02:00
Paul Donald 17a29690ee luci-mod-system: add LED interval parameter
As documented

https://openwrt.org/docs/guide-user/base-system/led_configuration

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-03-16 22:55:33 +01:00
Paul Donald d7eb553596 luci-mod-system: change regex to please jsmin
Also trim out unused function

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-02-16 02:49:37 +01:00
Paul Donald 95b01600e3 luci-mod: js linting fixes / ES6 treatment
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-02-16 01:42:57 +01:00
Paul Donald eb4c153155 luci-mod-system: refresh repokeys
Remove manual UI setup and implement JSONMap.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-02-03 06:48:37 +01:00
Paul Donald d2511f4bfe luci-mod-system: expose table filters via flag
Filters might not be everyone's aesthetics, so hide filters
by default and expose a global flag which can be set under
System -> System -> Language and Style. Only tables which
have .filterrow set to true will show filters.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-02-03 06:42:16 +01:00
Paul Donald a8328056e4 luci-mod-system: make repokeys more future proof
Detect future release key names based on pattern.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-01-29 19:12:10 +01:00
Paul Donald 37aa2807ea luci-mod-system: extend dropbear listen options
dropbear.init behaviours:

Interface: For each interface, collect all its IPs,
up to 10 endpoints total, and add `-p <addr:port>` for
each; if no interface was given, fall back to a plain
`-p <port>` (listen on all interfaces and IPs). It binds
to addresses, not the device. It collects all IPv4, and
all IPv6 - ULA, but not LL - and binds to those. Ex:

dropbear ... -p 192.168.1.1:22 -p 192.168.1.2:22 -p 192.168.1.3:22 ...

DirectInterface: A single logical interface name; the
first one is used (if multiple are given via `list`).
Runs dropbear with `-l <device> -p <port>`, i.e., it binds
directly to the layer 2 network device rather than
specific IPs. Ex:

dropbear ... -l br-lan -p 22 ...

Closes openwrt/packages#25555
Closes #7484

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-12-31 15:28:27 +01:00
Andy Chiang fdac3c0100 luci-mod-system: add translation string for language
add translation string for language

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-11-20 13:03:52 +01:00
Paul Donald 1299531242 luci-mod-system: file naming improvement for repo key management
When downloading a key, try to get the filename of the key. opkg expects it to
match the key fingerprint when verifying .sig files. apk not so.

Try to save the public key file with the name from the provided URL, so it is
not named "key_blah" which won't match its fingerprint.

The alternative would be to call usign with the public key file as input, and
then rename it to its fingerprint. This is only necessary for opkg which is on
the way out.

If the public key file at the remote resource is not named according to its
fingerprint, that's on the repo owner.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-11-02 18:34:30 +01:00
Paul Donald bd5650565a luci-mod-system: give repokeys the ability to fetch keys from a remote URL
Simply paste in an http(s) URL e.g.

https://example.com/releases/SNAPSHOT/publickey.pub

and press Add Key.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-25 22:46:20 +02:00
Andy Chiang f83fe35dae modules: fix default values
fix default values for luci-base and luci-mod-{dashboard,status,system}

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-21 16:12:03 +02:00
Paul Donald 523b3ea372 luci-mod-*: initialize default values
follow-up to
e67465da5e
b0004ad39c
71ea35fc7f

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-20 21:10:54 +02:00
Andy Chiang b0004ad39c luci-mod-system: use localized time
use localized time

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-20 20:40:46 +02:00
Andy Chiang b47c94cabb luci-mod-system: fix JSMIN Error
jsmin cannot handle regular expressions in this format, so use RegExp() instead.

fixes: #8020

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-20 12:46:02 +02:00
Paul Donald 850867b6e4 luci-mod-system: minor code fixes for repokeys and sshkeys
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-13 14:34:47 +02:00
Paul Donald 65bdfc61db luci-mod-system: repo key management
Reject PEM in OPKG; reject non-PEM in APK

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-08 20:55:11 +02:00
Paul Donald cf1e61f10d luci-mod-system: Add repo key management
follow-up fix to acdffc3d1d

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-07 16:05:56 +02:00
Paul Donald acdffc3d1d luci-mod-system: Add repo key management
Simplifies adding third-party repos. Functions on both 24.10 (opkg) and
main (apk). Based loosely on sshkey management.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-05-31 12:12:06 +02:00
Aleksander Jan Bajkowski 3e45fc644f luci-mod-system: add speed and duplex triggers
Many devices have LEDs to signal a specific link speed.
They are incorrectly displayed in LUCI when they are defined.
This commit adds the missing speed and duplex triggers.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2025-02-25 15:42:07 -06:00
Paul Donald e845441baf luci-base: i18n string context
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-01-31 23:28:12 +01:00
Hannu Nyman ef167782ff luci-mod-system: Add 'disabled' as cron log level
Add "Disabled" with value 9 as a choice for cron log level.

9 actually exceeds the highest built-in value 8, but can be
used to quieten the logging in cases where there are e.g. cron
jobs running each minute, which would create log spam.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2024-12-01 15:37:48 +02:00
Hannu Nyman 1e7ce8de99 luci-mod-system: Fix cron log level settings
Busybox crond only uses level 5, 7 and 8. (And 7 and 8 only differ
on one error regarding finding a crontab without user.)
For simplicity, just provide 5 and 7 as alternatives in LuCI.

Show level 7 as the default and as the first offered choice.

Add missing semicolons to the file.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2024-12-01 12:57:20 +02:00
Paul Donald d3ba74ed9b luci-mod-system: add 'reload' button to software start page
Often restart is not what is necessary, and can trigger longer outages.

Reload is often sufficient, especially for things like rpcd.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2024-10-28 14:22:37 +01:00
Paul Donald 37ea60da58 Revert "luci-mod-system: Dropbear: remove custom flag values"
This reverts commit 43f60c3fad.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2024-06-13 15:11:04 +02:00
Sergey Ponomarev 43f60c3fad luci-mod-system: Dropbear: remove custom flag values
Instead of saving 'on' or 'off' for flag values, use the default 1 and 0.
This makes code simpler.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2024-06-06 00:09:03 +02:00
Josh Correia 9068e947b0 luci-mod-system: Improve SSH-Keys page grammar, update po/pot files
Signed-off-by: Josh Correia <joshmcorreia@gmail.com>
2024-06-04 14:36:19 +02:00
Josh Correia 0add361502 luci-mod-system: Fix startup UI typo, update po/pot files
Signed-off-by: Josh Correia <joshmcorreia@gmail.com>
2024-06-03 22:48:22 -07:00
Christian Svensson fbd98a3da6 luci-mod-system: Fix broken JSON in ACL
Fixes #7126.

Signed-off-by: Christian Svensson <blue@cmd.nu>
2024-05-18 22:06:14 +02:00
Kristian Skramstad c4eaea70c7 luci-mod-system: flash.js: fix mtdname on download
The previous change did not work as intended for
partitions with _ in the name. I.e "0:qsee_1".
It would output an error "Invalid characters in filename".

So fix this by matching and replacing any
character except for a-z and 0-9 with "-".

Example "0:qsee_1" = I.e "0-qsee-1".

Signed-off-by: Kristian Skramstad <kristian+github@83.no>
2024-05-16 00:15:45 +02:00
Kristian Skramstad 08b8b1d0e3 luci-mod-system: flash.js: add mtdblock name to filename
When you download a partition, the name is hostname+mtdX.bin
and that can be confusing if you go back and try to remember
what mtdX was if you have 10+ partitions.

So let us add the partition name to the filename like:
hostname.mtdX.boot.bin
hostname.mtdX.firmware.bin

Note: If there is a better, easier and simpler way to do the
same thing, please let me know.

Signed-off-by: Kristian Skramstad <kristian+github@83.no>
2024-05-14 14:37:51 +02:00
Florian Eckert 8c8b80c572 luci-mod-system: add support for switching the ssh service on and off.
Add support for switching the ssh service on and off via LuCI.
This is already possible in the uci section of dropbear.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-05-06 13:38:12 +02:00
Florian Eckert 29678071f3 luci-base: move and rename ucitrack system.json
Move the json file to where it belongs.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-04-11 16:15:52 +02:00
Florian Eckert e3c6eb2e44 luci-base: move and rename ucitrack dropbear.json
Move the json file to where it belongs.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-04-11 16:15:52 +02:00
Florian Eckert c15b0bf513 luci-base: move and rename ucitrack fstab.json
Move the json file to where it belongs.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-04-11 16:15:52 +02:00
Paul Donald e5f8af1753 luci-mod-system: describe NTP server candidates
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2024-04-02 01:31:01 +02:00
Jo-Philipp Wich b8a045c67a luci-mod-system: remove bogus mount option
Drop the bogus `enabled_fsck` option which seems to be an automatic Lua->JS
conversion artifact.

Fixes: #6837
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2024-02-21 22:11:53 +01:00