project/luci.git
2 years agoluci-mod-system: sshkeys.js: prevent XSS through pubkey comments openwrt-19.07
Jo-Philipp Wich [Wed, 21 Sep 2022 12:47:41 +0000 (14:47 +0200)]
luci-mod-system: sshkeys.js: prevent XSS through pubkey comments

Ensure to not display public key comments verbatim in order to prevent
injection of markup.

Reported-by: Eric McDonald <ericmcdonald@protonmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 944b55738e7f9685865d5298248b7fbd7380749e)

2 years agoluci-app-statistics: stat-genconfig: don't emit bools for absent uci options
Jo-Philipp Wich [Mon, 25 Apr 2022 18:55:02 +0000 (20:55 +0200)]
luci-app-statistics: stat-genconfig: don't emit bools for absent uci options

Do not emit native collectd.conf boolean false options if the corresponding
uci option is unset in order to honour collectd's implicit defaults.

This fixes certain options, such as the memory plugins `ValuesAbsolute`,
being without effect if declared as default-enabled in the related plugin
uci forms.

Fixes: #5777
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f16037cec5e3f65cffe2f5788c264f1912435b0e)

2 years agotreewide: Backport translations and sync
Hannu Nyman [Sat, 9 Apr 2022 16:22:08 +0000 (19:22 +0300)]
treewide: Backport translations and sync

Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2 years agotimezone data: update to 2022a
Hannu Nyman [Thu, 24 Mar 2022 19:09:41 +0000 (21:09 +0200)]
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)

2 years agotreewide: Backport translations from master - i18n
Hannu Nyman [Sun, 13 Mar 2022 16:29:52 +0000 (18:29 +0200)]
treewide: Backport translations from master - i18n

Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2 years agoluci-base: properly handle promise targets in Request.request()
Jo-Philipp Wich [Mon, 21 Feb 2022 13:59:16 +0000 (14:59 +0100)]
luci-base: properly handle promise targets in Request.request()

Under some circumstances, ubus RPC requests may be initiated while LuCI is
still resolving the `rpcBaseURL` value. In this situation, the `target`
argument of the `request()` call will be a pending promise object which
results in an invalid URL when serialized by `expandURL()`, leading to an
`Failed to execute 'open' on 'XMLHttpRequest': Invalid URL` exception.

This commonly occured on the index status page which immediately initiates
ubus RPC calls on load to discover existing status page partials.

Solve the issue by filtering the given `target` argument through
`Promise.resolve()` before expanding the URL and initiating the actual
request.

Fixes: #3747
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 5663fd596b567d53587fcc4052df3095520c08a7)

2 years agotreewide: Backport translations from master
Hannu Nyman [Mon, 14 Feb 2022 20:32:05 +0000 (22:32 +0200)]
treewide: Backport translations from master

Backport translations.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2 years agoluci-app-openvpn: fix stray uci permission warning
Jo-Philipp Wich [Tue, 25 Jan 2022 21:39:48 +0000 (22:39 +0100)]
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 18b1130711b6ff7aacba98034e2bd7f4893b33df)

2 years agotreewide: Backport i18n translations from master and sync
Hannu Nyman [Sun, 23 Jan 2022 10:37:35 +0000 (12:37 +0200)]
treewide: Backport i18n translations from master and sync

Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2 years agoluci-base: sys: prevent path traversal via sys.init routines
Jo-Philipp Wich [Wed, 19 Jan 2022 15:32:52 +0000 (16:32 +0100)]
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 8752701b0d01a81d0bd0a735be733f24ad11ab69)

2 years agoluci.js: remove unsafe fallback code from dom.parse()
Jo-Philipp Wich [Thu, 23 Dec 2021 16:09:13 +0000 (17:09 +0100)]
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 63d9bcb6825fac92fd7dfa4ba858c8d5aafa23e8)

2 years agoluci-base: form.js: do not execute embedded script code in stripTags()
Jo-Philipp Wich [Thu, 23 Dec 2021 16:06:09 +0000 (17:06 +0100)]
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 993151504e8e810c083d3257555bdcdc2f00673a)

2 years agotreewide: Backport translations from master - i18n
Hannu Nyman [Sat, 18 Dec 2021 08:08:02 +0000 (10:08 +0200)]
treewide: Backport translations from master - i18n

Backport translations.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoluci-base: cbi.js: properly handle falsy values in cbi_update_table()
Jo-Philipp Wich [Tue, 23 Nov 2021 18:11:34 +0000 (19:11 +0100)]
luci-base: cbi.js: properly handle falsy values in cbi_update_table()

