Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7b9c32c8e | ||
|
|
dbcc43c758 | ||
|
|
c34954ce8d | ||
|
|
eaa26fe204 | ||
|
|
b7ff1fe87c | ||
|
|
6f6875134f | ||
|
|
959192c279 |
@@ -538,7 +538,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
|||||||
('panel', 'password_numeric', '0'),
|
('panel', 'password_numeric', '0'),
|
||||||
('panel', 'password_special_char_required', '0'),
|
('panel', 'password_special_char_required', '0'),
|
||||||
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
||||||
('panel', 'version', '0.9.33.1');
|
('panel', 'version', '0.9.33.2');
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `panel_tasks`;
|
DROP TABLE IF EXISTS `panel_tasks`;
|
||||||
|
|||||||
@@ -2900,3 +2900,11 @@ if (isFroxlorVersion('0.9.33')) {
|
|||||||
updateToVersion('0.9.33.1');
|
updateToVersion('0.9.33.1');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isFroxlorVersion('0.9.33.1')) {
|
||||||
|
|
||||||
|
showUpdateStep("Updating from 0.9.33.1 to 0.9.33.2");
|
||||||
|
lastStepStatus(0);
|
||||||
|
updateToVersion('0.9.33.2');
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ class Database {
|
|||||||
&& isset($sql['root_password'])
|
&& isset($sql['root_password'])
|
||||||
&& (!isset($sql_root) || !is_array($sql_root))
|
&& (!isset($sql_root) || !is_array($sql_root))
|
||||||
) {
|
) {
|
||||||
$sql_root = array(0 => array('caption' => 'Default', 'host' => $sql['host'], 'user' => $sql['root_user'], 'password' => $sql['root_password']));
|
$sql_root = array(0 => array('caption' => 'Default', 'host' => $sql['host'], 'socket' => (isset($sql['socket']) ? $sql['socket'] : null), 'user' => $sql['root_user'], 'password' => $sql['root_password']));
|
||||||
unset($sql['root_user']);
|
unset($sql['root_user']);
|
||||||
unset($sql['root_password']);
|
unset($sql['root_password']);
|
||||||
}
|
}
|
||||||
@@ -235,11 +235,15 @@ class Database {
|
|||||||
$user = $sql_root[self::$_dbserver]['user'];
|
$user = $sql_root[self::$_dbserver]['user'];
|
||||||
$password = $sql_root[self::$_dbserver]['password'];
|
$password = $sql_root[self::$_dbserver]['password'];
|
||||||
$host = $sql_root[self::$_dbserver]['host'];
|
$host = $sql_root[self::$_dbserver]['host'];
|
||||||
|
$socket = isset($sql_root[self::$_dbserver]['socket']) ? $sql_root[self::$_dbserver]['socket'] : null;
|
||||||
|
$port = isset($sql_root[self::$_dbserver]['port']) ? $sql_root[self::$_dbserver]['port'] : '3306';
|
||||||
} else {
|
} else {
|
||||||
$caption = 'localhost';
|
$caption = 'localhost';
|
||||||
$user = $sql["user"];
|
$user = $sql["user"];
|
||||||
$password = $sql["password"];
|
$password = $sql["password"];
|
||||||
$host = $sql["host"];
|
$host = $sql["host"];
|
||||||
|
$socket = isset($sql['socket']) ? $sql['socket'] : null;
|
||||||
|
$port = isset($sql['port']) ? $sql['port'] : '3306';
|
||||||
}
|
}
|
||||||
|
|
||||||
// save sql-access-data if needed
|
// save sql-access-data if needed
|
||||||
@@ -248,6 +252,8 @@ class Database {
|
|||||||
'user' => $user,
|
'user' => $user,
|
||||||
'passwd' => $password,
|
'passwd' => $password,
|
||||||
'host' => $host,
|
'host' => $host,
|
||||||
|
'port' => $port,
|
||||||
|
'socket' => $socket,
|
||||||
'db' => $sql["db"],
|
'db' => $sql["db"],
|
||||||
'caption' => $caption
|
'caption' => $caption
|
||||||
);
|
);
|
||||||
@@ -264,10 +270,11 @@ class Database {
|
|||||||
'charset' => 'utf8'
|
'charset' => 'utf8'
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!validateLocalHostname($host) && !validate_ip2($host, true, 'invalidip', true, true)) {
|
if ($socket != null) {
|
||||||
$dbconf["dsn"]['unix_socket'] = makeCorrectFile($host);
|
$dbconf["dsn"]['unix_socket'] = makeCorrectFile($socket);
|
||||||
} else {
|
} else {
|
||||||
$dbconf["dsn"]['host'] = $host;
|
$dbconf["dsn"]['host'] = $host;
|
||||||
|
$dbconf["dsn"]['port'] = $port;
|
||||||
}
|
}
|
||||||
|
|
||||||
self::$_dbname = $sql["db"];
|
self::$_dbname = $sql["db"];
|
||||||
@@ -305,47 +312,15 @@ class Database {
|
|||||||
private static function _showerror($error, $showerror = true) {
|
private static function _showerror($error, $showerror = true) {
|
||||||
global $userinfo, $theme, $linker;
|
global $userinfo, $theme, $linker;
|
||||||
|
|
||||||
/**
|
|
||||||
* log to a file, so we can actually ask people for the error
|
|
||||||
* (no one seems to find the stuff in the syslog)
|
|
||||||
*/
|
|
||||||
$sl_dir = makeCorrectDir(FROXLOR_INSTALL_DIR."/logs/");
|
|
||||||
if (!file_exists($sl_dir)) {
|
|
||||||
@mkdir($sl_dir, 0755);
|
|
||||||
}
|
|
||||||
$sl_file = makeCorrectFile($sl_dir."/sql-error.log");
|
|
||||||
$sqllog = @fopen($sl_file, 'a');
|
|
||||||
@fwrite($sqllog, date('d.m.Y H:i', time())." --- ".str_replace("\n", " ", $error->getMessage())."\n");
|
|
||||||
@fwrite($sqllog, date('d.m.Y H:i', time())." --- DEBUG: \n".$error->getTraceAsString()."\n");
|
|
||||||
@fclose($sqllog);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* log error for reporting
|
|
||||||
*/
|
|
||||||
$errid = substr(md5(microtime()), 5, 5);
|
|
||||||
$err_file = makeCorrectFile($sl_dir."/".$errid."_sql-error.log");
|
|
||||||
$errlog = @fopen($err_file, 'w');
|
|
||||||
@fwrite($errlog, "|CODE ".$error->getCode()."\n");
|
|
||||||
@fwrite($errlog, "|MSG ".$error->getMessage()."\n");
|
|
||||||
@fwrite($errlog, "|FILE ".$error->getFile()."\n");
|
|
||||||
@fwrite($errlog, "|LINE ".$error->getLine()."\n");
|
|
||||||
@fwrite($errlog, "|TRACE\n".$error->getTraceAsString()."\n");
|
|
||||||
@fclose($errlog);
|
|
||||||
|
|
||||||
if ($showerror) {
|
|
||||||
|
|
||||||
// include userdata.inc.php
|
// include userdata.inc.php
|
||||||
require FROXLOR_INSTALL_DIR."/lib/userdata.inc.php";
|
require FROXLOR_INSTALL_DIR."/lib/userdata.inc.php";
|
||||||
|
|
||||||
// fallback
|
|
||||||
$theme = 'Sparkle';
|
|
||||||
|
|
||||||
// le format
|
// le format
|
||||||
if (isset($sql['root_user'])
|
if (isset($sql['root_user'])
|
||||||
&& isset($sql['root_password'])
|
&& isset($sql['root_password'])
|
||||||
&& (!isset($sql_root) || !is_array($sql_root))
|
&& (!isset($sql_root) || !is_array($sql_root))
|
||||||
) {
|
) {
|
||||||
$sql_root = array(0 => array('caption' => 'Default', 'host' => $sql['host'], 'user' => $sql['root_user'], 'password' => $sql['root_password']));
|
$sql_root = array(0 => array('caption' => 'Default', 'host' => $sql['host'], 'socket' => (isset($sql['socket']) ? $sql['socket'] : null), 'user' => $sql['root_user'], 'password' => $sql['root_password']));
|
||||||
}
|
}
|
||||||
|
|
||||||
// hide username/password in messages
|
// hide username/password in messages
|
||||||
@@ -358,6 +333,42 @@ class Database {
|
|||||||
$error_trace = str_replace($sql['password'], 'DB_UNPRIV_PWD', $error_trace);
|
$error_trace = str_replace($sql['password'], 'DB_UNPRIV_PWD', $error_trace);
|
||||||
$error_trace = str_replace($sql_root[0]['password'], 'DB_ROOT_PWD', $error_trace);
|
$error_trace = str_replace($sql_root[0]['password'], 'DB_ROOT_PWD', $error_trace);
|
||||||
|
|
||||||
|
if ($error->getCode() == 2003) {
|
||||||
|
$error_message = "Unable to connect to database. Either the mysql-server is not running or your user/password is wrong.";
|
||||||
|
$error_trace = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* log to a file, so we can actually ask people for the error
|
||||||
|
* (no one seems to find the stuff in the syslog)
|
||||||
|
*/
|
||||||
|
$sl_dir = makeCorrectDir(FROXLOR_INSTALL_DIR."/logs/");
|
||||||
|
if (!file_exists($sl_dir)) {
|
||||||
|
@mkdir($sl_dir, 0755);
|
||||||
|
}
|
||||||
|
openlog("froxlor", LOG_PID | LOG_PERROR, LOG_LOCAL0);
|
||||||
|
syslog(LOG_WARNING, str_replace("\n", " ", $error_message));
|
||||||
|
syslog(LOG_WARNING, str_replace("\n", " ", "--- DEBUG: ".$error_trace));
|
||||||
|
closelog();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* log error for reporting
|
||||||
|
*/
|
||||||
|
$errid = substr(md5(microtime()), 5, 5);
|
||||||
|
$err_file = makeCorrectFile($sl_dir."/".$errid."_sql-error.log");
|
||||||
|
$errlog = @fopen($err_file, 'w');
|
||||||
|
@fwrite($errlog, "|CODE ".$error->getCode()."\n");
|
||||||
|
@fwrite($errlog, "|MSG ".$error_message."\n");
|
||||||
|
@fwrite($errlog, "|FILE ".$error->getFile()."\n");
|
||||||
|
@fwrite($errlog, "|LINE ".$error->getLine()."\n");
|
||||||
|
@fwrite($errlog, "|TRACE\n".$error_trace."\n");
|
||||||
|
@fclose($errlog);
|
||||||
|
|
||||||
|
if ($showerror) {
|
||||||
|
|
||||||
|
// fallback
|
||||||
|
$theme = 'Sparkle';
|
||||||
|
|
||||||
// clean up sensitive data
|
// clean up sensitive data
|
||||||
unset($sql);
|
unset($sql);
|
||||||
unset($sql_root);
|
unset($sql_root);
|
||||||
@@ -388,7 +399,8 @@ class Database {
|
|||||||
die($err_hint);
|
die($err_hint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
die("We are sorry, but a MySQL - error occurred. The administrator may find more information in in the sql-error.log in the logs/ directory");
|
die("We are sorry, but a MySQL - error occurred. The administrator may find more information in the syslog");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,6 @@ define('TABLE_PANEL_DOMAIN_SSL_SETTINGS', 'domain_ssl_settings');
|
|||||||
define('TABLE_DOMAINTOIP', 'panel_domaintoip');
|
define('TABLE_DOMAINTOIP', 'panel_domaintoip');
|
||||||
|
|
||||||
// VERSION INFO
|
// VERSION INFO
|
||||||
$version = '0.9.33.1';
|
$version = '0.9.33.2';
|
||||||
$dbversion = '2';
|
$dbversion = '2';
|
||||||
$branding = '';
|
$branding = '';
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ for ($x = 1; $x < count($argv); $x++) {
|
|||||||
// really force re-generating of config-files by
|
// really force re-generating of config-files by
|
||||||
// inserting task 1
|
// inserting task 1
|
||||||
inserttask('1');
|
inserttask('1');
|
||||||
|
// bind (if enabled, inserttask() checks this)
|
||||||
|
inserttask('4');
|
||||||
// also regenerate cron.d-file
|
// also regenerate cron.d-file
|
||||||
inserttask('99');
|
inserttask('99');
|
||||||
addToQueue($jobs_to_run, $crontasks);
|
addToQueue($jobs_to_run, $crontasks);
|
||||||
|
|||||||
@@ -58,7 +58,12 @@ class apache_fcgid extends apache
|
|||||||
$php_options_text.= ' </FilesMatch>' . "\n";
|
$php_options_text.= ' </FilesMatch>' . "\n";
|
||||||
// >=apache-2.4 enabled?
|
// >=apache-2.4 enabled?
|
||||||
if (Settings::Get('system.apache24') == '1') {
|
if (Settings::Get('system.apache24') == '1') {
|
||||||
|
$mypath_dir = new frxDirectory($domain['documentroot']);
|
||||||
|
// only create the require all granted if there is not active directory-protection
|
||||||
|
// for this path, as this would be the first require and therefore grant all access
|
||||||
|
if ($mypath_dir->isUserProtected() == false) {
|
||||||
$php_options_text.= ' Require all granted' . "\n";
|
$php_options_text.= ' Require all granted' . "\n";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$php_options_text.= ' Order allow,deny' . "\n";
|
$php_options_text.= ' Order allow,deny' . "\n";
|
||||||
$php_options_text.= ' allow from all' . "\n";
|
$php_options_text.= ' allow from all' . "\n";
|
||||||
@@ -90,7 +95,12 @@ class apache_fcgid extends apache
|
|||||||
$php_options_text.= ' </FilesMatch>' . "\n";
|
$php_options_text.= ' </FilesMatch>' . "\n";
|
||||||
// >=apache-2.4 enabled?
|
// >=apache-2.4 enabled?
|
||||||
if (Settings::Get('system.apache24') == '1') {
|
if (Settings::Get('system.apache24') == '1') {
|
||||||
|
$mypath_dir = new frxDirectory($domain['documentroot']);
|
||||||
|
// only create the require all granted if there is not active directory-protection
|
||||||
|
// for this path, as this would be the first require and therefore grant all access
|
||||||
|
if ($mypath_dir->isUserProtected() == false) {
|
||||||
$php_options_text.= ' Require all granted' . "\n";
|
$php_options_text.= ' Require all granted' . "\n";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$php_options_text.= ' Order allow,deny' . "\n";
|
$php_options_text.= ' Order allow,deny' . "\n";
|
||||||
$php_options_text.= ' allow from all' . "\n";
|
$php_options_text.= ' allow from all' . "\n";
|
||||||
|
|||||||
13
templates/Sparkle/webftp/webftp_navigation_element.tpl
vendored
Normal file
13
templates/Sparkle/webftp/webftp_navigation_element.tpl
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<div class="menuelement">
|
||||||
|
<h4>
|
||||||
|
{if $navurl != '#'}
|
||||||
|
<a href="{$navurl}" {$target} class="menu">{$navlabel}</a>
|
||||||
|
{else}
|
||||||
|
{$navlabel}
|
||||||
|
{/if}
|
||||||
|
</h4>
|
||||||
|
<ul>
|
||||||
|
{$navigation_links}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
@@ -102,6 +102,7 @@ service auth {
|
|||||||
unix_listener auth-client {
|
unix_listener auth-client {
|
||||||
mode = 0660
|
mode = 0660
|
||||||
user = mail
|
user = mail
|
||||||
|
group = Debian-exim
|
||||||
}
|
}
|
||||||
|
|
||||||
# Auth process is run as this user.
|
# Auth process is run as this user.
|
||||||
|
|||||||
19
webftp.php
19
webftp.php
@@ -664,15 +664,24 @@ if (isset($_GET['logoff']) || isset($_POST['logoff'])) {
|
|||||||
$body .= $smarty->fetch('webftp/webftp_main_multiple.tpl');
|
$body .= $smarty->fetch('webftp/webftp_main_multiple.tpl');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$smarty->assign('completeLink', '<a href="webftp.php?logoff=true">' . _('Logout') . '</a>');
|
|
||||||
|
$smarty->assign('target', '');
|
||||||
|
$smarty->assign('active', '');
|
||||||
|
|
||||||
|
$smarty->assign('navurl', 'webftp.php?logoff=true');
|
||||||
|
$smarty->assign('navlabel', _('Logout'));
|
||||||
$navlinks = $smarty->fetch('navigation_link.tpl');
|
$navlinks = $smarty->fetch('navigation_link.tpl');
|
||||||
$smarty->assign('completeLink', '<a href="webftp.php?webftp.php?action=mode&mode=FTP_BINARY&currentDir=' . $currentDir . '">' . _('Switch to BINARY mode') . '</a>');
|
$smarty->assign('navurl', 'webftp.php?webftp.php?action=mode&mode=FTP_BINARY&currentDir=' . $currentDir);
|
||||||
|
$smarty->assign('navlabel', _('Switch to BINARY mode'));
|
||||||
$navlinks .= $smarty->fetch('navigation_link.tpl');
|
$navlinks .= $smarty->fetch('navigation_link.tpl');
|
||||||
$smarty->assign('completeLink', '<a href="webftp.php?webftp.php?action=mode&mode=FTP_ASCII&currentDir=' . $currentDir . '">' . _('Switch to ASCII mode') . '</a>');
|
$smarty->assign('navurl', 'webftp.php?webftp.php?action=mode&mode=FTP_ASCII&currentDir=' . $currentDir);
|
||||||
|
$smarty->assign('navlabel', _('Switch to ASCII mode'));
|
||||||
$navlinks .= $smarty->fetch('navigation_link.tpl');
|
$navlinks .= $smarty->fetch('navigation_link.tpl');
|
||||||
$smarty->assign('completeLink', _('Main'));
|
$smarty->assign('navlabel', _('Main'));
|
||||||
|
$smarty->assign('navurl', "#");
|
||||||
$smarty->assign('navigation_links', $navlinks);
|
$smarty->assign('navigation_links', $navlinks);
|
||||||
$smarty->assign('navigation', $smarty->fetch('navigation_element.tpl'));
|
$smarty->assign('navigation', $smarty->fetch('webftp/webftp_navigation_element.tpl'));
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$smarty->assign('errormessage', _('Login failed, please try again') . "\n");
|
$smarty->assign('errormessage', _('Login failed, please try again') . "\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user