Commit graph

12484 commits

Author SHA1 Message Date
Jo-Philipp Wich
ad33852de0 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 993151504e)
2021-12-23 17:10:32 +01:00
Hannu Nyman
e2a873196a treewide: Backport translations from master - i18n
Backport translations.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-12-18 10:08:02 +02:00
Jo-Philipp Wich
ab3595b12a 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 e982c05671)
2021-11-23 19:13:00 +01:00
Jo-Philipp Wich
8bd4e78ff2 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 d4092b15ce)
2021-11-10 11:58:15 +01:00
Hannu Nyman
6335d0fed2 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 0740023a3c)
2021-10-28 21:30:21 +03:00
Hannu Nyman
792c94f038 treewide: Backport i18n translations
Backport translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-10-19 22:25:45 +03:00
Stan Grishin
fde7889c73
Merge pull request #5414 from stangri/19.07-luci-app-advanced-reboot
[19.07] luci-app-advanced-reboot: bugfix for Linksys E4200v2
2021-10-06 14:53:40 -07:00
Stan Grishin
3d193a9bbe luci-app-advanced-reboot: bugfix for Linksys E4200v2
* bugfix for Linksys E4200v2
* backport updates from master

Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-10-06 21:51:59 +00:00
Jo-Philipp Wich
79af8973e0 luci-mod-network: allow literal "auto" value for distance
Fixes: #4050
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 01d5d5f929)
2021-09-28 08:58:09 -10:00
Hannu Nyman
15249724cf 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>
2021-09-24 19:26:55 +03:00
Hannu Nyman
309cd7d507 treewide: i18n - Sync and backport translations
Backport translations from master.
Sync translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-09-23 18:23:31 +03:00
Hannu Nyman
fc2ff4dc62 treewide: i18n - Backport and sync translations
Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-09-09 18:04:57 +03:00
Paul Spooren
53f59d35cc 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 2a29911121)
2021-08-25 21:52:00 -10:00
Paul Spooren
1e65672ab2 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 a672875402)
2021-08-25 21:52:00 -10:00
Paul Spooren
f9bc5da365 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 53ff7ca676)
2021-08-25 21:52:00 -10:00
Paul Spooren
dc626d506d 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 ff24b78c80)
2021-08-25 21:52:00 -10:00
Paul Spooren
505b671c21 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>
2021-08-25 21:52:00 -10:00
Hannu Nyman
b41f37739e treewide: i18n - Sync and backport translations
Sync translations.
Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-08-10 22:11:52 +03:00
Stan Grishin
5294ba2062
Merge pull request #5228 from stangri/19.07-firewall
[19.07] luci-app-firewall: replace hh.mm.ss with hh:mm:ss
2021-08-04 18:58:08 -07:00
Stan Grishin
78a070de59 luci-app-firewall: replace hh.mm.ss with hh:mm:ss
Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-08-05 01:57:02 +00:00
Stan Grishin
86a3625348
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
2021-08-03 22:14:31 -07:00
Stan Grishin
e259f12211 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>
2021-07-31 10:58:13 +00:00
Ansuel Smith
7b931da477 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 6c9a6c334e)
2021-07-08 08:27:20 +02:00
Paul Spooren
9eb2efd141 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>
2021-07-04 18:11:06 -10:00
Hauke Mehrtens
15ca915da9 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 5cbd79d7e3)
2021-06-09 21:07:45 +02:00
Hannu Nyman
91f3929500 treewide: i18n - Backport translations from master
Backport translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-06-08 20:03:35 +03:00
Jo-Philipp Wich
d0cf6e4a57 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 3c66c5b165)
2021-05-12 12:03:19 +02:00
Hannu Nyman
ec81a49945 treewide: backport translations i18n
Backport translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-05-08 17:09:09 +03:00
Hannu Nyman
c19c7167e3 treewide: i18n - Backport translations
Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-04-17 19:09:12 +03:00
Jo-Philipp Wich
d763f9767e 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 5c792aefc7)
2021-04-16 17:33:04 +02:00
Ptilopsis Leucotis
5b28343fbe [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>
2021-04-14 10:17:39 +03:00
Stan Grishin
c56d9f2f58
Merge pull request #4976 from stangri/19.07-luci-app-simple-adblock
[19.07 luci-app-simple-adblock: bugfix: crash when dnsmasq.ipset selected
2021-04-11 09:38:53 -07:00
Stan Grishin
bf1b37b0c2 luci-app-simple-adblock: bugfix: crash when dnsmasq.ipset selected
Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-04-10 18:45:11 +00:00
Henrique de Moraes Holschuh
254083c17c 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>
2021-04-06 23:21:46 +03:00
Hannu Nyman
7456e2aada treewide: Backport translations and sync
Backport from master and sync translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-03-27 11:05:01 +02:00
Jo-Philipp Wich
41ab871af0 luci-app-opkg: fix parsing empty package repository indexes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3bcbcbf088)
2021-03-20 17:16:20 +01:00
Hannu Nyman
731d2e37d4 treewide: i18n backport and sync
Backport translations from master and sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-03-13 09:45:36 +02:00
Stan Grishin
55da49fe80
Merge pull request #4908 from stangri/19.07-luci-app-vpn-policy-routing
[19.07] luci-app-vpn-policy-routing: explicit package version
2021-03-12 19:06:27 -08:00
Stan Grishin
b1ddaa662c
Merge pull request #4905 from stangri/19.07-luci-app-simple-adblock
[19.07] luci-app-simple-adblock: explicit package version
2021-03-12 19:06:10 -08:00
Stan Grishin
67dcd1c2d0
Merge pull request #4902 from stangri/19.07-luci-app-https-dns-proxy
[19.07] luci-app-https-dns-proxy: explicit package version
2021-03-12 19:05:50 -08:00
Stan Grishin
0f30222997
Merge pull request #4899 from stangri/19.07-luci-app-advanced-reboot
[19.07] luci-app-advanced-reboot: explicit package version
2021-03-12 19:05:31 -08:00
Florian Eckert
b4025cf242
Merge pull request #4844 from oofnikj/4510_backport_gre
luci-proto-gre: backport to 19.07
2021-03-11 08:04:23 +01:00
Stan Grishin
bad5bf8f2c luci-app-vpn-policy-routing: explicit package version
Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-03-10 15:21:35 +00:00
Stan Grishin
2aebe454e7 luci-app-simple-adblock: explicit package version
Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-03-10 15:20:22 +00:00
Stan Grishin
e28381b0bb luci-app-https-dns-proxy: explicit package version
Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-03-10 15:19:28 +00:00
Stan Grishin
57d4c965e2 luci-app-advanced-reboot: explicit package version
Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-03-10 15:10:57 +00:00
Stan Grishin
310f532e26
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
2021-03-09 20:35:34 -08:00
Stan Grishin
88e19b940d
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
2021-03-09 20:35:15 -08:00
Stan Grishin
193f40d30c
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
2021-03-09 20:34:56 -08:00
Stan Grishin
c079f601e3 luci-app-vpn-policy-routing: bugfix: template layout on theme-openwrt-2020
Signed-off-by: Stan Grishin <stangri@melmac.net>
2021-03-08 10:49:09 +00:00