Fixes: #5544
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e982c05671229b3d13622b38c9536812e8c5f05c)

3 years agoluci-base: network.js: ignore wireless ifname patterns on retrieving devices
Jo-Philipp Wich [Wed, 10 Nov 2021 10:51:42 +0000 (11:51 +0100)]
luci-base: network.js: ignore wireless ifname patterns on retrieving devices

Only treat the given identifier as Linux netdev name if we can find a
corresponding entry in the device info cache and do not consider strings
starting with "wlan", "ath" or "wl" to be existing devices.

This fixes incorrectly adding wireless sections as ifnames to network
interfaces when the wifi-iface section name begins with one of the
`iface_patterns_wireless` patterns.

Fixes: #5069
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d4092b15ce92cda2d7711b57b2251ebebef32b5c)

3 years agotimezone data: update to 2021e
Hannu Nyman [Thu, 28 Oct 2021 18:24:18 +0000 (21:24 +0300)]
timezone data: update to 2021e

Update timezone data to 2021e.

http://mm.icann.org/pipermail/tz-announce/2021-September/000066.html
* Jordan now starts DST on February's last Thursday.
* Samoa no longer observes DST.
* Rename Pacific/Enderbury to Pacific/Kanton.

http://mm.icann.org/pipermail/tz-announce/2021-October/000068.html
* Fiji will suspend observance of DST for the 2021/2022 season.

http://mm.icann.org/pipermail/tz-announce/2021-October/000069.html
* Palestine will fall back 10-29 (not 10-30)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 0740023a3c44ebfb47126b8c9bb4e9a20985aa55)

3 years agotreewide: Backport i18n translations
Hannu Nyman [Tue, 19 Oct 2021 19:25:45 +0000 (22:25 +0300)]
treewide: Backport i18n translations

Backport translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoMerge pull request #5414 from stangri/19.07-luci-app-advanced-reboot
Stan Grishin [Wed, 6 Oct 2021 21:53:40 +0000 (14:53 -0700)]
Merge pull request #5414 from stangri/19.07-luci-app-advanced-reboot

[19.07] luci-app-advanced-reboot: bugfix for Linksys E4200v2

3 years agoluci-app-advanced-reboot: bugfix for Linksys E4200v2
Stan Grishin [Wed, 6 Oct 2021 21:43:55 +0000 (21:43 +0000)]
luci-app-advanced-reboot: bugfix for Linksys E4200v2

* bugfix for Linksys E4200v2
* backport updates from master

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-mod-network: allow literal "auto" value for distance
Jo-Philipp Wich [Sun, 17 May 2020 17:36:17 +0000 (19:36 +0200)]
luci-mod-network: allow literal "auto" value for distance

Fixes: #4050
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 01d5d5f92963d9596a3c0b669a7e8d87b64132d5)

3 years agotree: remove erroneous luci-app-dawn ACL file
Hannu Nyman [Fri, 24 Sep 2021 16:26:55 +0000 (19:26 +0300)]
tree: remove erroneous luci-app-dawn ACL file

Remove ACL file accidentally added by ecd49247eb.
There is no luci-app-dawn in 19.07, so no ACL is needed.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agotreewide: i18n - Sync and backport translations
Hannu Nyman [Thu, 23 Sep 2021 15:23:31 +0000 (18:23 +0300)]
treewide: i18n - Sync and backport translations

Backport translations from master.
Sync translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agotreewide: i18n - Backport and sync translations
Hannu Nyman [Thu, 9 Sep 2021 15:04:57 +0000 (18:04 +0300)]
treewide: i18n - Backport and sync translations

Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoluci-app-attendedsysupgrade: use detail not message
Paul Spooren [Sun, 22 Aug 2021 10:07:20 +0000 (00:07 -1000)]
luci-app-attendedsysupgrade: use detail not message

The new API unifies all human readable responses in the `detail` field
to follow the newly used framework.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 2a29911121bf72d5d316b2eeae7f184b8ce14482)

3 years agoluci-app-attendedsysupgrade: use latest.json
Paul Spooren [Mon, 16 Aug 2021 04:52:18 +0000 (18:52 -1000)]
luci-app-attendedsysupgrade: use latest.json

The content is the same response as for `/api/latest.json` but
statically hosted by a webserver rather than Python generated.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit a672875402a0802ddcd0e4c8c2d0ac7913dff671)

