You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whe have an internal dns with a domain like "org.les800"
when i'm trying to set the base url of the tower host with something like "tower.org.les800", it fail with an error 400 and url not valid
We can either make a new TowerURLBaseField class that subclasses URLField, and then feed in a custom regex pattern to the URLValidator to allow numbers in the top level domain. This is how it is done in the case of LDAPServerURIField.
Or more generally we can change some logic in class URLField that adds an allow_number_in_top_level_domain flag and if set to True, will pass the modified regex into the validator. That way any setting of this class can be configured to have numbers in the TLD going forward.
Or more generally we can change some logic in class URLField that adds an allow_number_in_top_level_domain flag and if set to True, will pass the modified regex into the validator. That way any setting of this class can be configured to have numbers in the TLD going forward.
I think this is probably a better idea going forward, and it probably makes sense to default allow_number_in_top_level_domain to True, given that numbers in TLDs is totally a thing.
Activity
ryanpetrello commentedon Oct 25, 2019
@fosterseth you mind taking a look at this? I'll bet it's similar to the LDAP bug you recently fixed.
fosterseth commentedon Oct 25, 2019
@ryanpetrello yes it's same issue as the LDAP bug.
We can either make a new
TowerURLBaseFieldclass that subclassesURLField, and then feed in a custom regex pattern to theURLValidatorto allow numbers in the top level domain. This is how it is done in the case ofLDAPServerURIField.Or more generally we can change some logic in class URLField that adds an
allow_number_in_top_level_domainflag and if set to True, will pass the modified regex into the validator. That way any setting of this class can be configured to have numbers in the TLD going forward.ryanpetrello commentedon Oct 28, 2019
I think this is probably a better idea going forward, and it probably makes sense to default
allow_number_in_top_level_domaintoTrue, given that numbers in TLDs is totally a thing.kdelee commentedon Jan 13, 2020
connecting ldap stuff:
issue: #3646
PR: #4784
nixocio commentedon Jan 29, 2020
Closed by https://github.com/ansible/tower-qa/commit/fdd5bd85d1b1beb82b4cc72da51e6bf4f864b7bf
Merge pull request ansible#5081 from ansible/ui_issue_10079