commit 741b18d8a13b5282618422f8707b970870f27e81
Author: Miguel Jacq <mig@mig5.net>
Date:   Sun Nov 13 13:03:31 2011 +1100

    add a conditional when validating site aliases to ensure that not only do no other sites use this alias, but that it isn't identical to the site name itself. Fixes #1333978 redirect loop

diff --git a/modules/hosting/alias/hosting_alias.module b/modules/hosting/alias/hosting_alias.module
index 16ce326..1c25f7d 100644
--- a/modules/hosting/alias/hosting_alias.module
+++ b/modules/hosting/alias/hosting_alias.module
@@ -206,7 +206,7 @@ function hosting_alias_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
         $aliases = explode("\n", $node->aliases);
         foreach ($aliases as $alias) {
           if ($alias = trim($alias)) {
-            if (!hosting_domain_allowed($alias, (array) $node)) {
+            if (!hosting_domain_allowed($alias, array('nid' => $node->nid)) || $alias == $node->title) {
               form_set_error('aliases', t('The domain name @alias is already in use', array('@alias' => $alias)));
             }
           }
