Closed (fixed)
Project:
Provision
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Jul 2013 at 19:44 UTC
Updated:
12 Jun 2014 at 08:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ergonlogicWe already do validate the admin email ininstall.hostmaster.inc. It'll bypass the check if the '-y' flag is set though. How are you running the install?
Comment #2
jon pughHmm... yeah. I am using the devshop install script.
Not sure how to solve this. I'd say for core aegir, maybe display a message on node/add/site if your mail isn't valid?
For devshop I would also need to check for this on node/add/project as well... thoughts?
Comment #3
ergonlogicThe site form is already overly complicated, so it'd be best not to add additional validation for such a corner case. Another approach might be to validate the email address in install_main() and so forth. We could then set a valid default and throw a warning.
Comment #4
ergonlogicFixed in 77cbe7d.
Comment #5
anarcat commentedI'm not sure I like the new default. 'localhost' is a valid domain, while 'example.com' is actually not: rfc2606 reserved that domain for "documentation and testing" purposes. While the idea behind the RFC is cover the situations where the "example.com" domain may "escape" test beds and documentation, it is fairly clear that it is not expected behavior.
We should instead use a real domain, preferably the domain associated with the server the site is on.
Comment #6
ergonlogicHow's this for a start? First, we can't use expressions to define constants. For now, I just used
global $url, since, at least we know it's a valid fqdn.For "the domain associated with the server the site is on", I guess we can look up the task context, and then parse the 'master_url'. I think that'd be preferable to looking at
$_SERVER['SERVER_NAME']or the like. Since the site would be built on the master then synced out to remotes, this would end up using the master's domain (I think).Comment #7
anarcat commentedlooks much better, thanks!
Comment #8
ergonlogicI considered doing this:
While it works well, in that is uses "the domain associated with the server the site is on", it won't actually fix this issue. In fact, it gets us right back to square one.
Also, it turns out that '
global $url', is not in fact validated as an FQDN, so that doesn't help too much either. Since the point is to ensure the site install succeeds while throwing a warning that will prompt action, I went with the following:I replaced example.com with '.invalid', since this appears to be a proper use of said TLD. Also, since it's independent of the version of Drupal being installed, I moved this function into install.inc.
Fixed in 16ce3af.
Comment #9
anarcat commentedgreat! i didn't know about .invalid!