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:
parent
9103f677fd
commit
d40ecfe9d1
|
@ -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;
|
||||
|
|
|
@ -1001,12 +1001,15 @@ 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)){
|
||||
$err->raise("dom",_("Cannot write to the destination folder"));
|
||||
if(!@mkdir($dirr,0770,true)){
|
||||
$err->raise("dom",_("Cannot write to the destination folder"));
|
||||
}
|
||||
umask($old);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue