- use correct function to validate directory, fixes #385

This commit is contained in:
Michael Kaufmann (d00p)
2010-08-20 14:45:37 +00:00
parent a63e752dde
commit cf2dabc714
2 changed files with 3 additions and 3 deletions

View File

@@ -960,7 +960,7 @@ if(isFroxlorVersion('0.9.12-svn1'))
showUpdateStep("Updating from 0.9.12-svn1 to 0.9.12-svn2", false);
$update_perl_suexecworkaround = isset($_POST['update_perl_suexecworkaround']) ? (int)$_POST['update_perl_suexecworkaround'] : '0';
$update_perl_suexecpath = isset($_POST['update_perl_suexecpath']) ? makeCorrectPath($_POST['update_perl_suexecpath']) : '/var/www/cgi-bin/';
$update_perl_suexecpath = isset($_POST['update_perl_suexecpath']) ? makeCorrectDir($_POST['update_perl_suexecpath']) : '/var/www/cgi-bin/';
if($update_perl_suexecpath == '') {
$update_perl_suexecpath = '/var/www/cgi-bin/';
@@ -989,7 +989,7 @@ if(isFroxlorVersion('0.9.12-svn3'))
{
showUpdateStep("Updating from 0.9.12-svn3 to 0.9.12-svn4", false);
$update_awstats_awstatspath = isset($_POST['update_awstats_awstatspath']) ? makeCorrectPath($_POST['update_awstats_awstatspath']) : $settings['system']['awstats_path'];
$update_awstats_awstatspath = isset($_POST['update_awstats_awstatspath']) ? makeCorrectDir($_POST['update_awstats_awstatspath']) : $settings['system']['awstats_path'];
showUpdateStep("Adding new settings for awstats");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_awstatspath', '".$db->escape($update_awstats_awstatspath)."');");

View File

@@ -76,7 +76,7 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '')
// for the Dropdown, #225
$value = substr($value, 1);
$field = $lng['panel']['toomanydirs'];
$field.= '<input type="text" name="path" value="' . htmlspecialchars($value) . '" />';
$field.= '<br /><input type="text" name="path" value="' . htmlspecialchars($value) . '" />';
}
}
else