(fix) Improve collabora's regex (#1108)
* Improve collabora's regex * Also allow root domains, and disallow `--` * Shorten regex steps a bit
This commit is contained in:
@@ -79,7 +79,7 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
default: 'nextcloud.domain.tld|othernextcloud.domain.tld'
|
default: 'nextcloud.domain.tld|othernextcloud.domain.tld'
|
||||||
valid_chars: '^([a-z]{1,}\.[a-z]{1,}\.[a-z]{1,})((\|[a-z]{1,}\.[a-z]{1,}\.[a-z]{1,}))*$'
|
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})))*)$'
|
||||||
required: true
|
required: true
|
||||||
- variable: username
|
- variable: username
|
||||||
label: "Username for WebUI"
|
label: "Username for WebUI"
|
||||||
@@ -118,7 +118,8 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
default: 'collabora.domain.tld'
|
default: 'collabora.domain.tld'
|
||||||
valid_chars: '^([a-z]{1,}\.[a-z]{1,}\.[a-z]{1,})$'
|
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})$'
|
||||||
|
|
||||||
# Include{containerConfig}
|
# Include{containerConfig}
|
||||||
|
|
||||||
- variable: service
|
- variable: service
|
||||||
|
|||||||
@@ -3,19 +3,39 @@
|
|||||||
__`Domain(s) using collabora`__
|
__`Domain(s) using collabora`__
|
||||||
Accepted formats are:
|
Accepted formats are:
|
||||||
|
|
||||||
- Single domain (eg. `cloud.mydomain.com`)
|
- Single FQDN (eg. `cloud.mydomain.com` or `mydomain.com`)
|
||||||
- Multiple domains (eg. `cloud.mydomain.com|nextcloud.mydomain.com`) - Each domain is separated with `|`
|
- Multiple FQDN (eg. `cloud.mydomain.com|nextcloud.mydomain.com` or `mydomain.com|cname.mydomain.com`) - Each FQDN is separated with `|`
|
||||||
|
|
||||||
Regex used to match those: `^([a-z]{1,}\.[a-z]{1,}\.[a-z]{1,})((\|[a-z]{1,}\.[a-z]{1,}\.[a-z]{1,}))*$`
|
Each FQDN is split into parts
|
||||||
You can try live [here](https://regex101.com/r/AQFh2g/1)
|
* Hostname (`cname`.domain.com) _Optional_
|
||||||
|
* Can have from 1 up to 127 levels deep cnames.
|
||||||
|
* Can contain [0-9], [a-z] and `-`.
|
||||||
|
* Must be at least 1 char and no longer than 63 chars.
|
||||||
|
* Must start with [a-z], [0-9].
|
||||||
|
* Must NOT end with `-`.
|
||||||
|
* Domain (cname.`domain`.com)
|
||||||
|
* Can contain [0-9], [a-z] and `-`.
|
||||||
|
* Must be at least 1 chars and no longer than 63 chars.
|
||||||
|
* Must start with [a-z], [0-9].
|
||||||
|
* Must NOT end with `-`.
|
||||||
|
* Top-Level-Domains (cname.domain.`com`)
|
||||||
|
* Can contain [0-9], [a-z] and `-`.
|
||||||
|
* Must be at least 2 chars and no longer than 63 chars.
|
||||||
|
* 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)
|
||||||
|
|
||||||
__`Server Name`__
|
__`Server Name`__
|
||||||
Accepted formats are:
|
Accepted formats are:
|
||||||
|
|
||||||
- Single domain (eg. `collabora.mydomain.com`)
|
- Single FQDN (eg. `collabora.mydomain.com` or `mydomain.com`)
|
||||||
|
|
||||||
Regex used to match this: `^([a-z]{1,}\.[a-z]{1,}\.[a-z]{1,})$`
|
_Same rules apply for FQDN as in the section above_
|
||||||
You can try live [here](https://regex101.com/r/xCjpW7/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})$`
|
||||||
|
You can try live [here](https://regex101.com/r/0HpkSI/1)
|
||||||
|
|
||||||
__`Password for WebUI`__
|
__`Password for WebUI`__
|
||||||
Accepted formats are:
|
Accepted formats are:
|
||||||
|
|||||||
Reference in New Issue
Block a user