From d40ecfe9d1fbff0fee83b2b95d7b39a770674068 Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Thu, 21 Feb 2013 17:24:58 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20#1314=20->=20possible=20de=20d=C3=A9sacti?= =?UTF-8?q?ver=20TOUT=20les=20checks=20de=20TLD.=20Mouahaha.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix un bug de déploiement de répertoire si on fait vraiment des trucs vicieux et stupide. --- bureau/class/functions.php | 3 +++ bureau/class/m_dom.php | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bureau/class/functions.php b/bureau/class/functions.php index c6113522..b30e1e0d 100644 --- a/bureau/class/functions.php +++ b/bureau/class/functions.php @@ -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; diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index 2076458b..5fe66f07 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -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); }