3 years agoluci-app-attendedsysupgrade: show position in queue
Paul Spooren [Mon, 16 Aug 2021 04:50:49 +0000 (18:50 -1000)]
luci-app-attendedsysupgrade: show position in queue

The server provides a queue_position argument, show it.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 53ff7ca676d10fa253d3ab472b9b5645996527ed)

3 years agoluci-app-attendedsysupgrade: add timeout and catch
Paul Spooren [Mon, 9 Aug 2021 18:45:58 +0000 (08:45 -1000)]
luci-app-attendedsysupgrade: add timeout and catch

If the upgrade server API does not respond, show an error message.
Fix #5222

While at it, minimal code linting

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit ff24b78c807a52a0f9afb62ba0aba1085d9ad045)

3 years agoluci-app-attendedsysupgrade: fix empty array condition
Paul Spooren [Sun, 25 Jul 2021 22:36:19 +0000 (00:36 +0200)]
luci-app-attendedsysupgrade: fix empty array condition

In JavaScript (other than in Python) an empty array is considered `true`
within if statements. Fix this by checking for the array length rather
than its existence.

This fixes the issue of an empty dropdown menu in case the user is
running the latest release.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agotreewide: i18n - Sync and backport translations
Hannu Nyman [Tue, 10 Aug 2021 19:11:52 +0000 (22:11 +0300)]
treewide: i18n - Sync and backport translations

Sync translations.
Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoMerge pull request #5228 from stangri/19.07-firewall
Stan Grishin [Thu, 5 Aug 2021 01:58:08 +0000 (18:58 -0700)]
Merge pull request #5228 from stangri/19.07-firewall

[19.07] luci-app-firewall: replace hh.mm.ss with hh:mm:ss

3 years agoluci-app-firewall: replace hh.mm.ss with hh:mm:ss
Stan Grishin [Thu, 5 Aug 2021 01:57:02 +0000 (01:57 +0000)]
luci-app-firewall: replace hh.mm.ss with hh:mm:ss

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoMerge pull request #5218 from stangri/19.07-luci-app-https-dns-proxy
Stan Grishin [Wed, 4 Aug 2021 05:14:31 +0000 (22:14 -0700)]
Merge pull request #5218 from stangri/19.07-luci-app-https-dns-proxy

[19.07] luci-app-https-dns-proxy: update to 2021-07-29-1

3 years agoluci-app-https-dns-proxy: update to 2021-07-29-1
Stan Grishin [Sat, 31 Jul 2021 10:47:51 +0000 (10:47 +0000)]
luci-app-https-dns-proxy: update to 2021-07-29-1

* add HTTP/2-only supporting providers: Mullvad, Digitale-Gesellschaft, dns.sb and Rubyfish.cn
* switch default provider from Google to Cloudflare
* add IPv6 addresses for bootstrap resolvers for Google DNS
* add secondary bootstrap resolver (Cloudflare's) to all providers with a single bootstrap resolver
* modify model/cbi file to show HTTP/2-only providers (and help texts) on HTTP/2-supporting systems

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-mod-network: handle multiple mac for static lease
Ansuel Smith [Thu, 8 Oct 2020 00:43:29 +0000 (02:43 +0200)]
luci-mod-network: handle multiple mac for static lease

The mac section for the static lease doesn't correctly handle when multiple mac are set for a rule.
Fixes: #4291
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit 6c9a6c334e2fa55f4b64b64b85e0b104f0b99037)

3 years agoluci-app-attendedsysupgrade: sync with master branch
Paul Spooren [Fri, 2 Jul 2021 19:38:21 +0000 (09:38 -1000)]
luci-app-attendedsysupgrade: sync with master branch

Upgrade the app to stay compatible with the running upgrade server.

Signed-off-by: Paul Spooren <mail@aparcar.org>
3 years agothemes: Call striptags() on hostname to prevent XSS
Hauke Mehrtens [Tue, 8 Jun 2021 23:28:44 +0000 (01:28 +0200)]
themes: Call striptags() on hostname to prevent XSS

This calls striptags() on the hostname to prevent any XSS over the
hostname. This should fix CVE-2021-33425 as far as I understood it.

If someone adds some Javascript into system.@system[0].hostname it would
have been directly added to the page, this prevents the problem.

This can only be exploited by someone being able to modify the uci
configuration, normally a user with such privileges could also just
modify the webpage.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 5cbd79d7e31c0f0feaea2770bf102bbae7831e3c)

3 years agotreewide: i18n - Backport translations from master
Hannu Nyman [Tue, 8 Jun 2021 17:03:35 +0000 (20:03 +0300)]
treewide: i18n - Backport translations from master

