summaryrefslogtreecommitdiff
path: root/modules/luci-base/root
Commit message (Collapse)AuthorAgeFilesLines
* luci-base: rpc: add call to enumerate builtin ethernet portsJo-Philipp Wich2023-08-241-1/+44
| | | | | | | | | | | Add a new luci/getBuiltinEthernetPorts RPC call which returns a consolidated list of known ethernet ports found in `/etc/board.json`. Add an x86/64 specific workaround which attempts to enumerate missing ethernet devices too. Ref: #6534, #6538 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: grammar fixesPaul Dee2023-08-111-1/+1
| | | | | | | | Login (n) -> Log (v) in Logout (n) -> Log (v) out Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com>
* luci-base: rpcd: handle swap entries in getBlockDevicesJo-Philipp Wich2023-04-281-1/+21
| | | | | | | | Add entries from `/proc/swaps` to the result array as well in order to let the ui properly deal with swap files. Fixes: #6350 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: add a hostapd 11ax feature flagAndre Heider2023-01-231-1/+1
| | | | | | Required for luci to check if it can acually offer that mode. Signed-off-by: Andre Heider <a.heider@gmail.com>
* luci-base: remove the hostapd 11n feature flagAndre Heider2023-01-231-1/+1
| | | | | | | This feature flag doesn't exist anymore, see this commit on the main repo: 7c63295bf4 "treewide: remove DRIVER_11N_SUPPORT" Signed-off-by: Andre Heider <a.heider@gmail.com>
* luci-base, luci-mod-status: expose LuCI version via ubusJo-Philipp Wich2022-12-171-0/+7
| | | | | | | | Instead of scraping the LuCI version from Lua sources, fetch it via ubus in order to be independent from the Lua runtime. Fixes: #6154 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: fix ubus luci/getConntrackHelpers reporting with firewall3Jo-Philipp Wich2022-11-101-13/+18
| | | | | | | | The uci package name used to iterate the loaded configuration sections must correspond to the file name being loaded. Fixes: https://github.com/openwrt/openwrt/issues/11215 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: don't fail getInitList if no indexes can be determinedJo-Philipp Wich2022-10-251-2/+2
| | | | | | | Gracefully handle missing indexes in the luci rpcd plugin getInitList procedure. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* treewide: separate Lua runtime resourcesJo-Philipp Wich2022-10-253-690/+520
| | | | | | | | | | | Move classes required for Lua runtime support into a new `luci-lua-runtime` package. Also replace the `luci.http` and `luci.util` classes in `luci-lib-base` with stubbed versions interacting with the ucode based runtime environment. Finally merge `luci-base-ucode` into the remainders of `luci-base`. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: remove 'dsl' feature flagAndre Heider2022-10-211-1/+0
| | | | | | This is now unused. Signed-off-by: Andre Heider <a.heider@gmail.com>
* proper cache control in firefoxDaniel Kucera2022-09-171-0/+2
| | | | | | Added more meta headers to ensure proper cache control in Firefox. Before this patch, the `/` url hasn't even been requested when opened in Firefox. Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com>
* luci-base: use different cookie names for HTTP and HTTPSJo-Philipp Wich2022-07-081-3/+3
| | | | | | | | | | | | | | | | | | | | | 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>
* luci-base: fix DSL feature detectionJo-Philipp Wich2022-05-031-1/+1
| | | | | | | | 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>
* luci-base: ucitrack: fix broken affects logicJo-Philipp Wich2022-03-301-3/+3
| | | | | | | | Changes on a given configuration should trigger change events on affected configurations, not the other way around. Fixes: #5745 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: explicitly invoke busybox applet for password changeJo-Philipp Wich2022-01-251-1/+1
| | | | | | | | | | 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>
* luci-base: fix ubus luci.getConntrackHelpers call with firewall4Jo-Philipp Wich2022-01-221-1/+5
| | | | | | | Fallback to firewall4's helper list if the fw3 one cannot be loaded. Fixes broken zone configuration when firewall4 is installed as backend. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: properly detect flow offloading capabilities with nftablesJo-Philipp Wich2022-01-201-1/+1
| | | | | | | | When the system is running with nftables instead of iptables, the proprietary XT_FLOWOFFLOAD module will not be present, query the nft equivalent instead. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-app-firewall: initial firewall4 compatibilityStijn Tintel2022-01-061-0/+1
| | | | | | | | | Initial changes required for firewall4 compatibility: * depend on uc-firewall instead of firewall * detect installed version of firewall and hide incompatible features Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Reviewed-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: apply Browser/OS dark mode preference to index redirect pageJo-Philipp Wich2021-11-161-7/+16
| | | | | | | 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>
* luci-base: add "dsl" system featureJo-Philipp Wich2021-10-281-0/+1
| | | | | | Allows LuCI views to probe DSL presence using `L.hasSystemFeature('dsl')`. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: dispatcher: rework dispatching and menu filtering logicJo-Philipp Wich2021-10-111-1/+2
| | | | | | | | | | | | - Prefer nodes that do not require authentication over nodes that do - Honour ACL dependencies while resolving firstchild nodes - Consider currently active session while scanning menu tree instead of only loading effective ACLs when a login node is encountered - Do not consider nodes for firstchild dispatching which specify a special "firstchild_ineligible" property - Hide menu nodes that have no accessible children Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: remove deprecated radvd from ucitrackHannu Nyman2021-02-131-1/+1
| | | | | | | | Cleanup /etc/config/ucitrack by removing 'radvd' affect item from network, as the radvd package has deprecated by odhcpd and odhcp6c in 2014. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* luci-mod-network: skip check for 802.11w featureDobroslaw Kijowski2021-01-021-1/+1
| | | | | | | | | | | | | OpenWrt commit 1a9b896d ("treewide: nuke DRIVER_11W_SUPPORT") enables 802.11w feature for all wpad/hostapd configurations. The feature flag was removed at all but for the compatibility reasons 11w is still advertised (but there's a plan to nuke it also) [1]. Remove conditional 802.11w LuCI support to match current behavior. [1]: https://github.com/openwrt/openwrt/pull/3347 Signed-off-by: Dobroslaw Kijowski <dobo90@gmail.com>
* luci-base: fix syntax error in hostapd featuresMartin Böh2020-10-311-1/+1
| | | | Signed-off-by: Martin Böh <mart.b@outlook.de>
* luci-base: check support for hostapd wpsAnsuel Smith2020-10-111-1/+1
| | | | | | | Check if hostapd supports wps pushbutton features. (wps is now supported by ubus instead of using hostapd_cli) Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* luci-base: Fixed delayed portstatus loading on R7800Nicolas Thumann2020-08-021-1/+1
| | | | Signed-off-by: Nicolas Thumann <me@n-thumann.de>
* Merge pull request #4127 from blocktrron/luci-wep-featuresJo-Philipp Wich2020-06-161-1/+1
|\ | | | | luci-mod-network: query WEP support
| * luci-base: add queryable WEP WiFi featureDavid Bauer2020-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds WEP as a queryable WiFi feature. Support for the deprecated WEP encryption is not compiled-in to hostapd or wpa_supplicant by default anymore. Allow LuCi to query the availability of WEP to remove it from the list of avialable encryption methods in case hostapd / wpa_supplicant are compiled without it. Signed-off-by: David Bauer <mail@david-bauer.net>
* | luci-base: move vpn sectionFlorian Eckert2020-06-161-9/+9
| | | | | | | | | | | | | | Move the VPN configuration section behind the network configuration. The normal workflow is add/edit the network and then add/edit a vpn configuration. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* | luci-base: grant uci rename permissionsJo-Philipp Wich2020-06-021-1/+1
|/ | | | | | | | When doing an initial wireless configuration migration, LuCI needs to perform a series of rename calls which weren't allowed so far. Ref: https://forum.openwrt.org/t/config-migration-endless-loop/64340 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: make logout link depend on luci-base ACLJo-Philipp Wich2020-04-251-0/+3
| | | | | Fixes: #3966 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: fix trainling comma in ACL specificationJo-Philipp Wich2020-04-171-1/+1
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: implement JSON endpoint to fetch menu informationJo-Philipp Wich2020-04-161-0/+9
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* treewide: reorganize base ACLsJo-Philipp Wich2020-04-091-97/+14
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* Merge pull request #3769 from dibdot/logread-fixJo-Philipp Wich2020-04-081-0/+1
|\ | | | | luci-base: accept alternative logread location
| * luci-base: accept alternative logread locationDirk Brenken2020-03-201-0/+1
| | | | | | | | | | | | | | * minimal change to accept the usual logread location plus the alternative location (/usr/sbin/logread) used by syslog-ng (see openwrt/packages/issues/11535 for reference) Signed-off-by: Dirk Brenken <dev@brenken.org>
* | Merge pull request #3749 from Ansuel/fix_relaydJo-Philipp Wich2020-04-081-0/+1
|\ \ | | | | | | luci-base: fix error 404 on missing relay protocol
| * | luci-base: add relayd to getFeature listAnsuel Smith2020-03-121-0/+1
| | | | | | | | | | | | | | | | | | | | | Add /sbin/block to the generic Feature list to make it easily accessible by getProtocolHandlers Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* | | ucitrack: fix bug for exec with paramsjjm24732020-03-231-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | In file `/etc/config/ucitrack` ``` config fstab option exec '/sbin/block mount' ``` `/sbin/block mount` never be called after fstab changed. Signed-off-by: jjm2473 <1129525450@qq.com>
* | luci-base: ensure that ubus path uses trailing slashJo-Philipp Wich2020-03-131-1/+1
|/ | | | | | | Without the trailing slash, probing endpoint availability will fail. Fixes: 529bde440 ("luci-base: make rpc webserver path configurable") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: extend rollback timeout to 90 secondsJo-Philipp Wich2020-02-131-1/+1
| | | | | Ref: #3628 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: make swconfig port state parsing more robustJo-Philipp Wich2020-01-281-17/+54
| | | | | | | | Since swconfig output varies wildly among different switch drivers, rely on a simpler more robust parsing approach to find the required information. Ref: https://forum.openwrt.org/t/cannot-read-property-link/50766 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: allow loading translations when not authenticatedJo-Philipp Wich2020-01-251-3/+1
| | | | | Fixes: #3563 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* Merge pull request #3522 from swg0101/systemcertJo-Philipp Wich2020-01-171-0/+0
|\ | | | | luci-base/mod-network: corrections to previous commit
| * luci-base: correct rpcd bad access modeDavid Lam2020-01-161-0/+0
| | | | | | | | | | | | Corrects the bad access mode from a previous commit that did not allow rpcd luci to execute. Signed-off-by: David Lam <david@thedavid.net>
* | Merge pull request #3511 from Ansuel/no-hardJo-Philipp Wich2020-01-161-2/+2
|\ \ | | | | | | luci-base: remove hardcoded cgi-bin path
| * | luci-base: remove hardcoded cgi-bin pathAnsuel Smith2020-01-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Currently LuCI can be loaded only when placed in the root of the server as the cgi-bin path are hardcoded. Change the index.html to load the cgi-bin path from the current level. Also add a new entry in the env Object to make the cgi_base path easily accessible. This variable will be based on the position of /cgi-bin/luci. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* | | Merge pull request #3517 from Ansuel/ubus_shortJo-Philipp Wich2020-01-161-0/+1
|\ \ \ | |_|/ |/| | luci-base: make rpc webserver path configurable
| * | luci-base: make rpc webserver path configurableAnsuel Smith2020-01-161-0/+1
| |/ | | | | | | | | | | | | Currently the ubus path that provide the webserver is hardcoded to be /ubus. Change this to make it configurable from the luci config file. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* / luci-base: add system cert bundle detectionDavid Lam2020-01-161-0/+1
|/ | | | | | | | Add detection mechanism for system cert CA bundle installed by the ca-bundle package. Used by LuCI to detect whether the "Use system certificates" certificate validation option should be enabled. Signed-off-by: David Lam <david@thedavid.net>