Commit graph

1977 commits

Author SHA1 Message Date
Jo-Philipp Wich
4fc4c794a0 luci-base: iface_get_network(): fix condition
Fixes: #3717
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-04 08:19:01 +01:00
Jo-Philipp Wich
e513230622 luci-base: iface_get_network(): fix condition
Fixes: #3715
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-03 20:36:54 +01:00
Jo-Philipp Wich
41e2258d6d luci-base: cbi.js: fix unintended number sign overflow in format
Fixes: #3003
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 6d9a23af60)
2020-01-29 14:41:34 +01:00
Hannu Nyman
3a3d8f4939 i18n: sync translations
Sync translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2019-11-30 11:35:52 +02:00
Jo-Philipp Wich
7a3f0dd6d4 treewide: fix "Unhandled token" errors with Lua CBI maps
The `data-type` attribute is used to bind datatype validators to a widget
while some templates used the same attribute to denote the name of the
underlying widget.

Change the `data-type` attributes referring to the widget name to
`data-widget` in order to stop the JS token error spam.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 13e9e3e9e8)
2019-11-16 18:28:39 +01:00
Jo-Philipp Wich
ca98eae724 luci-compat: add transitional package
Add an empty luci-compat package to allow forward compatibility with
openwrt-19.07 and master for packages that support all three branches.

Ref: https://forum.openwrt.org/t/luci-compat-and-18-06/48369
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-14 11:21:09 +01:00
Jo-Philipp Wich
bc17ef673f luci-mod-admin-full: proper SSID escaping in wifi join and iface overview
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-05 14:32:09 +01:00
Yousong Zhou
a32190c0b2 luci-mod-system: validate log_ip as "host" instead of just ipaddr
Fixes FS#2444

A replicate of commit 90051b685 on master branch

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-11-04 03:03:13 +00:00
Jo-Philipp Wich
ee38da958a luci-base: fix CSRF prevention for arcombine targets
The dispatcher failed to propagate the child target post security
requirements to the arcombine() dispatch target so far - fix this
by recursively testing the post security requirements.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f8c6eb67cd)
2019-10-09 09:57:51 +02:00
Hannu Nyman
f8775ee5fe timezone data: update to 2019c
Update timezone data to 2019c

http://mm.icann.org/pipermail/tz-announce/2019-September/000057.html

2019c:
* Fiji observes DST from 2019-11-10 to 2020-01-12.
* Norfolk Island starts observing Australian-style DST.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit cf887ba62f)
2019-09-28 21:56:44 +03:00
Jo-Philipp Wich
14d2f9b216 luci-base: html escape values in uci changes display
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 7513a4ca35)
2019-09-10 17:20:27 +02:00
Jo-Philipp Wich
ff4c722a21 luci-base, luci-mod-network: fix bridge state change quirks
Fixes: #2997
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit fe0e4f8b4d)
2019-09-10 17:20:27 +02:00
Jo-Philipp Wich
7995ef34b5 luci-mod-system: prevent clearing rc.local on unrelated submit actions
Fixes: #2760
Fixes: 1c09ee5e4 ("luci-mod-system: fix SimpleForm usage on file editing pages")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1aa13ed51e)
2019-08-21 17:50:08 +02:00
Jo-Philipp Wich
89e029c59f luci-base: index.html: add extend cache-control directive
Fixes: #2942
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1fe45a9344)
2019-08-01 15:44:52 +02:00
xiongjie
44efaf5777 luci-base: redirect root path to /cgi-bin/luci/
Fix openwrt/luci#1062
Signed-off-by: MonwF <boluo2@gmail.com>
(cherry picked from commit fd3d2b468f)
2019-08-01 15:44:51 +02:00
Jo-Philipp Wich
28ab21dd8d luci-base: handle application/json replies with charset specification
On my router, the response header Content-Type is
`application/json; charset=UTF-8` instead of `application/json`, so
almost every feature is broken.