Backport translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoluci-mod-status: fix potential XSS via specially crafted DNS names
Jo-Philipp Wich [Wed, 12 May 2021 09:49:31 +0000 (11:49 +0200)]
luci-mod-status: fix potential XSS via specially crafted DNS names

When an upstream NS returns PTR domain names containing HTML, it is
added verbatim to the connection status table.

Prevent this issue by HTML escaping any values in the source and
destination columns.

Fixes: CVE-2021-32019
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3c66c5b1651aa25afbff09bee45047da9a0ba43d)

3 years agotreewide: backport translations i18n
Hannu Nyman [Sat, 8 May 2021 14:09:09 +0000 (17:09 +0300)]
treewide: backport translations i18n

Backport translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agotreewide: i18n - Backport translations
Hannu Nyman [Sat, 17 Apr 2021 16:09:12 +0000 (19:09 +0300)]
treewide: i18n - Backport translations

Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoluci-base: form.js: fix AbstractValue.textvalue() for uci list options
Jo-Philipp Wich [Fri, 16 Apr 2021 15:29:32 +0000 (17:29 +0200)]
luci-base: form.js: fix AbstractValue.textvalue() for uci list options

Serialize the uci list value into a space separated string before passing
it to String.format() for HTML escaping. Without that change, empty strings
were returned whenever the underlying uci get operation yieled an array.

Fixes: #4993
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 5c792aefc744d1417fc9e24cfb92cd61cf8a651f)

3 years ago[19.07] luci-app-fwknopd: add support for ENABLE_CMD_EXEC
Ptilopsis Leucotis [Wed, 14 Apr 2021 07:06:50 +0000 (10:06 +0300)]
[19.07] luci-app-fwknopd: add support for ENABLE_CMD_EXEC

Add support for execution commands on the fwknopd server.

Signed-off-by: Ptilopsis Leucotis <PtilopsisLeucotis@yandex.com>
3 years agoMerge pull request #4976 from stangri/19.07-luci-app-simple-adblock
Stan Grishin [Sun, 11 Apr 2021 16:38:53 +0000 (09:38 -0700)]
Merge pull request #4976 from stangri/19.07-luci-app-simple-adblock

[19.07 luci-app-simple-adblock: bugfix: crash when dnsmasq.ipset selected

3 years agoluci-app-simple-adblock: bugfix: crash when dnsmasq.ipset selected
Stan Grishin [Sat, 10 Apr 2021 18:45:11 +0000 (18:45 +0000)]
luci-app-simple-adblock: bugfix: crash when dnsmasq.ipset selected

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-mod-system: implement system.description, system.notes
Henrique de Moraes Holschuh [Mon, 1 Mar 2021 16:18:00 +0000 (13:18 -0300)]
luci-mod-system: implement system.description, system.notes

Implement two new text "options" for UCI system config, intended to
help humans describe the device.

"system.description" is a short, single-line description suitable for
selector UIs in remote administration applications, or remote UCI (over
ubus RPC), etc.  It would also be suitable as a default for LLDP/SNMP
"system description".

"system.notes" is a multi-line, free-form text field that can be used in
any way the user wishes, e.g. to hold installation notes, or unit serial
number and inventory number, location, etc.

Signed-off-by: Henrique de Moraes Holschuh <henrique@nic.br>
3 years agotreewide: Backport translations and sync
Hannu Nyman [Sat, 27 Mar 2021 09:05:01 +0000 (11:05 +0200)]
treewide: Backport translations and sync

Backport from master and sync translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoluci-app-opkg: fix parsing empty package repository indexes
Jo-Philipp Wich [Sat, 20 Mar 2021 16:15:48 +0000 (17:15 +0100)]
luci-app-opkg: fix parsing empty package repository indexes

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3bcbcbf0889142ca19b893f41318963b69de90ab)

3 years agotreewide: i18n backport and sync
Hannu Nyman [Sat, 13 Mar 2021 07:45:36 +0000 (09:45 +0200)]
treewide: i18n backport and sync

Backport translations from master and sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoMerge pull request #4908 from stangri/19.07-luci-app-vpn-policy-routing
Stan Grishin [Sat, 13 Mar 2021 03:06:27 +0000 (19:06 -0800)]
Merge pull request #4908 from stangri/19.07-luci-app-vpn-policy-routing

[19.07] luci-app-vpn-policy-routing: explicit package version

