Commit graph

7734 commits

Author SHA1 Message Date
Hannu Nyman
ff9e34e47c Merge pull request #509 from neheb/master
resources/icons: Use gifsicle to save a few bytes.
2015-10-27 17:30:24 +02:00
Jo-Philipp Wich
927dc1aff9 luci-base: eliminiate use of uci state vars in luci.sys
Rewrite `luci.sys.wifi.getiwinfo()` to use the ubus wireless state instead of
depreacated uci state vars in order to map abstract network notation to
wireless ifnames.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-27 14:13:05 +01:00
Jo-Philipp Wich
57ba1922b7 Add link to API reference 2015-10-27 13:24:09 +01:00
Jo-Philipp Wich
6d368a4033 Move libubus-lua dependency to luci-base
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-27 13:09:21 +01:00
Hannu Nyman
ec6ccf1cd3 luci-app-diag-devinfo: mark broken due to dependencies
Mark luci-app-diag-devinfo @BROKEN as it has several failing dependencies:

Four dependencies from "oldpackages":
 httping, mac-to-devinfo, smap-to-devinfo, netdiscover-to-devinfo

One dependency from "abandoned":
 smap

(netdiscover is currently ok in trunk, but not in 15.05.)

Reference to Luci issue #523.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-10-27 09:57:57 +02:00
Hannu Nyman
53d767de5e luci-app-statistics: Adjust ping graphs to show target hosts separately
Ping statistics plugin allows the user to define multiple ping targets.
The graphs have so far shown multiple hosts in a stacked way.
Adjust graphs to show the target hosts separately (overlay=true).

Clarify the plugin definition with some additional line spacing.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-10-25 10:19:26 +02:00
Hannu Nyman
dccf485922 luci-app-statistics: improve scaling of the associated stations graph
Improve scaling of the associated stations graph on the wireless page.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-10-25 10:11:35 +02:00
Hannu Nyman
2a9b2107ba Merge pull request #522 from LuttyYang/master
luci-theme-material: fix some style bugs
2015-10-24 09:33:42 +03:00
Lutty Yang
1328b89ef8 luci-theme-material: fix some style bugs
Signed-off-by: Lutty Yang <lutty@wcan.in>
2015-10-24 10:14:11 +08:00
Hannu Nyman
a19f97f7ca Merge pull request #521 from LuttyYang/master
luci-theme-material: Synchronized to the LUCI version f9e590a
2015-10-23 20:21:01 +03:00
Hannu Nyman
8f97c6c15b Revert "luci-theme-material: do not infer login state from url (#520)"
This reverts commit f9e590aa47
in order to enable a clean merge of the PR #521 from the theme author.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-10-23 20:16:04 +03:00
Lutty Yang
8296a47c1a luci-theme-material: try find current position by using lua code
thanks for jow