Fixes: #2851
Suggested-by: zhanhb <6323014+zhanhb@users.noreply.github.com>
[reword commit subject]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-26 12:46:39 +02:00
Yousong Zhou
dbaae4a815 luci-base: hide autocomplete-preventing password input with bigger offset
Fixes openwrt/luci#2624

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(cherry picked from commit 3a24c2dbaa)
2019-07-06 15:10:25 +00:00
Yousong Zhou
4235fb0125 luci-base: nowrap for password input and reveal button
Fixes openwrt/luci#2624

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(cherry-picked from commit 609f5290c8)
2019-07-06 15:10:25 +00:00
Jo-Philipp Wich
9e3f710cac luci-base: remove fake password field from tab order
Set a negative tabindex on the dummy password field to not break the form
tab order flow.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(cherry picked from commit 8c77975d1b)
2019-07-06 15:10:03 +00:00
Hannu Nyman
cbc000bc5c timezone data: update to 2019b
Update timezone data to 2019b

http://mm.icann.org/pipermail/tz-announce/2018-December/000055.html
http://mm.icann.org/pipermail/tz/2019-July/028249.html

2019a:
* Palestine "springs forward" on 2019-03-30 instead of 2019-03-23.
* Brazil no longer observes DST.

2019b:
* Palestine's 2019 spring-forward transition was on 03-29, not 03-30.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 2f769ee087)
2019-07-05 18:03:07 +03:00
Hannu Nyman
9bab4ba393 luci-base: show niced processes on Status/Processes page
Modify the process status filter to allow also the processes
with a nice value to be visible on the Status/Processes page.

Filter out the top process itself.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 1c80eb1962)
2019-06-30 19:57:31 +03:00
Jo-Philipp Wich
9fc05682f6 luci-mod-system: fix SimpleForm usage on file editing pages
When a value identical to the stored one is submitted, the CBI framework
will not emit an option write event and therfore not store the value in
the form data dictionary passed to SimpleForm.handle().

This usage pattern usally works be accident for file editor views such
as admin_system/crontab because \r\n windows style line endings are
substituted with unix \n ones before writing the data, defeating the
equality check in CBI.

When a single line without trailing newline is submitted however, the
CBI will not see a difference to the data stored in the file and clear
out the value on subsequent saves.

This commit alignes the logic used by various SimpleForm views to
behave identically and predictable:

 - File data is handled in the SimpleForm.handle() callback
 - The forcewrite property is used to disable equality checks
 - Submission of an empty string empties the backing file

Fixes: #2737
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1c09ee5e42)
2019-06-05 16:16:48 +02:00
Jo-Philipp Wich
84692e5bf6 luci-mod-admin-network: fix VLAN "add" button for empty switches
Fixes OpenWrt FS#2270.

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2270
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 6b7afabcdd)
2019-05-07 08:56:03 +02:00
Jo-Philipp Wich
23029f5163 treewide: avoid double-escaping CBI section labels
Since the section labels are already HTML-escaped implicitely by the
striptags() function, we must not escape them again in attr() or
ifattr().

Fixes: #2524
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit eda8f02dac)
2019-02-12 08:35:02 +01:00
Jo-Philipp Wich
28e852f4e0 luci-base: dispatcher: support raw values in attr() and ifattr()
Extend the attr() and ifattr() template functions to take an optional
further parameter indicating that the passed value should not be escaped.

This is needed for cases where the input already is escaped through
other means, e.g. when the value was previously filtered through the
striptags() template helper.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4141243762)
2019-02-12 08:34:01 +01:00
Jo-Philipp Wich
4c45a52592 luci-mod-rpc: drop "secret" value from rpc session objects
Drop the "secret" value from RPC session objects in order to make them
compatible with ordinary web sessions used by the LuCI web interface.

That secret value was never used for anything and is the only difference
compared to normal LuCI login sessions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 766643fcf1)
2019-01-30 16:52:18 +01:00
Anton Kikin
6f6641d97d luci-base: fix UCI changelog markup mistake
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
(cherry picked from commit 43c7cb344c)
2019-01-20 12:34:55 +01:00
Jo-Philipp Wich
a11f4ac2eb treewide: rework uci change display
- Use native rpcd uci changes format instead of incompletely converting
   back and forth between the old and the new format
 - Rework uci changelog template to print the equivalent uci commands
   for the various changes
 - Rework theme headers to properly count the uncomitted changes
 - Rework theme CSS to properly style new changelog

Fixes: #2170

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 849d153851)
2019-01-20 12:28:39 +01:00
Jo-Philipp Wich
f1a5b179dd luci-base: fix cbi dropdown quirks with MS Edge
On MS Edge, the behaviour of "value" attributes on "li" elements is
unreliable, so use the "data-" prefix to circumvent the problem.

Ref: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/19320991/
Fixes: #2224
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9e6949849d)
2019-01-20 12:00:37 +01:00
Jo-Philipp Wich
1f423b1141
Merge pull request #2451 from pmelange/backport/PR2450-luci_mod-freifunk_basics
Backport 18.06: luci-mod-freifunk: fix the list of community profiles
2019-01-11 16:14:56 +01:00
pmelange
14456d30fb luci-mod-freifunk: fix the list of community profiles
Signed-off-by: pmelange <isprotejesvalkata@gmail.com>
2019-01-11 14:00:15 +01:00
pmelange
fb9721244c luci-mod-freifunk: replace calls to get_all() with separate get() calls
The get_all() function has changed and how it was used before no
longer works properly.  These changes not only change to individual
get() calls, but actually adds to the readability of the code and reduces
file size.

Signed-off-by: pmelange <isprotejesvalkata@gmail.com>
2019-01-11 13:01:42 +01:00
Hannu Nyman
04d60f2144 timezone data: update to 2018i
Update timezone data to 2018i

http://mm.icann.org/pipermail/tz-announce/2018-December/000053.html
http://mm.icann.org/pipermail/tz-announce/2018-December/000054.html

2018h:
* Qyzylorda, Kazakhstan moved from +06 to +05 on 2018-12-21.
* New zone Asia/Qostanay because Qostanay, Kazakhstan didn't move.
* Metlakatla, Alaska observes PST this winter only.
* Guess Morocco will continue to adjust clocks around Ramadan.
* Add predictions for Iran from 2038 through 2090.

2018i:
* São Tomé and Príncipe switches from +01 to +00 on 2019-01-01.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit c7776c8959)
2019-01-02 21:35:08 +02:00
Philipp Borgers
02bd34be15 get rid of library version numbers in luci olsrd code
Signed-off-by: Philipp Borgers <borgers@mi.fu-berlin.de>
2018-12-06 19:14:23 +01:00
pmelange
12b0b31bb3 luci-base: network.lua add ipv6-prefix-assignment support to get_status_by_address
Signed-off-by: pmelange <isprotejesvalkata@gmail.com>
2018-12-06 19:06:04 +01:00
Hannu Nyman
5e8708345e luci-mod-network: adapt to current 802.11r defaults
The default for 802.11r option ft_psk_generate_local
was changed a few months ago by openwrt/openwrt@3cc56a5

That change was a bit awkward, as it made hostapd to
overlook the possibly existing r0kh values by default
unless the user explicitly disables the new default.

Adapt LuCI by changing the default for ft_psk_generate_local
into 'enabled'.

But ensure that LuCI does not delete the existing key values
by not making the r0kh and r1kh fields to depend on this.

Note that this is just a quick fix for the wrong default value
causing problems, but not yet a complete fix for all the options.
In the long run it might be better to make the detail options
to depend on local generation.

Reference also to LuCI PR #2102

