summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2018-04-26themes: fix CSS class of uci change indicatorJo-Philipp Wich
The previous commit incorrectly added a new class attribute without considering existing ones. Fixes 736d8fee4 ("themes: add common class to uci change indicator") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-26themes: add common class to uci change indicatorJo-Philipp Wich
Add a common CSS class name to the change indicator and modify the openwrt.org theme to hide it when no changes are present, similar to all other themes. This is needed for upcoming uci apply handling changes to be able to auto-hide the indicator without page reload after an apply. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-26luci-base: add simple CORS handling to luci.dispatcherJo-Philipp Wich
Support a new boolean property `cors` which - if set to true - causes the dispatcher to positively answer CORS OPTIONS requests after authentication without actually running the dispatching target. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-26luci-base: handle bodies of non-POST requests as wellJo-Philipp Wich
Decode the HTTP message bodies of any request carrying a Content-Length header, not just those in POST requests. This allows handling parameters in other methods, OPTIONS in particular. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-25Merge pull request #1766 from musashino205/l10n/dcp-upd-jaHannu Nyman
luci-app-dnscrypt-proxy: update Japanese translation
2018-04-25Merge pull request #1765 from musashino205/l10n/base-upd-jaHannu Nyman
luci-base: update japanese translation
2018-04-26luci-base: update japanese translationINAGAKI Hiroshi
Updated japanese translations. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-04-25luci-app-dnscrypt-proxy: update Japanese translationINAGAKI Hiroshi
Updated Japanese translations. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-04-24luci-base: additionally return error code strings in luci.util.ubus()Jo-Philipp Wich
Add a 3rd return value to luci.util.ubus() containing the string value of the error return value. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-24luci-base: ensure that file upload values have lengthJo-Philipp Wich
Ensure that the (table) length of a file upload value has nonzero length by initializing the first table index with the file name. This fixes tests in the form x = luci.http.formvalue(...) if x and #x > 0 then ... end Fixes #1763. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-23Merge pull request #1759 from pmelange/feature_remove_nameserver_213_73_91_35Hannu Nyman
Removed retired nameserver 213.73.91.35 from the Freifunk profiles
2018-04-23Removed retired nameserver 213.73.91.35 from the Freifunk profilespmelange
See issue openwrt/luci#1757 Signed-off-by: Perry Melange <isprotejesvalkata@gmail.com>
2018-04-22luci-base: decode plus signs in x-www-form-urlencoded POST dataJo-Philipp Wich
Depends on 5ef51b2ab ("lucihttp: update to latest HEAD"). Fixes #1755. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-22lucihttp: update to latest HEADJo-Philipp Wich
ccc685e lua: expose LH_URLDECODE_PLUS flag in Lua library Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-21luci-base: ship rpcd uci access ACLJo-Philipp Wich
Ship an ACL definition for granting full read/write access to uci configuration files via ubus rpc. This is a precondition for enabling uci session isolation later on. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-21luci-app-lxc: fix syntax error in previous commitJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-21luci-app-lxc: various changesAdmin Localnet
1) Modify dependencies Add dependencies required for to be able use containers created from "images.linuxcontainers.org". Several of them require "lxc-attach" for set password so to be able login. None of them has SSH preinstalled so "lxc-console" is required to be able login and install SSH, for example. Remove dependency "xz", it seems incompatible with LXC_BUSYBOX_OPTIONS when both are enabled happens a build crash. 2) Change container image repository The repository "virtualwrt.org/containers/" seems to not work, I have change it by the official LXC container image repository. 3) Translate the arch Translate the local uname architecture to a valid "images.linuxcontainers.org" arch. Only tested with the platform "mvebu" (armv7l -> armhf). 4) Other minor fixes Use same server to list images and download the image. Disable GPG check when listing images. Reported-by: "Admin Localnet <localnet@users.noreply.github.com>" [Squashed commits, cleaned up whitespace, refactor arch mapping, escape url setting, use system wide ubus helper, use uci model library] Closes: #1422 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-20lucihttp: update to latest HEADJo-Philipp Wich
c7c9c66 src: extend multipart parser test program 5071efb testcases: add multipart parsing edge cases 689e3d0 lib: multipart-parser: fix various edge cases Fixes #1754. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-19luci-base: properly handle repeated POST parametersJo-Philipp Wich
Restore the old luci.http behaviour of converting repeated POST params into single tables holding all values instead of letting each repeated parameter overwrite the value of the preceeding one. Fixes, among other things, the handling of CBI dynamic list values. Fixes #1752 Fixes 59dea0230 ("luci-base: switch to lucihttp based POST data processing") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-19luci-base: implement session handling in luci.model.uciJo-Philipp Wich
Introduce luci.model.uci.set_session_id() and luci.model.uci.get_session_id() to set and get the effective session ID respectively. When a session ID is set, it is sent as `ubus_rpc_session` attribute to rpcd, causing it to use per-session change directories, isolating LuCI changes from the global system uci state. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18luci-base: drop dependency on libuci-luaJo-Philipp Wich
LuCI itself now uses ubus calls to interact with uci configuration while the remaining direct libuci-lua users have been updated to either depend on the binding library or to use luci.model.uci. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18freifunk-common: explicitely depend on libuci-luaJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18lucihttp: update to latest HEADJo-Philipp Wich
8617997 lib: cast size_t values in printf() to prevent compielr warnings Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18libs: move http.protocol.{date,mime,conditionals} to luci-lib-httpprotoutilsJo-Philipp Wich
Also adjust the dependencies of components depending on these classes and flatten the namespace from luci.http.protocol.* to luci.http.* Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18luci-base: fold luci.http.protocol into luci.httpJo-Philipp Wich
With only the decoder routines remaining in luci.http.protocol, it makes no sense to keep the low level protocol class around, so fold the remaining code into the central luci.http class. Also adjust the few direct users of luci.http.protocol accordingly. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18luci-base: refactor luci.httpJo-Philipp Wich
- Rewrite getcookie() to use liblucihttp header value parsing - Rewrite setfilehandler() to use local variables and have cleaner code - Fix build_querystring() to actually *en*code the given params Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18luci-base: drop luci.util.dtable()Jo-Philipp Wich
The dtable() function has no user in the entire LuCI repo, so drop it. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18Revert "luci-base: add urldecode() and urlencode() C implementations"Jo-Philipp Wich
This reverts commit ad7dc4a4928e77ae142d0fe040f9e9e64b530e82. Since we're using liblucihttp now, that library is the appropriate place to add such decoding helper functions. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18luci-base: switch to lucihttp based POST data processingJo-Philipp Wich
Use the liblucihttp provided multipart and x-www-urlencoded body parsers and drop the old Lua parsing code. The C based data parsers are way faster than their old Lua counterparts while producing less string garbage and more correct results. While refactoring the luci.http.protocol code, also drop unused functions and dead code, heavily reducing the module size. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18luci-base: switch to lucihttp.urldecode() and lucihttp.urlencode()Jo-Philipp Wich
Drop the Lua implementation in luci.http.protocol and use the optimized C variants of liblucihttp instead. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18lucihttp: update to latest HEADJo-Philipp Wich
b7470d1 lua: back out early when instantiating parser with bad boundary e1b1b1f testcases: remove stray .swp file b46a6ca utils: introduce new LH_URLDECODE_PLUS flag Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-18Merge pull request #1750 from sotux/i18n_zh_cnHannu Nyman
luci-base: zh_CN: update Simplified Chinese translation
2018-04-18luci-base: zh_CN: update Simplified Chinese translationQian Zheng
Signed-off-by: Zheng Qian <sotux82@gmail.com>
2018-04-17contrib: package liblucihttpJo-Philipp Wich
Package liblucihttp, a utility library providing HTTP parsing and data decoding helpers. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-13luci-app-openvpn: properly parse low PIDsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-11Merge pull request #1744 from dibdot/mwan-fixHannu Nyman
luci-app-mwan3: bugfix
2018-04-10luci-app-mwan3: bugfixDirk Brenken
* two more luci.model.uci fixes for #1743 Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-04-10i18n: sync translations, cleanupHannu Nyman
* sync translations * clean-up old strings from adblock Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-04-10Merge pull request #1742 from fantom-x/dhcp_cachesize_maxHannu Nyman
luci-mod-admin-full: limit dns cachesize to 10000
2018-04-10luci-base: fix rendering of 404 HTML error templateJo-Philipp Wich
This 404 error template rendering has been broken for a long time due to bad function environment level in luci.template when invoking the rendering from the toplevel dispatcher context. Fix this issue by adding a local function indirection, essentially adding an additional stack frame. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-10luci-base: error404: do not access request env directlyJo-Philipp Wich
Instead of attempting to access the request environment directly (which does not work anyway using the CGI SGI), use the already sanitized dispatcher.context.request property to print out the not found url. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-10luci-base: don't propagate null bytes in path informationJo-Philipp Wich
It is possible to inject unescaped markup using a double encoded null byte via PATH_INFO on certain leaf nodes. Since there is no legitimate reason to handle null bytes in any part of the requested url, simply skip over such bytes when parsing the PATH_INFO value. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-10luci-base: add urldecode() and urlencode() C implementationsJo-Philipp Wich
The C implementations of urlencode and urldecode are considerably faster than their current Lua counterparts. On an AMD Geode system, the C variant is up to ten times faster when decoding strings and up to four times faster when encoding them. The functions are also designed to only allocate new strings when any actual changes are required, otherwise they reuse the existing input strings, reducing the overal memory usage somewhat. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-09luci-mod-admin-full: limit dns cachesize to 10000Marc Benoit
The value of cachesize is hardcoded to 10000 in dnsmasq-2.79/src/option.c to 10000 max case 'c': /* --cache-size */ { int size; if (!atoi_check(arg, &size)) ret_err(gen_err); else { /* zero is OK, and means no caching. */ if (size < 0) size = 0; else if (size > 10000) size = 10000; daemon->cachesize = size; } break; } Tested on Netgear R7800 Signed-off-by: Marc Benoit <marcb62185@gmail.com>
2018-04-09Merge pull request #1741 from dibdot/mwan-fixHannu Nyman
luci-app-mwan3: bugfix
2018-04-09luci-mod-admin-full: allow setting dns cachesizeMarc Benoit
In the case of more powerful routers the default cachesize value == 150 is too small and can easily be extended to 1,000's and 10,000's of entries. It makes sense to make it easy configurable. Tested on Netgear R7800 Signed-off-by: Marc Benoit <marcb62185@gmail.com> Fix whitespace, edit the proposed help text. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-04-09luci-app-mwan3: bugfixDirk Brenken
* make use of luci.model.uci to fix #1740 Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-04-09luci-base: consider empty parameters as well when testing POST requirementJo-Philipp Wich
The cbi class will react on an empty "cbi.submit" parameter as well so we must intercept GET requests using that too. Fixes 186e690c0 ("luci-base: dispatcher: reject non-POST requests with any cbi.submit value") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-08i18n: sync translationsHannu Nyman
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-04-07timezone data: update to 2018dHannu Nyman
Update timezone data to 2018d http://mm.icann.org/pipermail/tz-announce/2018-March/000049.html In 2018, Palestine starts DST on March 24, not March 31. Adjust future predictions accordingly. Casey Station in Antarctica changed from +11 to +08 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>