Skip to content
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 the project name when it's entered, fixes #514, fixes #86 #1147

Merged
merged 3 commits into from Oct 10, 2018

Conversation

rfay
Copy link
Member

@rfay rfay commented Sep 30, 2018

The Problem/Issue/Bug:

OP #514 - It's a standard problem new users have that they will enter a project name like "my project", which spaces or other problems that result in an invalid url.

We should finally validate it.

#86 also requests sanitization of hostnames; however this PR merely insists that the user choose an appropriate hostname.

How this PR Solves The Problem:

The project name is validated at the point of request. If it doesn't work, a correct project name is insisted on.

Manual Testing Instructions:

  • Try ddev config with invalid hostnames like "an invalid hostname" or "an_invalid_hostname".
  • Try ddev config in a directory which would be invalid
  • Try ddev config --projectname="invalid hostname" etc

Automated Testing Overview:

Related Issue Link(s):

Release/Deployment notes:

@rfay rfay added this to the v1.3.0 milestone Sep 30, 2018
@rfay rfay self-assigned this Sep 30, 2018
@rfay rfay changed the title Validate the project name when it's entered, fixes #514 Validate the project name when it's entered, fixes #514, fixes #86 Oct 2, 2018
@rfay rfay force-pushed the 20180929_validate_projectname branch 2 times, most recently from a7cea6f to b9cac94 Compare October 6, 2018 23:41
@rfay rfay force-pushed the 20180929_validate_projectname branch from b9cac94 to 9a29efa Compare October 9, 2018 20:40
Copy link
Contributor

@andrewfrench andrewfrench left a comment

Choose a reason for hiding this comment

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

This works really well, I wasn't able to break it interactively or with flag inputs and the code changes look good to me.

@rfay rfay merged commit bdfd80d into ddev:master Oct 10, 2018
@rfay rfay deleted the 20180929_validate_projectname branch October 10, 2018 01:02
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.

None yet

2 participants