Adapted from commit 26e903c74 in master

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-11-25 09:27:05 +02:00
Zheng Qian
d6925de333 i18n: luci-base: update Simplified Chinese translation
Signed-off-by: Zheng Qian <sotux82@gmail.com>
2018-11-14 10:26:55 +08:00
Hannu Nyman
0cfd99cb0f i18n: sync translations
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-11-09 23:35:09 +02:00
Martin Schiller
01fe783494 i18n: fix german base.po
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2018-11-09 23:26:29 +02:00
Hannu Nyman
b3d4b84aaf timezone data: update to 2018g
Update timezone data to 2018g

http://mm.icann.org/pipermail/tz-announce/2018-October/000052.html

 * Morocco switches to permanent +01 on 2018-10-27.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 111ebe2f62)
2018-10-30 19:48:38 +02:00
Hannu Nyman
463fb04116 timezone data: update to 2018f
Update timezone data to 2018f

http://mm.icann.org/pipermail/tz-announce/2018-October/000051.html

   Volgograd moves from +03 to +04 on 2018-10-28.
   Fiji ends DST 2019-01-13, not 2019-01-20.
   Most of Chile changes DST dates, effective 2019-04-06.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 651937c166)
2018-10-25 18:48:33 +03:00
Hannu Nyman
69325c11b5 timezone data: update to 2018e
Update timezone data to 2018e

http://mm.icann.org/pipermail/tz-announce/2018-May/000050.html

  North Korea switches back to +09 on 2018-05-05.
  The main format uses negative DST again, for Ireland

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit 701f6b0819)
2018-10-09 18:25:33 +03:00
Ansuel Smith
f4da0b8cfb luci-mod-admin-full: applyreboot doesn't reload page
The applyreboot page doesn't reload the page onload of the loding gif. This adds the right function.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit 442ece768d)
2018-08-16 10:52:22 +02:00
Ansuel Smith
e0599d5064 luci-mod-admin-full: fix broken applyreboot page
This improve applyreboot page and fix problem with luci-nginx that doesn't refresh the page when the router reboot.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit 327e284b74)
2018-08-16 10:52:14 +02:00
Jo-Philipp Wich
199eac4166 luci-base: mark password template dummy field as hidden
Mark the dummy input field as aria-hidden, should fix #2063.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 98d4eb1695)
2018-08-16 10:51:33 +02:00
Gregory L. Dietsche
a49e4e4d56 Correct grammar in apply_widget.htm
This patch corrects "to get" to "to be" in apply_widget.htm
This shell command was used to find and make the change in
all impacted files:

find . -type f -exec sed -i 's/Waiting for configuration to get applied/Waiting for configuration to be applied/g' {} +

Signed-off-by: Gregory L. Dietsche <gregory.dietsche@cuw.edu>
(cherry picked from commit abfe45ff61)
2018-08-07 16:38:26 +02:00
yangfl
8bb4873326 luci-base: update Chinese translation
Signed-off-by: David Yang <mmyangfl@gmail.com>
(cherry picked from commit c51f0d9714)
2018-08-07 16:38:20 +02:00
Krystian Kozak
8407d90aa1 luci-base: update Polish translation
Updated Polish translations.

Signed-off-by: Krystian Kozak <krystian.kozak20@gmail.com>
(cherry picked from commit 10f12d7f6a)
2018-08-07 16:38:14 +02:00
Krystian Kozak
5d1d6915ca luci-base: update Polish translation
Updated Polish translations.

Signed-off-by: Krystian Kozak <krystian.kozak20@gmail.com>
(cherry picked from commit 6dbdc2cae8)
2018-08-07 16:37:46 +02:00
Alan Swanson
3d5d9dc574 luci-mod-admin-full: Fix DSL Stats display of dB statistics
Line attenuation, signal attenuation, noise margin and aggregate transmit
power really need to show decimal digits. Fixes commit 88713f6 from issue

(cherry picked from commit 4b3d20cda4)
[rewrapped commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-08-04 20:06:14 +02:00