summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/cbi
AgeCommit message (Collapse)Author
2019-06-29system-wide: fix escaping of magic charsDirk Brenken
* fix escaping of magic lua chars (#2800) * fix redundant second gsub line in shellstartsqescape function * fix return value of shellstartsqescape function Signed-off-by: Dirk Brenken <dev@brenken.org>
2019-04-23luci-app-shadowsocks-libev: fix cidr datatypeDirk Brenken
* add a new 'cidr' alias datatype to fix #2671 Signed-off-by: Dirk Brenken <dev@brenken.org>
2018-11-14luci-base: datatypes: add "unique" dummy validatorJo-Philipp Wich
Add a dummy validator for the server side so that we can start using unique in client side JS code. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-04luci-base: add a strict flag to the hostname validatorJo-Philipp Wich
Some applications, e.g. dnsmasq, do not allow hostnames starting with an underscore, therefor extend the existing hostname datatype validator with a `strict` which disallows a leading underscore. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-03-12treewide: unify mac address handlingJo-Philipp Wich
Use the new luci.ip MAC address facilities to parse and verify MAC addresses in a common way, instead of relying on various ad-hoc solutions. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-02-16luci-base: fix Lua-side ip6hostid() datatype validationJo-Philipp Wich
A valid host ID as accepted by netifd must meet the following criteria: - Is either one of the two special "random" or "eui64" strings - Or is a valid IPv6 address according to inet_pton(AF_INET6) - Has the first 64 bit set to zero Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-08-22luci-base: datatypes: add cidr, ipnet validator typeYousong Zhou
- Rewrite ipmask to use these subtypes - Add ip{4,6}prefix validators to cbi.js Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-02-27luci-proto-wireguard: add support for fwmark optiondanrl
Adds support for the fwmark option. FwMark is a 32-bit fwmark for outgoing packets. If set to 0 or "off", this option is disabled. Signed-off-by: Dan Luedtke <mail@danrl.com>
2017-02-15luci-base: added dhcpv6 datatypesdanrl
Signed-off-by: Dan Luedtke <mail@danrl.com>
2017-02-09luci-base: add hexstring datatypeHannu Nyman
Add datatype 'hexstring' for input validaiton datatypes. It will accept any hexadecimal string. (no length validation, as rangelength can be used for that.) Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-01-30luci-base: fix logic errors in ipmask4 and ipmask6 datatype validatorsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-24luci-base: datatypes.lua: add missing parentheses in conditionalJo-Philipp Wich
The missing parens lead to a wrong expression precedence, causing a runtime error when attempting to compare nil with a number. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-23luci-base: ipmask, ipmask4 and ipmask6 validatorsJo-Philipp Wich
These validators accept IP address specifications in the form - address - address/bits - address/netmask Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-23luci-base: datatypes.lua: cleanup white spaceJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2015-12-15validation: Add option ipv4only option to host and hostport datatypesDaniel Dickinson
Some applications only support ipv4 so add ipv4only option to host and hostport datatypes so that for thos applications that when an IP address is specified only and ipv4 ip address gets accepted.
2015-12-15modules/luci-base: Fix ipaddrport validator to support ipv6Daniel Dickinson
The previous versiono of ipaddrport validator only worked for ipv4 due to disallowing colons (:) in ip address which obvious fails for ipv6. We now instead allow either ipv4 address or an ipv6 address of the form [<ipv6address>]:port
2015-12-14luci-base: Add time and data datatypes for use with firewall appDaniel Dickinson
Adding LuCI configuation of the firewall time and data uci options is in progress and this adds the necessary datatypes for validating those fields.
2015-12-02luci-base: add hostport and ipaddrport validation typesJo-Philipp Wich
Add two new types 'hostport' and 'ipaddrport' to validate strings in the form 'sub.example.org:1234' and '0.0.0.0:80'. The 'hostport' accepts hostnames or IP addresses followed by a colon and a port number while the 'ipaddrport' type accepts numeric IP addresses only, followed by a colon and a port. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-16Update my email addresses in the license headersJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-16Globally reduce copyright headersJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-01-08Rework LuCI build systemJo-Philipp Wich
* Rename subdirectories to their repective OpenWrt package names * Make each LuCI module its own standalone package * Deploy a shared luci.mk which is used by each module Makefile Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>