Fix suffix and bad protocol suffix service url name checks (#269)

This commit is contained in:
Tim Wilkinson 2022-03-07 21:41:47 -08:00 committed by GitHub
parent 6e198fa704
commit b17f52c27d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ function validate_service_name(name)
end end
function validate_service_protocol(proto) function validate_service_protocol(proto)
if not name or name == "" or name:match("[:-\"|]") or not name:match("^%w+") then if not proto or proto == "" or proto:match("[:-\"|]") or not proto:match("^%w+") then
return false return false
else else
return true return true
@ -104,7 +104,7 @@ function validate_service_protocol(proto)
end end
function validate_service_suffix(suffix) function validate_service_suffix(suffix)
if not suffix or suffix:match("[:-\"|]") or not name:match("^[%w/?._=#-]*$") then if not suffix or suffix:match("[:-\"|]") or not suffix:match("^[%w/?._=#-]*$") then
return false return false
else else
return true return true