fix(collabora): Update `valid_chars` regex to allow IP's also (#1277)

This commit is contained in:
Stavros Kois 2021-11-03 19:31:18 +02:00 committed by GitHub
parent 0467d66ce4
commit ac9f0fc2c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -80,7 +80,7 @@ questions:
schema:
type: string
default: 'nextcloud.domain.tld|othernextcloud.domain.tld'
valid_chars: '^(([a-z\d](-?[a-z\d]){0,62})\.)*(([a-z\d](-?[a-z\d]){0,62})\.)([a-z](-?[a-z\d]){1,62})((\|((([a-z\d](-?[a-z\d]){0,62})\.)*(([a-z\d](-?[a-z\d]){0,62})\.)([a-z](-?[a-z\d]){1,62})))*)$'
valid_chars: '^((([a-z\d](-?[a-z\d]){0,62})\.)*(([a-z\d](-?[a-z\d]){0,62})\.)([a-z](-?[a-z\d]){1,62})|((\d{1,3}\.){3}\d{1,3}))((\|((([a-z\d](-?[a-z\d]){0,62})\.)*(([a-z\d](-?[a-z\d]){0,62})\.)([a-z](-?[a-z\d]){1,62})|((\d{1,3}\.){3}\d{1,3})))*)$'
required: true
- variable: username
label: "Username for WebUI"
@ -119,7 +119,7 @@ questions:
schema:
type: string
default: 'collabora.domain.tld'
valid_chars: '^(([a-z\d](-?[a-z\d]){0,62})\.)*(([a-z\d](-?[a-z\d]){0,62})\.)([a-z](-?[a-z\d]){1,62})$'
valid_chars: '^((([a-z\d](-?[a-z\d]){0,62})\.)*(([a-z\d](-?[a-z\d]){0,62})\.)([a-z](-?[a-z\d]){1,62})|((\d{1,3}\.){3}\d{1,3}))$'
# Include{containerConfig}

View File

@ -5,6 +5,9 @@ Accepted formats are:
- Single FQDN (eg. `cloud.mydomain.com` or `mydomain.com`)
- Multiple FQDN (eg. `cloud.mydomain.com|nextcloud.mydomain.com` or `mydomain.com|cname.mydomain.com`) - Each FQDN is separated with `|`
- Single IP's (eg. `10.10.10.11`)
- Multiple IP's (eg. `10.10.10.11|10.10.10.2`) - Each IP is separated with `|`
- Mixed FQDN and IP's (eg. `10.10.10.11|domain.com` or `domain.com|10.10.10.11`) - Each FQDN or IP is separated with `|`
Each FQDN is split into parts
__Hostname (`cname`.domain.com)__ _Optional_
@ -24,18 +27,19 @@ __Top-Level-Domains (cname.domain.`com`)__
* Must start with [a-z].
* Must NOT end with `-`.
Regex used to match those: `^(([a-z\d](-?[a-z\d]){0,62})\.)*(([a-z\d](-?[a-z\d]){0,62})\.)([a-z](-?[a-z\d]){1,62})((\|((([a-z\d](-?[a-z\d]){0,62})\.)*(([a-z\d](-?[a-z\d]){0,62})\.)([a-z](-?[a-z\d]){1,62})))*)$`
You can try live [here](https://regex101.com/r/rIxhye/1)
Regex used to match those: `^((([a-z\d](-?[a-z\d]){0,62})\.)*(([a-z\d](-?[a-z\d]){0,62})\.)([a-z](-?[a-z\d]){1,62})|((\d{1,3}\.){3}\d{1,3}))((\|((([a-z\d](-?[a-z\d]){0,62})\.)*(([a-z\d](-?[a-z\d]){0,62})\.)([a-z](-?[a-z\d]){1,62})|((\d{1,3}\.){3}\d{1,3})))*)$`
You can try live [here](https://regex101.com/r/ymDFln/1)
__`Server Name`__
Accepted formats are:
- Single FQDN (eg. `collabora.mydomain.com` or `mydomain.com`)
- Single IP (eg. `10.10.10.11`)
_Same rules apply for FQDN as in the section above_
Regex used to match this: `^(([a-z\d](-?[a-z\d]){0,62})\.)*(([a-z\d](-?[a-z\d]){0,62})\.)([a-z](-?[a-z\d]){1,62})$`
You can try live [here](https://regex101.com/r/0HpkSI/1)
Regex used to match this: `^((([a-z\d](-?[a-z\d]){0,62})\.)*(([a-z\d](-?[a-z\d]){0,62})\.)([a-z](-?[a-z\d]){1,62})|((\d{1,3}\.){3}\d{1,3}))$`
You can try live [here](https://regex101.com/r/mICKDp/1)
__`Password for WebUI`__
Accepted formats are: