Repository navigation
Closed
Description
What happened:
I created a site with sitename with a suspected invalid character. When I attempted to take the site through the workflow, the site spin-up failed with an Exit code 1.
What you expected to happen:
I expected the site to come up all the way.
How to reproduce it (as minimally and precisely as possible):
Create a folder with an invalid site name and use it as the default site name or just run ddev config and try plugging in a site name with invalid characterts.
Anything else do we need to know:
People might have folder names that we have to sanitize (e.g. they interact with their folders through Finder and use invalid characters in the folder name. In general, the sitename input should be sanitized.
Related source links or issues:
Console Output
➜ src mkdir invalid-drud-site\?
➜ src cd invalid-drud-site\?
➜ invalid-drud-site? cp -R ../drud-d7/docroot .
➜ invalid-drud-site? ddev config
Creating a new ddev project config in the current directory (/Users/csterling/src/invalid-drud-site?)
Once completed, your configuration will be written to /Users/csterling/src/invalid-drud-site?/.ddev/config.yaml
Project name (invalid-drud-site?):
The docroot is the directory from which your site is served. This is a relative path from your application root (/Users/csterling/src/invalid-drud-site?)
You may leave this value blank if your site files are in the application root
Docroot Location: docroot
Found a drupal7 codebase at /Users/csterling/src/invalid-drud-site?/docroot
➜ invalid-drud-site? ddev start
Starting environment for invalid-drud-site?...
Adding hostfile entry. You will be prompted for your password.
Password:
Failed to start invalid-drud-site?: exit status 1
Activity
rfay commentedon Apr 18, 2017
Mostly we should be able to handle the vast majority of characters, anything that's utf-8. Except what's not allowed in a domain name right?
It looks like the old ascii rules are in http://www.ietf.org/rfc/rfc1034.txt
And the new IDNA rules are in https://en.wikipedia.org/wiki/Internationalized_domain_name
So we probably just have to choose a strategy and then normalize for it. IMO forcing ascii would be OK.
rickmanelius commentedon Jun 20, 2017
Looks like we're proceeding on this. Removing the "needs decision" blocker and adding flags for tests. Not sure documentation is necessary if we end up prompting the user that we only support alphanumeric + dash character as input!
validate sitenames, validate config during init, fixes ddev#86 (ddev#339
rickmanelius commentedon Mar 5, 2018
This tripped me up. I was reviewing https://github.com/drud/ddev/pull/712/files#diff-0c9a20c1c50fca454d4715bf175e38bdR135 and I tried to pass in the project name "test^☃site" (because honestly, who doesn't want to have a snowman domain name). It broke when running
ddev start. Perhaps a regression from here? #339rickmanelius commentedon Mar 5, 2018
Updated the milestone to reflect when this was officially released.
rfay commentedon Sep 25, 2018
We need to solve this bug. It trips people from time to time.