Skip to content

Domains: more robust form #7523

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

Merged
merged 1 commit into from
Oct 8, 2020
Merged

Domains: more robust form #7523

merged 1 commit into from
Oct 8, 2020

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Sep 30, 2020

This form was even accepting spaces...

Based on the regex from https://api.cloudflare.com/
(pattern: ^([a-zA-Z0-9][\-a-zA-Z0-9]*\.)+[\-a-zA-Z0-9]{2,20}$)

Closes #1707

@stsewd stsewd requested a review from a team September 30, 2020 21:29
@humitos
Copy link
Member

humitos commented Oct 1, 2020

Based on the regex from api.cloudflare.com
(pattern: ^([a-zA-Z0-9][\-a-zA-Z0-9]*\.)+[\-a-zA-Z0-9]{2,20}$)

This should probably be a comment in the code next to the regex. With this link, that goes directly to the pattern: https://api.cloudflare.com/#zone-create-zone

This form was even accepting spaces...

Based on the regex from https://api.cloudflare.com/
(`pattern: ^([a-zA-Z0-9][\-a-zA-Z0-9]*\.)+[\-a-zA-Z0-9]{2,20}$`)
Copy link
Contributor

@agjohnson agjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Noted what looks to be a removal of unused code. It might be worth double checking we weren't using the attribute on commercial/etc. Based on this PR it looks like the removed code was ancient and wasn't even used.

@stsewd stsewd merged commit 025c02e into master Oct 8, 2020
@stsewd stsewd deleted the fix-form-domains branch October 8, 2020 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove our hacked Domain Validator in new Django
3 participants