3 years agoMerge pull request #4905 from stangri/19.07-luci-app-simple-adblock
Stan Grishin [Sat, 13 Mar 2021 03:06:10 +0000 (19:06 -0800)]
Merge pull request #4905 from stangri/19.07-luci-app-simple-adblock

[19.07] luci-app-simple-adblock: explicit package version

3 years agoMerge pull request #4902 from stangri/19.07-luci-app-https-dns-proxy
Stan Grishin [Sat, 13 Mar 2021 03:05:50 +0000 (19:05 -0800)]
Merge pull request #4902 from stangri/19.07-luci-app-https-dns-proxy

[19.07] luci-app-https-dns-proxy: explicit package version

3 years agoMerge pull request #4899 from stangri/19.07-luci-app-advanced-reboot
Stan Grishin [Sat, 13 Mar 2021 03:05:31 +0000 (19:05 -0800)]
Merge pull request #4899 from stangri/19.07-luci-app-advanced-reboot

[19.07] luci-app-advanced-reboot: explicit package version

3 years agoMerge pull request #4844 from oofnikj/4510_backport_gre
Florian Eckert [Thu, 11 Mar 2021 07:04:23 +0000 (08:04 +0100)]
Merge pull request #4844 from oofnikj/4510_backport_gre

 luci-proto-gre: backport to 19.07

3 years agoluci-app-vpn-policy-routing: explicit package version
Stan Grishin [Wed, 10 Mar 2021 15:21:35 +0000 (15:21 +0000)]
luci-app-vpn-policy-routing: explicit package version

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-app-simple-adblock: explicit package version
Stan Grishin [Wed, 10 Mar 2021 15:20:22 +0000 (15:20 +0000)]
luci-app-simple-adblock: explicit package version

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-app-https-dns-proxy: explicit package version
Stan Grishin [Wed, 10 Mar 2021 15:19:28 +0000 (15:19 +0000)]
luci-app-https-dns-proxy: explicit package version

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-app-advanced-reboot: explicit package version
Stan Grishin [Wed, 10 Mar 2021 15:10:57 +0000 (15:10 +0000)]
luci-app-advanced-reboot: explicit package version

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoMerge pull request #4884 from stangri/19.07-luci-app-https-dns-proxy
Stan Grishin [Wed, 10 Mar 2021 04:35:34 +0000 (20:35 -0800)]
Merge pull request #4884 from stangri/19.07-luci-app-https-dns-proxy

[19.07] luci-app-https-dns-proxy: bugfix: layout issues on theme-openwrt-2020

3 years agoMerge pull request #4887 from stangri/19.07-luci-app-simple-adblock
Stan Grishin [Wed, 10 Mar 2021 04:35:15 +0000 (20:35 -0800)]
Merge pull request #4887 from stangri/19.07-luci-app-simple-adblock

[19.07] luci-app-simple-adblock: bugfix: template layout on theme-openwrt-2020

3 years agoMerge pull request #4890 from stangri/19.07-luci-app-vpn-policy-routing
Stan Grishin [Wed, 10 Mar 2021 04:34:56 +0000 (20:34 -0800)]
Merge pull request #4890 from stangri/19.07-luci-app-vpn-policy-routing

[19.07] luci-app-vpn-policy-routing: bugfix: template layout on theme-openwrt-2020

3 years agoluci-app-vpn-policy-routing: bugfix: template layout on theme-openwrt-2020
Stan Grishin [Mon, 8 Mar 2021 10:49:09 +0000 (10:49 +0000)]
luci-app-vpn-policy-routing: bugfix: template layout on theme-openwrt-2020

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-app-simple-adblock: bugfix: template layout on theme-openwrt-2020
Stan Grishin [Mon, 8 Mar 2021 10:46:43 +0000 (10:46 +0000)]
luci-app-simple-adblock: bugfix: template layout on theme-openwrt-2020

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-app-https-dns-proxy: bugfix: layout issues on theme-openwrt-2020
Stan Grishin [Mon, 8 Mar 2021 10:42:18 +0000 (10:42 +0000)]
luci-app-https-dns-proxy: bugfix: layout issues on theme-openwrt-2020

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoMerge pull request #4871 from stangri/19.07-luci-app-vpn-policy-routing
Stan Grishin [Wed, 3 Mar 2021 21:18:09 +0000 (13:18 -0800)]
Merge pull request #4871 from stangri/19.07-luci-app-vpn-policy-routing

[19.07] luci-app-vpn-policy-routing: sync with principal app

