Fix #1314 -> possible de désactiver TOUT les checks de TLD. Mouahaha.

Fix un bug de déploiement de répertoire si on fait vraiment des trucs vicieux et stupide.
This commit is contained in:
Alan Garcia 2013-02-21 17:24:58 +00:00
parent 9103f677fd
commit d40ecfe9d1
2 changed files with 8 additions and 2 deletions

View File

@ -55,6 +55,9 @@ function checkhostallow($domain,$dns) {
}
}
}
$tld_no_check_at_all = variable_get('tld_no_check_at_all', 0,'Set to 1 to disable ALL check on the TLD (users will be able to add any domain)');
if ( $tld_no_check_at_all )
return 0; // OK , the boss say that you can.
if (!$found || $fmode==0) // TLD not allowed at all
return -1;

View File

@ -1001,11 +1001,14 @@ class m_dom {
}
}
}
// Error: can't create /var/www/alternc/a/adminhttps://webmail.somme-communication.fr
if ($db->f('create_targetdir')) {
$dirr=$dest_root.$dest;
$dirr=str_replace('//','/',$dirr);
if (! is_dir($dirr)) {
$old = umask(0);
if(!mkdir($dirr,0770,true)){
if(!@mkdir($dirr,0770,true)){
$err->raise("dom",_("Cannot write to the destination folder"));
}
umask($old);