summaryrefslogtreecommitdiffhomepage
path: root/modules
AgeCommit message (Collapse)Author
2015-11-17luci-mod-admin-full: allow empty mac in interface statusJo-Philipp Wich
Also adjust for changed IP address format emitted by iface_status call. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-11-17luci-mod-admin-full: use :ipaddrs() and :ip6addrs() helper for iface_statusJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-11-17luci-base: eliminate use of uci state vars in luci.model.networkJo-Philipp Wich
Also implement :ipaddrs() and :ip6addrs() helper for network instances. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-11-16luci-mod-admin-full: prevent submit with interface delete button (#549)Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-11-16luci-base: fix uci documentation issue (#538)Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-11-11Merge pull request #535 from saik0/redirect-root-if-empty-signedJo-Philipp Wich
Redirect to root on empty path (signed off)
2015-11-06fix a typo error in command script shown to usersRan Bao
Signed-off-by: Ran Bao <worksev@gmail.com>
2015-11-05luci-mod-admin-full: limit interface name length to 15 charsHannu Nyman
Limit the name of a new interface to 15 characters. Add a note about the maximum length and the automatic protocol/bridge prefixes (br-, 6in4-, pppoe- etc.). Reference to: https://dev.openwrt.org/ticket/20380 https://github.com/openwrt/luci/issues/507 There is a 15 character limit to the "real" interface name, enforced both in the firewall and dnsmasq. The real interface name includes the possible prefix "br-", "6in4-" etc. Example of an error: interface name `br-lan_protected' must be shorter than IFNAMSIZ (15) Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-11-03Redirect to root on empty pathJoel Pedraza
* Prevents an empty Location header * Useful in environments where build_url() could return an empty string (such as http server rewrites requests to /cgi-bin/luci) Signed-off-by: Joel Pedraza <github@saik0.net>
2015-11-01template cbi/value.htm implement documented property maxlengthChristian Schoenebeck
template cbi/value.htm implement already documented property maxlength Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-10-31cbi.lua: Implement "readonly" property for "Value"Christian Schoenebeck
cbi.lua: Implement "readonly" property for "Value" Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-10-31template cbi/value.htm: add "readonly" propertyChristian Schoenebeck
template cbi/value.htm: add "readonly" property Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-10-30cbi.lua: Implement Flag.validate functionChristian Schoenebeck
cbi.lua - Implement Flag.validate function to be overwritable - rewritten if clause for easier reading ;-) Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2015-10-27Merge pull request #509 from neheb/masterHannu Nyman
resources/icons: Use gifsicle to save a few bytes.
2015-10-27luci-base: eliminiate use of uci state vars in luci.sysJo-Philipp Wich
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-27Move libubus-lua dependency to luci-baseJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-22luci-mod-admin-full: fix invalid markup in packages.htm (#518)Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-22luci-mod-admin-full: restructure and fix backup, restore and sysuprade (#517)Jo-Philipp Wich
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-22luci-base: dispatcher expose test_post_security()Jo-Philipp Wich
Allows external code to perform POST and token checking manually. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-21luci-base: ensure that base url is emitted with trailing slashJo-Philipp Wich
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-21luci-mod-admin-full: do not access dispatcher.context.urltoken in logoutJo-Philipp Wich
The urltoken table is going to be removed. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-21luci-base: remove security token from urlsJo-Philipp Wich
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-20luci-mod-admin-full: protect iptables counter reset and restart with tokenJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-20luci-mod-admin-full: protect network post actions with csrf tokensJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-20luci-base: filter invalid opkg status linesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-20luci-mod-admin-full: protect clock, flash and opkg ops with submit tokenJo-Philipp Wich
* 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-20luci-base: generalize post security token handlingJo-Philipp Wich
* 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-13i18n: Sync translationsHannu Nyman
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-13luci-base: update i18n base templateHannu Nyman
Update i18n base template to match the current strings. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-10-12Timezone information: update to 2015gHannu Nyman
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-09resources/icons: Use gifsicle to save a few bytes.Mangix
Signed-off by: Rosen Penev <rosenp@gmail.com>
2015-10-08luci-base: prevent UCI changes in CBI if form is not in submit stateJo-Philipp Wich
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-07Globally replace luci.dispatcher.build_url(...) with url(...) invocationsJo-Philipp Wich
Also concat multiple string arguments into one while we're at it. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-07luci-base: expose luci.dispatcher.build_url() as url() in templatesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-07luci-base: protect simpleforms with CSRF tokensJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-07luci-mod-admin-full: switch to POST action for rebootJo-Philipp Wich
Also rework the reboot tmeplate a little bit. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-06luci-base: switch to POST action for service reloadJo-Philipp Wich
Switches the service reload calls to CSRF token protected POST action. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-06luci-mod-admin-full: switch to POST actions for UCI changesJo-Philipp Wich
Switches UCI apply/revert/save to CSRF token protected POST actions. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-06luci-base: protect CBI forms with CSRF tokensJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-06luci-base: add support for POST-only actions with CSRF token checkJo-Philipp Wich
Add the dispatcher infrastructure to restrict certain routes to POST requests only in conjunction with verification of CSRF tokens. This is the first step to get rid of the CSRF token in the url in favor to tokens embedded in forms. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-06Globally convert headline anchors into name attributes.Jo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-04Merge pull request #488 from hnyman/black-flashHannu Nyman
luci-base: change index.html to be more like current themes
2015-10-03luci-mod-admin-full: status: survive broken DSL status outputJo-Philipp Wich
Only attempt to call "dsl_func" if the dsl_control lucistat output could be successfully evaluated. Works around https://dev.openwrt.org/ticket/20607 Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-09-29resources/icons: Use ZopfliPNG to save 5.4 KBMangix
Signed-off by: Rosen Penev <rosenp@gmail.com>
2015-09-29luci-base: change index.html to be more like current themesHannu Nyman
Change index.html that is visible for a second when entering Luci: * Black text on white background (instead of white on black) * Specify font as Arial/Helvetica Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-09-28luci-mod-admin-full: fix dnsmasq no-hosts/addn-hosts optionsOliver Middleton
no-hosts does not disable addn-hosts. Signed-off-by: Oliver Middleton <olliemail27@gmail.com>
2015-09-18luci-base: set default mediaurlbase to bootstrap (current default theme)Hannu Nyman
The mediaurlbase option in the default /etc/config/luci still points to the old openwrt.org theme that is not installed by default. The discrepancy was noted in the commit message for 55ab4e4ce22 After 55ab4e4ce22 the installed theme's uci-defaults script will correct the setting at first boot, but we should not have a deprecated theme as the default value. Set the default value to the default theme 'bootstrap'. Related old discussion at #302 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-09-18luci-mod-admin-full: opkg config / prevent word-wrapHannu Nyman
Prevent word-wrap on the config input areas. Especially the feed definition lines can be long, and automatic word-wrap can decrease clarity. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2015-09-17i18n/polish/base: changing form of the wordCezary Jackiewicz
2015-09-17i18n/polish/base: truncate strings to better fit in viewCezary Jackiewicz