3 years agoluci-app-vpn-policy-routing: sync with principal app
Stan Grishin [Wed, 3 Mar 2021 21:17:01 +0000 (21:17 +0000)]
luci-app-vpn-policy-routing: sync with principal app

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-app-firewall: allow negative prefix lengths
Jo-Philipp Wich [Mon, 1 Mar 2021 14:18:25 +0000 (15:18 +0100)]
luci-app-firewall: allow negative prefix lengths

Fixes: #4812
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f64b3d509446cc78a7df746b174bdab330f23ab2)

3 years agoluci-base: validation.js: optionally support negative prefixes
Jo-Philipp Wich [Mon, 1 Mar 2021 14:16:14 +0000 (15:16 +0100)]
luci-base: validation.js: optionally support negative prefixes

Support negative prefix length in the `cidr`, `cidr4`, `cidr6`, `ipmask`,
`ipmask4` and `ipmask6` data types when an optional truish flag is passed
to the datatype name.

Ref: #4812
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit cd06e708d8d8037486b77dab3389ca91a88f2dd0)

3 years agoluci-base: network.js: sort interface statuses by metric, then name
Jo-Philipp Wich [Mon, 1 Mar 2021 09:42:10 +0000 (10:42 +0100)]
luci-base: network.js: sort interface statuses by metric, then name

Fixes: #4693
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0ee422b4c0e266f0ece70fa60e0ebfa84851992e)

3 years agoluci-proto-gre: update i18n and fix typo
Sergio E. Nemirowski [Sun, 22 Nov 2020 15:29:24 +0000 (18:29 +0300)]
luci-proto-gre: update i18n and fix typo

Signed-off-by: Sergio E. Nemirowski <sergio@outerface.net>
Signed-off-by: Jordan Sokolic <oofnik@gmail.com>
3 years agoluci-app-firewall: zones.js: fix HTML display in ct helper selection
Jo-Philipp Wich [Mon, 1 Mar 2021 08:09:35 +0000 (09:09 +0100)]
luci-app-firewall: zones.js: fix HTML display in ct helper selection

Fixes: #4845
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 154117ff05d0ecbe97ee98493bb647f526166b50)

3 years agoluci-app-firewall: fix creating multiple networks from zone network selector
Jo-Philipp Wich [Mon, 1 Mar 2021 07:54:26 +0000 (08:54 +0100)]
luci-app-firewall: fix creating multiple networks from zone network selector

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 5d528da29f3b03deba0144c85d862e1e4468ff25)

3 years agoluci-base: firewall.js: manage zomne networks as list
Jo-Philipp Wich [Mon, 1 Mar 2021 07:54:06 +0000 (08:54 +0100)]
luci-base: firewall.js: manage zomne networks as list

Fixes: #4827
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 49ecaf60902be2e43ccec3c61bc6b7d0b41da251)

3 years agorpcd-mod-luci: Fix parsing of DUID-LLT's in duid2ea
Niels Widger [Thu, 25 Feb 2021 20:31:00 +0000 (15:31 -0500)]
rpcd-mod-luci: Fix parsing of DUID-LLT's in duid2ea

Fix parsing of DUID-LLT's in duid2ea.  Unlike DUID-LL's, DUID-LLT's have a 32-bit time field between the hardware type and link-layer address fields, see RFC 3315 Sections 9.2 and 9.4:

https://tools.ietf.org/html/rfc3315#section-9.2
https://tools.ietf.org/html/rfc3315#section-9.4

therefore, the link-layer address starts at offset 16 instead of 8.

Signed-off-by: Niels Widger <niels@qacafe.com>
(cherry picked from commit 8920a2bf71e544fada3de824126a5c8f1c596b63)

3 years agoluci-proto-gre: remove extra parenthesis
Chuanhong Guo [Thu, 5 Nov 2020 13:22:18 +0000 (21:22 +0800)]
luci-proto-gre: remove extra parenthesis

fix the following error:
SyntaxError
Unexpected token ')'
  in http://192.168.122.131/luci-static/resources/protocol/grev6.js:?
  at http://192.168.122.131/luci-static/resources/luci.js:22
  at async Promise.all (index 4)
  at async Promise.all (index 5)

Fixes: 2b7fd1292 ("luci-proto-gre: improvement of LuCI interface")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
3 years agoluci-proto-gre: improvement of LuCI interface
Jan Bětík [Sat, 10 Oct 2020 21:48:17 +0000 (23:48 +0200)]
luci-proto-gre: improvement of LuCI interface