Signed-off-by: Lutty Yang <lutty@wcan.in>
2015-10-23 20:51:12 +08:00
Lutty Yang
9098b20650 luci-theme-material: Synchronized to the LUCI version f9e590a
Signed-off-by: Lutty Yang <lutty@wcan.in>
2015-10-23 12:51:07 +08:00
Jo-Philipp Wich
f9e590aa47 luci-theme-material: do not infer login state from url (#520)
Checking for `;` in the url is no good indicator whether a user is logged in,
instead query the dispatcher and set a `logged-in` CSS class on the `<body>`
element if a session exists.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-22 21:08:22 +02:00
Jo-Philipp Wich
6c4341ee01 luci-mod-admin-full: fix invalid markup in packages.htm (#518)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-22 12:20:20 +02:00
Jo-Philipp Wich
94ab57f48c luci-mod-admin-full: restructure and fix backup, restore and sysuprade (#517)
Do not use standard post security checking for actions that require file upload
since reading the token value will trigger parsing of the http message body
before the file upload handler has been set, which causes LuCI to buffer the
entire request body in memory.

In order to simplify the code and logic flow, split action_flashops() into
separate handlers for reset, backup, restore and sysupgrade.

Let the backup restore and sysupgrade handlers use the new test_post_security()
method in luci.dispatcher to perform token checking *after* setting the upload
handler.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-22 08:48:06 +02:00
Jo-Philipp Wich
d32c685039 luci-base: dispatcher expose test_post_security()
Allows external code to perform POST and token checking manually.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-22 08:30:29 +02:00
Jo-Philipp Wich
79383f5a74 luci-base: ensure that base url is emitted with trailing slash
Now that we don't have an url token anymore, '/cgi-bin/luci' becomes a valid
url while cookies are restricted to only '/cgi-bin/luci/' and below.

In order to ensure that the first request after login refers to a path
covered by the authentication cookie, change build_url() to always append
a trailing slash if we're referring to the base url.

This should fix the login problems mentioned in #516.

While we're touching the dispatcher, also remove remaining url token code.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-21 16:48:25 +02:00
Jo-Philipp Wich
b4d62d3fd7 luci-mod-admin-full: do not access dispatcher.context.urltoken in logout
The urltoken table is going to be removed.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-21 16:43:07 +02:00
Jo-Philipp Wich
86326e0def luci-base: remove security token from urls
Now that sensitive urls require post requests and only accept them if a valid
security token is sent along the request, we can drop the global random url
token to improve LuCI usability.

The main improvement is the ability to use multiple tabs with the same login
session, but also deep linking to specific urls without the need for another
login becomes feasible, e.g. for documentation purposes.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-21 00:31:27 +02:00
Jo-Philipp Wich
f23f7b8751 luci-app-upnp: protect lease delete call with csrf token
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-21 00:11:28 +02:00
Jo-Philipp Wich
c1278f967e luci-app-splash: protect admin status call with csrf token
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-21 00:09:55 +02:00
Jo-Philipp Wich
ac34dfa0bc luci-app-radicale: protect start/stop actions with csrf token
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-21 00:03:56 +02:00
Jo-Philipp Wich
ae9fb03e74 luci-app-privoxy: protect start/stop actions with csrf token
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-21 00:03:03 +02:00
Jo-Philipp Wich
0f1f5140e3 luci-app-ocserv: protect disconnect action with csrf token
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-21 00:00:55 +02:00
Jo-Philipp Wich
b9ed03c5a9 luci-app-ddns: protect start/stop actions with csrf token
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-20 23:58:01 +02:00
Jo-Philipp Wich
d4666757b7 luci-mod-admin-full: protect iptables counter reset and restart with token
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-20 22:27:39 +02:00
Jo-Philipp Wich
8bb749ecc3 luci-mod-admin-full: protect network post actions with csrf tokens
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-20 22:17:23 +02:00
Jo-Philipp Wich
6b3f804956 luci-base: filter invalid opkg status lines
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-20 21:04:46 +02:00
Jo-Philipp Wich
b5826f1ffb luci-mod-admin-full: protect clock, flash and opkg ops with submit token
* Use post_on() target to require csrf token verification for modifying actions
* Ensure that package and flash operation handlers guard modifying operations
  with parameter check

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-20 21:04:46 +02:00
Jo-Philipp Wich
562c47e5fd luci-base: generalize post security token handling
* Add a generic helper function to check need for post / csrf token validation
* Remove custom token verification in cbi targets
* Support requiring post security depending on specific submit parameters,
  usable through post_on() action

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-20 21:04:46 +02:00
Hannu Nyman
e8349fbfdf Merge pull request #513 from LuttyYang/master
luci-theme-material: PR from Version 0.2.11
2015-10-13 18:15:05 +03:00
Lutty Yang
780778e6f9 luci-theme-material: PR from Version 0.2.11
Signed-off-by: Lutty Yang <lutty@wcan.in>
2015-10-13 23:07:16 +08:00
Hannu Nyman
7b00a4a765 i18n: Sync translations
Sync translations to the current strings.

Changes in luci-app-ddns, luci-app-mjpg-streamer, luci-app-qos,
luci-app-shadowsocks-libev, luci-app-statistics and luci-base

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-10-13 12:35:57 +03:00
Hannu Nyman
c8392ba970 luci-base: update i18n base template
Update i18n base template to match the current strings.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-10-13 12:25:58 +03:00
Hannu Nyman
1d37c9c25d luci.mk: correct SK language name to Slovak
SK language code refers to Slovak, not Slovene.
Native language name is correct.

References:
https://forum.openwrt.org/viewtopic.php?id=60235
https://en.wikipedia.org/wiki/Slovak_language

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-10-13 10:13:50 +03:00
Jo-Philipp Wich
d1da53512e luci-app-ddns: fix typo in previous commit
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-12 11:14:01 +02:00
Hannu Nyman
2cfd11b272 Timezone information: update to 2015g
Changes in 2015g:
http://mm.icann.org/pipermail/tz-announce/2015-October/000034.html

     Norfolk moves from +1130 to +1100 on 2015-10-04 at 02:00 local time.

     Fiji's 2016 fall-back transition is scheduled for January 17, not 24.

     Fort Nelson, British Columbia will not fall back on 2015-11-01. It has
     effectively been on MST (-0700) since it advanced its clocks on 2015-03-08.
     New zone America/Fort_Nelson.

Note: the Turkey-related one-time rule change is not apparently catched by
the zoneinfo2lua script, so that change is not included in this commit.
(Turkey's 2015 fall-back transition is scheduled for Nov. 8, not Oct. 25.)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-10-12 11:09:28 +03:00
Jo-Philipp Wich
49a7c5bd03 luci-app-ddns: remove title <a> hacks
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-12 09:14:49 +02:00
Mangix
a2ebf87145 resources/icons: Use gifsicle to save a few bytes.
Signed-off by: Rosen Penev <rosenp@gmail.com>
2015-10-09 16:00:57 -07:00
Jo-Philipp Wich
222284578b Merge pull request #505 from roger-/dump1090-latlon
dump1090: lat/lon should be floats
2015-10-08 02:06:08 +02:00
Roger
9eda8585d6 dump1090: lat/lon should be floats
Signed-off-by: Roger D <rogerdammit@gmail.com>
2015-10-07 18:16:03 -05:00
Jo-Philipp Wich
bd504f552d luci-base: prevent UCI changes in CBI if form is not in submit state
Only process submitted data if the "cbi.submit" parameter is present as the
dispatcher will verify the integrity of the CSRF token in this case.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-08 00:30:14 +02:00
Jo-Philipp Wich
281d2f6178 Globally replace luci.dispatcher.build_url(...) with url(...) invocations
Also concat multiple string arguments into one while we're at it.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-07 19:07:36 +02:00
Jo-Philipp Wich
49a2cb5ad1 luci-base: expose luci.dispatcher.build_url() as url() in templates
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-07 13:03:42 +02:00
Jo-Philipp Wich
3f29078fb9 luci-base: protect simpleforms with CSRF tokens
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-07 12:24:58 +02:00
Jo-Philipp Wich
38a9993bd1 luci-mod-admin-full: switch to POST action for reboot
Also rework the reboot tmeplate a little bit.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-07 01:54:56 +02:00
Jo-Philipp Wich
ada4a0ea98 luci-base: switch to POST action for service reload
Switches the service reload calls to CSRF token protected POST action.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-06 22:37:27 +02:00
Jo-Philipp Wich
e440144d56 luci-mod-admin-full: switch to POST actions for UCI changes
Switches UCI apply/revert/save to CSRF token protected POST actions.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-06 22:29:07 +02:00
Jo-Philipp Wich
9b75d8ec36 luci-theme-bootstrap: add redir parameter to uci change menu
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-06 22:21:48 +02:00