-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate value of domain
property
#227
Conversation
helm/flowforge/values.schema.json
Outdated
@@ -8,7 +8,8 @@ | |||
"type": "string" | |||
}, | |||
"domain": { | |||
"type": "string" | |||
"type": "string", | |||
"pattern": "^([a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,6}$" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the \\
because we need to escape the escape char in the sting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you've limited top level domains to between 2-6 chars
This is the current list which already has longer version (e.g. 11 for ACCOUNTANTS, or 15 for AMERICANEXPRESS )
https://data.iana.org/TLD/tlds-alpha-by-domain.txt
https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_domain_name
TLDs can contain special as well as latin characters. A TLD's maximum length is 63 characters, although most are around 2–3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the \ because we need to escape the escape char in the sting?
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied a change which allows TLD to be 25 characters - the longest from the IANA list at the time of writing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would mean people can't run forge on a top level domain, but I'm happy with that for now...
Description
This PR assures, that
forge.domain
value contains a valid domain name.In result, installation without proper domain set will fail with:
Related Issue(s)
#226
Checklist
flowforge.yml
?FlowFuse/helm
to update ConfigMap TemplateFlowFuse/CloudProject
to update values for Staging/ProductionLabels
backport
labelarea:migration
label