Better handling of Type of Service (IPv4), Traffic Class (IPv6) values
Optional value Local endpoint address is detected and pre-filled in the interface

Signed-off-by: Jan Bětík <jan.betik@svine.su>
3 years agoluci-proto-gre: Protocol extension for GRE tunnels
Jan Bětík [Fri, 3 Apr 2020 17:11:53 +0000 (19:11 +0200)]
luci-proto-gre: Protocol extension for GRE tunnels

I'm running several GRE tunnels to different locations and
the option to see and to configure GRE tunnels in LuCI was not
crucial but nice to have.

Signed-off-by: Jan Bětík <jan.betik@svine.su>
3 years agotreewide: i18n backport and sync translations
Hannu Nyman [Thu, 25 Feb 2021 15:18:02 +0000 (17:18 +0200)]
treewide: i18n backport and sync translations

Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoMerge pull request #4830 from stangri/19.07-luci-app-https-dns-proxy
Stan Grishin [Tue, 23 Feb 2021 00:56:11 +0000 (16:56 -0800)]
Merge pull request #4830 from stangri/19.07-luci-app-https-dns-proxy

luci-app-https-dns-proxy: add Force DNS, IDNet support, add missing class to buttons

3 years agoluci-app-https-dns-proxy: add Force DNS, IDNet support, add missing class to buttons
Stan Grishin [Tue, 23 Feb 2021 00:54:04 +0000 (00:54 +0000)]
luci-app-https-dns-proxy: add Force DNS, IDNet support, add missing class to buttons

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-base: ui.js: resolve parent ul early in UIDropdown.toggleItem()
Jo-Philipp Wich [Fri, 19 Feb 2021 09:39:00 +0000 (10:39 +0100)]
luci-base: ui.js: resolve parent ul early in UIDropdown.toggleItem()

The parent node of the current li might be null after collapsing the
dropdown, so resolve the parent ul early to avoid passing null to
subsequent calls.

Fixes clearing custom input values in DynamicList dropdowns.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b8d2bcd432ab23a883de1dd4fbce29f9751a6e84)

3 years agoluci-app-firewall: properly handle custom multi IP/MAC input
Jo-Philipp Wich [Fri, 19 Feb 2021 10:29:14 +0000 (11:29 +0100)]
luci-app-firewall: properly handle custom multi IP/MAC input

Store multiple space separated custom address values as separate uci
list items in the configuration.

Fixes: #4822
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b60be8cfd82e83818013fafce00c9433e0c38376)

3 years agoluci-app-ddns: fix multiple authenticated RCEs
Jo-Philipp Wich [Wed, 17 Feb 2021 17:18:14 +0000 (18:18 +0100)]
luci-app-ddns: fix multiple authenticated RCEs

The ddns detail model passes unsanitized values directly to sys.call() in
various places, which allows injecting arbitrary commands through a number
of fields.

Prevent that issue by quoting the values used in command invocations.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
3 years agotreewide: i18n backport and sync translations
Hannu Nyman [Sat, 13 Feb 2021 08:33:55 +0000 (10:33 +0200)]
treewide: i18n backport and sync translations

Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoMerge pull request #4795 from stangri/19.07-luci-app-simple-adblock
Stan Grishin [Wed, 10 Feb 2021 01:59:01 +0000 (17:59 -0800)]
Merge pull request #4795 from stangri/19.07-luci-app-simple-adblock

[19.07] luci-app-simple-adblock: bugfix: default values for ListValue

3 years agoluci-app-simple-adblock: bugfix: default values for ListValue
Stan Grishin [Wed, 10 Feb 2021 01:12:19 +0000 (01:12 +0000)]
luci-app-simple-adblock: bugfix: default values for ListValue

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-base: luci.js: fix sortedKeys() ordering
Jo-Philipp Wich [Tue, 9 Feb 2021 23:02:59 +0000 (00:02 +0100)]
luci-base: luci.js: fix sortedKeys() ordering

Chrome does not properly sort arrays when the sort function returns boolean
results, in contrast to Firefox which does.

Fix the issue by returning a numerical result instead.

Fixes: #4792
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3c166c25de535c5c5aeda1d40eba6c1756c412be)

3 years agoMerge pull request #4766 from stangri/19.07-luci-app-https-dns-proxy
Stan Grishin [Fri, 5 Feb 2021 18:46:38 +0000 (10:46 -0800)]
Merge pull request #4766 from stangri/19.07-luci-app-https-dns-proxy

