Skip to content

Sanitize Site Names #86

Closed
Closed

Description

@TopherGopher

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

  1. rfay commented on Apr 18, 2017

    @rfay
    Member

    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.

  2. added this to the milestone on Jun 2, 2017
  3. self-assigned this
    on Jun 16, 2017
  4. rickmanelius commented on Jun 20, 2017

    @rickmanelius
    Contributor

    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!

  5. added a commit that references this issue on Jun 27, 2017
    07ffa4f
  6. rickmanelius commented on Mar 5, 2018

    @rickmanelius
    Contributor

    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? #339

  7. modified the milestones: v1.0.0, v0.9.1 on Mar 5, 2018
  8. rickmanelius commented on Mar 5, 2018

    @rickmanelius
    Contributor

    Updated the milestone to reflect when this was officially released.

  9. rfay commented on Sep 25, 2018

    @rfay
    Member

    We need to solve this bug. It trips people from time to time.

  10. modified the milestones: v0.9.1, v1.3.0 on Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions