Skip to content

Conversation

@cukiernick
Copy link

  • This PR is not from my main or master branch πŸ’©, but a separate branch βœ…
  • Each commit has a valid βœ’οΈ Signed-off-by: <my@email.address> row (via git commit --signoff)
  • Each commit and PR title has a valid πŸ“ <package name>: title first line subject for packages
  • Tested on: (ARMv8, OpenWrt 24.10.4, Firefox 144) βœ…
  • ( Optional ) Closes: luci-app-tinyproxy:valid domain name reported as invalidΒ #7958
  • Description: (describe the changes proposed in this PR)

Upstream target datatype is too strict, rejecting values starting with a dot, which selects all subdomains of provided domain.

From tinyproxy docs:

The site can be specified in various forms as a hostname, domain name or as an IP range:

name matches host exactly
.name matches any host in domain "name"
. matches any host with no domain (in 'empty' domain)
IP/bits matches network/mask
IP/mask matches network/mask

I looked at available datatypes in modules/luci-compat/luasrc/cbi/datatypes.lua and modules/luci-base/htdocs/luci-static/resources/validation.js and there is no suitable predefined type, so I changed it to string

Signed-off-by: Marcin <marcin_miko1@o2.pl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

luci-app-tinyproxy:valid domain name reported as invalid

1 participant