[19.07] luci-app-https-dns-proxy: add nextdns.io and quad 101 providers

3 years agoluci-app-https-dns-proxy: add nextdns.io and quad 101 providers
Stan Grishin [Fri, 5 Feb 2021 05:52:41 +0000 (05:52 +0000)]
luci-app-https-dns-proxy: add nextdns.io and quad 101 providers

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agotimezone data: update to 2021a
Hannu Nyman [Fri, 29 Jan 2021 18:52:48 +0000 (20:52 +0200)]
timezone data: update to 2021a

Update timezone data to 2021a.

http://mm.icann.org/pipermail/tz-announce/2021-January/000065.html

* South Sudan changes from +03 to +02

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit af1f961589e9c339a774d42682b9978eabaebcfd)

3 years agotreewide: i18n - Sync and backport translations from master
Hannu Nyman [Fri, 29 Jan 2021 18:57:29 +0000 (20:57 +0200)]
treewide: i18n - Sync and backport translations from master

Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoluci-app-sqm: remove orphaned ACL file
Florian Eckert [Thu, 21 Jan 2021 06:17:35 +0000 (07:17 +0100)]
luci-app-sqm: remove orphaned ACL file

Remove a backport artefact. For the openwrt-19.07 branch, luci-app-sqm
is maintained in the packages feed.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
3 years agoluci-mod-network: properly handle wireless devices when adding interfaces
Jo-Philipp Wich [Sat, 12 Dec 2020 11:15:33 +0000 (12:15 +0100)]
luci-mod-network: properly handle wireless devices when adding interfaces

Wireless device names must not be added as list/option ifname, but the
network must be backreferenced in config wifi-iface instead in these
cases.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 7b5b7fbcd63af14658ad234cd39c076a823e4629)

3 years agotreewide: i18n - backport translations from master
Hannu Nyman [Sat, 16 Jan 2021 09:08:51 +0000 (11:08 +0200)]
treewide: i18n - backport translations from master

Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agoMerge pull request #4730 from stangri/19.07-luci-app-https-dns-proxy
Stan Grishin [Wed, 13 Jan 2021 12:04:16 +0000 (04:04 -0800)]
Merge pull request #4730 from stangri/19.07-luci-app-https-dns-proxy

[19.07] luci-app-https-dns-proxy: DSCP tagging support

3 years agoluci-app-https-dns-proxy: DSCP tagging support
Stan Grishin [Wed, 13 Jan 2021 12:01:52 +0000 (12:01 +0000)]
luci-app-https-dns-proxy: DSCP tagging support

Signed-off-by: Stan Grishin <stangri@melmac.net>
3 years agoluci-base: correct button name on flash page help text
Hannu Nyman [Tue, 12 Jan 2021 17:01:05 +0000 (19:01 +0200)]
luci-base: correct button name on flash page help text

Correct the help text in the flash page to match the current
buttons. 'Continue' instead of "Proceed".

Adjust translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit e2ac2e92b0de9f4be78b090ad7fc62a8df222b37
 languages not existing in 19.07 removed from the commit)

3 years agotimezone data: update to 2020f
Hannu Nyman [Sat, 9 Jan 2021 18:18:22 +0000 (20:18 +0200)]
timezone data: update to 2020f

Update timezone data to 2020f.

2020e: http://mm.icann.org/pipermail/tz-announce/2020-December/000063.html
       Volgograd switches to Moscow time.
       Australia/Currie removed as identical to Australia/Hobart
2020f: http://mm.icann.org/pipermail/tz-announce/2020-December/000064.html

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 9e4391e3a62dc0f7dc64720a1ca79b477099dc28)

3 years agoluci-theme-rosy: Remove BROKEN theme
Hannu Nyman [Tue, 29 Dec 2020 12:30:11 +0000 (14:30 +0200)]
luci-theme-rosy: Remove BROKEN theme

Remove the Rosy theme that has been marked broken in master
for over a year, and in openwrt-19.07 since March 2020.

Reference to
https://github.com/openwrt/luci/issues/3759#issuecomment-599436159

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agotreewide: i18n - backport again
Hannu Nyman [Tue, 29 Dec 2020 11:36:34 +0000 (13:36 +0200)]
treewide: i18n - backport again

Backport translations again, after fixing the weblate
conflicts in master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
3 years agotreewide: i18n - backport translations
Hannu Nyman [Tue, 29 Dec 2020 11:18:10 +0000 (13:18 +0200)]
treewide: i18n - backport translations

Backport translations from master.
Sync translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>