Merge pull request #1015 from danrl/proto-wireguard
luci-proto-wireguard: stricter input validation
This commit is contained in:
commit
dea880ef72
1 changed files with 6 additions and 5 deletions
|
@ -19,7 +19,7 @@ private_key = section:taboption(
|
||||||
translate("Required. Base64-encoded private key for this interface.")
|
translate("Required. Base64-encoded private key for this interface.")
|
||||||
)
|
)
|
||||||
private_key.password = true
|
private_key.password = true
|
||||||
private_key.datatype = "rangelength(44, 44)"
|
private_key.datatype = "and(base64,rangelength(44, 44))"
|
||||||
private_key.optional = false
|
private_key.optional = false
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,11 +76,12 @@ preshared_key = section:taboption(
|
||||||
Value,
|
Value,
|
||||||
"preshared_key",
|
"preshared_key",
|
||||||
translate("Preshared Key"),
|
translate("Preshared Key"),
|
||||||
translate("Optional. Adds in an additional layer of symmetric-key " ..
|
translate("Optional. Base64-encoded preshared key. " ..
|
||||||
|
"Adds in an additional layer of symmetric-key " ..
|
||||||
"cryptography for post-quantum resistance.")
|
"cryptography for post-quantum resistance.")
|
||||||
)
|
)
|
||||||
preshared_key.password = true
|
preshared_key.password = true
|
||||||
preshared_key.datatype = "rangelength(44, 44)"
|
preshared_key.datatype = "and(base64,rangelength(44, 44))"
|
||||||
preshared_key.optional = true
|
preshared_key.optional = true
|
||||||
|
|
||||||
|
|
||||||
|
@ -102,9 +103,9 @@ public_key = peers:option(
|
||||||
Value,
|
Value,
|
||||||
"public_key",
|
"public_key",
|
||||||
translate("Public Key"),
|
translate("Public Key"),
|
||||||
translate("Required. Public key of peer.")
|
translate("Required. Base64-encoded public key of peer.")
|
||||||
)
|
)
|
||||||
public_key.datatype = "rangelength(44, 44)"
|
public_key.datatype = "and(base64,rangelength(44, 44))"
|
||||||
public_key.optional = false
|
public_key.optional = false
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue