Merge pull request #2 from serghey-rodin/master

sync
This commit is contained in:
Александр Кунич 2020-09-10 16:08:33 +03:00 committed by GitHub
commit 10db786cd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
78 changed files with 191 additions and 158 deletions

View file

@ -55,7 +55,7 @@ if [ "$domain_lvl" -eq 1 ] || [ "${#top_domain}" -le '6' ]; then
fi
# Adding top-level domain and then its sub
$BIN/v-add-dns-domain $user $top_domain $ip '' '' '' '' '' $restart >> /dev/null
$BIN/v-add-dns-domain $user $top_domain $ip '' '' '' '' '' '' '' '' $restart >> /dev/null
# Checking top-level domain
if [ ! -e "$USER_DATA/dns/$top_domain.conf" ]; then

View file

@ -209,7 +209,7 @@ for auth in $authz; do
if [ "$i" -gt 10 ]; then
check_result $E_CONNECT "Let's Encrypt domain validation timeout"
fi
sleep 1
sleep $((i*2))
done
if [ "$validation" = 'invalid' ]; then
check_result $E_CONNECT "Let's Encrypt domain verification failed"

View file

@ -143,6 +143,8 @@ if [ ! -z "$UPDATE_HOSTNAME_SSL" ] && [ "$UPDATE_HOSTNAME_SSL" = "yes" ]; then
fi
fi
UPDATE_SSL_SCRIPT=''
source $VESTA/conf/vesta.conf
if [ ! -z "$UPDATE_SSL_SCRIPT" ]; then
eval "$UPDATE_SSL_SCRIPT $user $domain"
fi

View file

@ -479,7 +479,8 @@ if [ "$USER" != '*' ]; then
exclusion=$(echo "$USER" |tr ',' '\n' |grep "^$udir$")
if [ -z "$exclusion" ]; then
((i ++))
udir_list="$udir_list $udir"
udir_str=$(echo "$udir" |sed -e "s|'|\\\'|g")
udir_list="$udir_list $udir_str"
echo -e "$(date "+%F %T") adding $udir" |tee -a $BACKUP/$user.log
# Backup files and dirs
@ -594,7 +595,7 @@ ftp_backup() {
fi
# Debug info
echo -e "$(date "+%F %T") Remote: ftp://$HOST$BPATH/$user.$backup_new_date.tar"
echo -e "$(date "+%F %T") Remote: ftp://$HOST/$BPATH/$user.$backup_new_date.tar"
# Checking ftp connection
fconn=$(ftpc)

View file

@ -13,6 +13,10 @@
user=$1
password=$2; HIDE=2
# Importing system enviroment as we run this script
# mostly by cron wich not read it by itself
source /etc/profile
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
@ -22,6 +26,9 @@ source $VESTA/conf/vesta.conf
# Verifications #
#----------------------------------------------------------#
if [ "$user" = "root" ]; then
check_result $E_FORBIDEN "Changing root password is forbiden"
fi
check_args '2' "$#" 'USER PASSWORD'
is_format_valid 'user'
is_object_valid 'user' 'USER' "$user"

View file

@ -22,7 +22,7 @@ json_list() {
i=1
objects=$(grep BACKUP $USER_DATA/backup.conf |wc -l)
echo "{"
while read str; do
while read -r str; do
eval $str
echo -n ' "'$BACKUP'": {
"TYPE": "'$TYPE'",

View file

@ -50,7 +50,9 @@ if [ -z "$PROXY_SYSTEM" ] || [ "$PROXY_SYSTEM" = 'remote' ]; then
fi
# Restart system
service $PROXY_SYSTEM restart >/dev/null 2>&1
# service $PROXY_SYSTEM restart >/dev/null 2>&1
systemctl reset-failed $PROXY_SYSTEM
systemctl restart $PROXY_SYSTEM > /dev/null 2>&1
if [ $? -ne 0 ]; then
send_email_report
check_result $E_RESTART "$PROXY_SYSTEM restart failed"

View file

@ -289,7 +289,7 @@ if [ "$web" != 'no' ] && [ ! -z "$WEB_SYSTEM" ]; then
if [ -z "$web" ] || [ "$web" = '*' ]; then
domains="$backup_domains"
else
echo "$web" |tr ',' '\n' > $tmpdir/selected.txt
echo "$web" | tr ',' '\n' | sed -e "s/^/^/" > $tmpdir/selected.txt
domains=$(echo "$backup_domains" |egrep -f $tmpdir/selected.txt)
fi
@ -409,7 +409,7 @@ if [ "$web" != 'no' ] && [ ! -z "$WEB_SYSTEM" ]; then
chown $user $tmpdir
chmod u+w $HOMEDIR/$user/web/$domain
sudo -u $user tar -xzpf $tmpdir/web/$domain/domain_data.tar.gz \
-C $HOMEDIR/$user/web/$domain/ --exclude=logs/* \
-C $HOMEDIR/$user/web/$domain/ --exclude=./logs/* \
2> $HOMEDIR/$user/web/$domain/restore_errors.log
if [ -e "$HOMEDIR/$user/web/$domain/restore_errors.log" ]; then
chown $user:$user $HOMEDIR/$user/web/$domain/restore_errors.log

View file

@ -322,7 +322,7 @@ delete_pgsql_database() {
psql_connect $HOST
query="REVOKE ALL PRIVILEGES ON DATABASE $database FROM $DBUSER"
psql_qyery "$query" > /dev/null
psql_query "$query" > /dev/null
query="DROP DATABASE $database"
psql_query "$query" > /dev/null

View file

@ -412,6 +412,24 @@ update_domain_zone() {
VALUE=$(idn --quiet -a -t "$VALUE")
fi
# Split long TXT entries into 255 chunks
if [ "$TYPE" = 'TXT' ]; then
txtlength=${#VALUE}
if [ $txtlength -gt 255 ]; then
already_chunked=0
if [[ $VALUE == *"\" \""* ]] || [[ $VALUE == *"\"\""* ]]; then
already_chunked=1
fi
if [ $already_chunked -eq 0 ]; then
if [[ ${VALUE:0:1} = '"' ]]; then
txtlength=$(( $txtlength - 2 ))
VALUE=${VALUE:1:txtlength}
fi
VALUE=$(echo $VALUE | fold -w 255 | xargs -I '$' echo -n '"$"')
fi
fi
fi
if [ "$SUSPENDED" != 'yes' ]; then
eval echo -e "\"$fields\""|sed "s/%quote%/'/g" >> $zn_conf
fi

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpMyAdmin/;
alias /usr/share/phpMyAdmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phpPgAdmin/;
alias /usr/share/phpPgAdmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phpPgAdmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /usr/share/roundcubemail/;
alias /usr/share/roundcubemail;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpMyAdmin/;
alias /usr/share/phpMyAdmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phpPgAdmin/;
alias /usr/share/phpPgAdmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phpPgAdmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /usr/share/roundcubemail/;
alias /usr/share/roundcubemail;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpMyAdmin/;
alias /usr/share/phpMyAdmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phpPgAdmin/;
alias /usr/share/phpPgAdmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phpPgAdmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /usr/share/roundcubemail/;
alias /usr/share/roundcubemail;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -1,5 +1,5 @@
location /phpmyadmin {
alias /usr/share/phpmyadmin/;
alias /usr/share/phpmyadmin;
location ~ /(libraries|setup) {
return 404;

View file

@ -1,5 +1,5 @@
location /phppgadmin {
alias /usr/share/phppgadmin/;
alias /usr/share/phppgadmin;
location ~ ^/phppgadmin/(.*\.php)$ {
alias /usr/share/phppgadmin/$1;

View file

@ -1,5 +1,5 @@
location /webmail {
alias /var/lib/roundcube/;
alias /var/lib/roundcube;
location ~ /(config|temp|logs) {
return 404;

View file

@ -688,6 +688,7 @@ chmod 755 /usr/bin/rssh
mkdir -p /etc/sudoers.d
cp -f $vestacp/sudo/admin /etc/sudoers.d/
chmod 440 /etc/sudoers.d/admin
sed -i "s/%admin.*ALL=(ALL).*/# sudo is limited to vesta scripts/" /etc/sudoers
# Configuring system env
echo "export VESTA='$VESTA'" > /etc/profile.d/vesta.sh

View file

@ -4,3 +4,5 @@ if [ -e "/etc/sudoers.d/admin" ]; then
sed -i "s/admin.*ALL=(ALL).*/# sudo is limited to vesta scripts/" \
/etc/sudoers.d/admin
fi
sed -i "s/%admin.*ALL=(ALL).*/# sudo is limited to vesta scripts/" /etc/sudoers

View file

@ -356,7 +356,7 @@ if (!empty($_POST['save'])) {
// Change remote backup host type
if (empty($_SESSION['error_msg'])) {
if ((!empty($_POST['v_backup_host'])) && ($_POST['v_backup_type'] != $v_backup_type)) {
exec (VESTA_CMD."v-delete-backup-host ". $v_backup_type, $output, $return_var);
exec (VESTA_CMD."v-delete-backup-host " . escapeshellarg($v_backup_type), $output, $return_var);
unset($output);
$v_backup_host = escapeshellarg($_POST['v_backup_host']);

View file

@ -47,8 +47,8 @@ $LANG['cn'] = array(
'no notifications' => '没有通知',
'Add User' => '添加用户',
'Add Domain' => '添加域名',
'Add User' => '添加用户账户',
'Add Domain' => '添加网站域名',
'Add Web Domain' => '添加网站域名',
'Add DNS Domain' => '添加DNS域名',
'Add DNS Record' => '添加DNS记录',
@ -56,12 +56,12 @@ $LANG['cn'] = array(
'Add Mail Account' => '添加邮箱账户',
'Add Database' => '添加数据库',
'Add Cron Job' => '添加定时任务',
'Create Backup' => '创建备份',
'Create Backup' => '创建数据备份',
'Configure' => '配置',
'Restore All' => '全部恢复',
'Add Package' => '添加方案',
'Add Package' => '添加用户方案',
'Add IP' => '添加IP地址',
'Add Rule' => '添加规则',
'Add Rule' => '添加防火墙规则',
'Ban IP Address' => '封锁IP地址',
'Search' => '搜索',
'Add one more FTP Account' => '增加一个FTP账户',
@ -83,15 +83,15 @@ $LANG['cn'] = array(
'rebuild mail' => '重建邮箱',
'rebuild db' => '重建数据库',
'rebuild cron' => '重建定时任务',
'update counters' => '更新计数器',
'update counters' => '更新使用情况',
'suspend' => '暂停',
'unsuspend' => '解除暂停',
'delete' => '删除',
'show per user' => '用户显示',
'login as' => '登录至账户',
'show per user' => '选中指定的用户显示',
'login as' => '切换登录至账户',
'logout' => '登出',
'edit' => '编辑',
'open webstats' => '打开网站统计',
'open webstats' => '查看网站统计',
'view logs' => '查看日志',
'list records' => '列出 %s 条记录',
'add record' => '添加记录',
@ -109,17 +109,17 @@ $LANG['cn'] = array(
'update' => '更新',
'generate' => '生成',
'Generate CSR' => '生成CSR',
'reread IP' => '重新读取IP',
'enable autoupdate' => '启用自动更新',
'disable autoupdate' => '停用自动更新',
'turn on notifications' => '启用通知',
'turn off notifications' => '停用通知',
'reread IP' => '重新读取IP地址',
'enable autoupdate' => '点击启用自动更新',
'disable autoupdate' => '点击停用自动更新',
'turn on notifications' => '点击启用通知',
'turn off notifications' => '点击停用通知',
'configure' => '配置',
'Adding User' => '添加用户',
'Editing User' => '编辑用户',
'Adding Domain' => '添加域名',
'Editing Domain' => '编辑域名',
'Adding User' => '添加用户账户',
'Editing User' => '编辑用户账户',
'Adding Domain' => '添加网站域名',
'Editing Domain' => '编辑网站域名',
'Adding DNS Domain' => '添加DNS域名',
'Editing DNS Domain' => '编辑DNS域名',
'Adding DNS Record' => '添加DNS记录',
@ -132,17 +132,17 @@ $LANG['cn'] = array(
'Editing Cron Job' => '编辑定时任务',
'Adding Cron Job' => '添加定时任务',
'Editing Database' => '编辑数据库',
'Adding Package' => '添加方案',
'Editing Package' => '编辑方案',
'Adding Package' => '添加用户方案',
'Editing Package' => '编辑用户方案',
'Adding IP address' => '添加IP地址',
'Editing IP Address' => '编辑IP地址',
'Editing Backup Exclusions' => '配置需排除备份的项目',
'Editing Backup Exclusions' => '配置数据备份的排除项',
'Generating CSR' => '生成CSR',
'Listing' => '列出',
'Search Results' => '搜索结果',
'Adding Firewall Rule' => '添加防火墙规则',
'Editing Firewall Rule' => '编辑防火墙规则',
'Adding IP Address to Banlist' => '添加IP至封锁列表',
'Adding IP Address to Banlist' => '添加IP地址以封锁',
'active' => '正常',
'spnd' => '暂停',
@ -168,7 +168,7 @@ $LANG['cn'] = array(
'month' => '月',
'package' => '方案',
'Bandwidth' => '流量',
'Disk' => '磁盘空间',
'Disk' => '磁盘',
'Web' => '网站',
'Mail' => '邮箱',
'Databases' => '数据库',
@ -182,7 +182,7 @@ $LANG['cn'] = array(
'Web Domains' => '网站域名',
'SSL Domains' => 'SSL域名',
'Web Aliases' => '网站别名',
'per domain' => '每域名',
'per domain' => '每域名',
'DNS Domains' => 'DNS域名',
'DNS domains' => 'DNS域名',
'DNS records' => 'DNS记录',
@ -195,10 +195,10 @@ $LANG['cn'] = array(
'IP Addresses' => 'IP地址',
'Backups' => '备份',
'Backup System' => '备份系统',
'backup exclusions' => '需排除备份的项目',
'backup exclusions' => '数据备份的排除项',
'template' => '模板',
'SSL Support' => '启用SSL',
'SSL Home Directory' => 'SSL站点主目录',
'SSL Home Directory' => 'SSL主目录',
'Lets Encrypt Support' => '采用 Let&#39s Encrypt',
'Lets Encrypt' => 'Let&#39s Encrypt',
'Your certificate will be automatically issued in 5 minutes' => '证书将在5分钟内自动完成签发',
@ -213,7 +213,7 @@ $LANG['cn'] = array(
'Records' => '记录',
'Serial' => '序号',
'Catchall email' => '未知收件人聚合邮箱',
'AntiVirus Support' => '防病毒支持',
'AntiVirus Support' => '邮件防病毒支持',
'AntiSpam Support' => '防垃圾邮件支持',
'DKIM Support' => 'DKIM支持',
'Accounts' => '账户',
@ -255,8 +255,8 @@ $LANG['cn'] = array(
'APACHE2 Usage' => 'Apache2 使用情况',
'HTTPD Usage' => 'HTTPD 使用情况',
'NGINX Usage' => 'NGINX 使用情况',
'MySQL Usage on localhost' => 'MySQL 使用情况 (localhost)',
'PostgreSQL Usage on localhost' => 'PostgreSQL 使用情况 (localhost)',
'MySQL Usage on localhost' => '数据库使用情况 MySQL (localhost)',
'PostgreSQL Usage on localhost' => '数据库使用情况 PostgreSQL (localhost)',
'Bandwidth Usage eth0' => '网络使用情况 (eth0)',
'Bandwidth Usage eth1' => '网络使用情况 (eth1)',
'Bandwidth Usage venet0' => '网络使用情况 (venet0)',
@ -268,30 +268,30 @@ $LANG['cn'] = array(
'SSH Usage' => 'SSH 使用情况',
'reverse proxy' => '反向代理',
'web server' => 'Web服务',
'backend server' => '后端服务', //New Keyword for PHP-FPM in SERVER page.
'dns server' => 'DNS服务',
'mail server' => '邮箱服务',
'pop/imap server' => 'POP/IMAP服务',
'email antivirus' => '邮防病毒',
'email antivirus' => '邮防病毒',
'email antispam' => '防垃圾邮件',
'database server' => '数据库服务',
'backend server' => '后端服务', //New Keyword for PHP-FPM in SERVER page.
'ftp server' => 'FTP服务',
'job scheduler' => '执行定时任务',
'firewall' => '防火墙服务',
'brute-force monitor' => '防暴力攻击',
'brute-force monitor' => '防暴力攻击',
'CPU' => 'CPU',
'Memory' => '内存',
'Uptime' => '已运行时间',
'core package' => '核心系统',
'php interpreter' => 'PHP解释器',
'internal web server' => '内部Web服务',
'core package' => 'Vesta 核心系统',
'php interpreter' => 'Vesta PHP解释器',
'internal web server' => 'Vesta Web服务',
'Version' => '版本',
'Release' => '发布号',
'Release' => '发行版本',
'Architecture' => '架构',
'Object' => '对象',
'Username' => '用户名称',
'Password' => '密码',
'Email' => '电子邮箱',
'Email' => '邮箱',
'Package' => '方案',
'Language' => '语言',
'First Name' => '名字',
@ -382,13 +382,13 @@ $LANG['cn'] = array(
'stats password' => '统计密码',
'ftp user password' => 'FTP用户账户密码',
'ftp user' => 'FTP用户',
'Last 70 lines of %s.%s.log' => '%s.%s.log 的最后 70 行',
'Last 70 lines of %s.%s.log' => '%s.%s.log 的最新 70 条日志记录',
'AccessLog' => '访问日志',
'ErrorLog' => '错误日志',
'Download AccessLog' => '下载访问日志',
'Download ErrorLog' => '下载错误日志',
'Country' => '国家地区',
'2 letter code' => '采用 ISO 3166-1 α-2 二位代码 如: 中国CN / 美国US',
'2 letter code' => 'ISO 3166-1 α-2 二位字母代码 如: 中国CN / 美国US',
'State / Province' => '州 / 省级',
'City / Locality' => '市 / 地区',
'Organization' => '组织名称',
@ -399,14 +399,14 @@ $LANG['cn'] = array(
'Banlist' => '需封锁',
'ranges are acceptable' => '可使用范围 如: 21-22',
'CIDR format is supported' => '支持CIDR格式',
'ACCEPT' => '接受',
'DROP' => '拒绝',
'ACCEPT' => '放行',
'DROP' => '阻止',
'TCP' => 'TCP',
'UDP' => 'UDP',
'ICMP' => 'ICMP',
'SSH' => 'SSH',
'FTP' => 'FTP',
'VESTA' => 'VESTA',
'VESTA' => 'Vesta',
'Add one more Name Server' => '增加一个DNS服务器',
'web domain' => '网站域名',
@ -416,7 +416,7 @@ $LANG['cn'] = array(
'mail account' => '邮箱账户',
'cron job' => '定时任务',
'cron' => '任务',
'cron' => '定时任务',
'user dir' => '用户目录',
'unlimited' => '无限',
@ -430,14 +430,14 @@ $LANG['cn'] = array(
'%s mail accounts' => '%s 个邮箱账户',
'1 database' => '1 个数据库',
'%s databases' => '%s 个数据库',
'1 cron job' => '1 个任务',
'%s cron jobs' => '%s 个任务',
'1 cron job' => '1 个定时任务',
'%s cron jobs' => '%s 个定时任务',
'1 archive' => '1 个存档',
'%s archives' => '%s 个存档',
'1 item' => '1 个项目',
'%s items' => '%s 个项目',
'1 package' => '1 个方案',
'%s packages' => '%s 个方案',
'1 package' => '1 个用户方案',
'%s packages' => '%s 个用户方案',
'1 IP address' => '1 个IP地址',
'%s IP addresses' => '%s 个IP地址',
'1 month' => '1 个月',
@ -460,14 +460,14 @@ $LANG['cn'] = array(
'DATABASE_CREATED_OK' => '数据库 <a href="/edit/db/?database=%s"><b>%s</b></a> 已添加成功',
'CRON_CREATED_OK' => '定时任务已添加成功',
'IP_CREATED_OK' => 'IP地址 <a href="/edit/ip/?ip=%s"><b>%s</b></a> 已添加成功',
'PACKAGE_CREATED_OK' => '方案 <a href="/edit/package/?package=%s"><b>%s</b></a> 已添加成功',
'PACKAGE_CREATED_OK' => '用户方案 <a href="/edit/package/?package=%s"><b>%s</b></a> 已添加成功',
'SSL_GENERATED_OK' => 'SSL证书已生成成功',
'RULE_CREATED_OK' => '规则已创建成功',
'RULE_CREATED_OK' => '防火墙规则已创建成功',
'BANLIST_CREATED_OK' => 'IP地址已封锁成功',
'Autoupdate has been successfully enabled' => '自动更新已成功启用',
'Autoupdate has been successfully disabled' => '自动更新已成功关闭',
'Cronjob email reporting has been successfully enabled' => '定时任务的电子邮件报告已成功启用',
'Cronjob email reporting has been successfully disabled' => '定时任务的电子邮件报告已成功关闭',
'Autoupdate has been successfully enabled' => '自动更新已启用成功',
'Autoupdate has been successfully disabled' => '自动更新已停用成功',
'Cronjob email reporting has been successfully enabled' => '定时任务的电子邮件通知已启用成功',
'Cronjob email reporting has been successfully disabled' => '定时任务的电子邮件通知已停用成功',
'Changes has been saved.' => '已保存更改',
'Confirmation' => '确认',
'DELETE_USER_CONFIRMATION' => '确定要删除用户 %s 吗?',
@ -488,31 +488,31 @@ $LANG['cn'] = array(
'DELETE_CRON_CONFIRMATION' => '确定要删除定时任务吗?',
'SUSPEND_CRON_CONFIRMATION' => '确定要暂停定时任务吗?',
'UNSUSPEND_CRON_CONFIRMATION' => '确定要解除暂停定时任务吗?',
'DELETE_BACKUP_CONFIRMATION' => '确定要删除 %s 备份吗?',
'DELETE_EXCLUSION_CONFIRMATION' => '确定要删除 %s 例外吗?',
'DELETE_PACKAGE_CONFIRMATION' => '确定要删除方案 %s 吗?',
'DELETE_BACKUP_CONFIRMATION' => '确定要删除 %s 数据备份吗?',
'DELETE_EXCLUSION_CONFIRMATION' => '确定要删除 %s 排除项吗?',
'DELETE_PACKAGE_CONFIRMATION' => '确定要删除用户方案 %s 吗?',
'DELETE_IP_CONFIRMATION' => '确定要删除IP地址 %s 吗?',
'DELETE_RULE_CONFIRMATION' => '确定要删除规则 #%s 吗?',
'SUSPEND_RULE_CONFIRMATION' => '确定要暂停规则 #%s 吗?',
'UNSUSPEND_RULE_CONFIRMATION' => '确定要解除暂停规则 #%s 吗?',
'LEAVE_PAGE_CONFIRMATION' => '确定要离开当前页吗?',
'DELETE_RULE_CONFIRMATION' => '确定要删除防火墙规则 #%s 吗?',
'SUSPEND_RULE_CONFIRMATION' => '确定要暂停防火墙规则 #%s 吗?',
'UNSUSPEND_RULE_CONFIRMATION' => '确定要解除暂停防火墙规则 #%s 吗?',
'LEAVE_PAGE_CONFIRMATION' => '确定要离开当前页吗?',
'RESTART_CONFIRMATION' => '确定要重新启动 %s 吗?',
'Welcome' => '欢迎',
'Welcome' => '欢迎',
'LOGGED_IN_AS' => '以 %s 的身份登录',
'Error' => '错误',
'Invalid username or password' => '无效的用户名称或密码',
'Invalid username or code' => '无效的用户名称或验证码.',
'Invalid username or code' => '无效的用户名称或重置代码',
'Passwords not match' => '密码错误',
'Please enter valid email address.' => '请输入正确的邮箱',
'Field "%s" can not be blank.' => '"%s" 不能为空',
'Password is too short.' => '密码太短 (至少6个数字+字母)',
'Password is too short.' => '密码太短 (字符至少6个)',
'Error code:' => '错误代码: %s',
'SERVICE_ACTION_FAILED' => '"%s" "%s" 失败',
'IP address is in use' => 'IP地址在使用中',
'BACKUP_SCHEDULED' => '您的要求已加入队列中,备份完成后会以电子邮件通知您 ',
'BACKUP_EXISTS' => '已经有一个备份正在执行,请等待备份完成后再操作',
'BACKUP_SCHEDULED' => '您的要求已加入队列中,备份完成后会以电子邮件通知您',
'BACKUP_EXISTS' => '已经有数据备份正在执行,请等待备份完成后再操作',
'RESTORE_SCHEDULED' => '您的要求已加入队列中,恢复完成后会以电子邮件通知您',
'RESTORE_EXISTS' => '已经有一个恢复正在执行,请等待恢复完成后再操作',
'RESTORE_EXISTS' => '已经有数据恢复正在执行,请等待恢复完成后再操作',
'WEB_EXCLUSIONS' => '输入域名,每行一个。要排除所有域名请使用 *。要排除特定目录使用以下格式: domain.com:public_html/cache:public_html/tmp',
'DNS_EXCLUSIONS' => '输入域名,每行一个。要排除所有域名请使用 *',
@ -523,15 +523,15 @@ $LANG['cn'] = array(
'Welcome to Vesta Control Panel' => '欢迎来到 Vesta 管理系统',
'MAIL_FROM' => 'Vesta 管理系统 <noreply@%s>',
'GREETINGS_GORDON_FREEMAN' => "您好, %s %s,\n",
'GREETINGS' => "您好,\n",
'ACCOUNT_READY' => "您的账户已创建成功,并可以开始使用了!\n\nhttps://%s/login/\n用户名称: %s\n密码: %s\n\n--\nVesta Control Panel\n",
'GREETINGS_GORDON_FREEMAN' => "您好%s %s\n\n",
'GREETINGS' => "您好\n\n",
'ACCOUNT_READY' => "您的账户已创建成功,并可以开始使用了!\n\nhttps://%s/login/\n用户名称: %s\n密码: %s\n\n--\nVesta 管理系统\n",
'FTP login credentials' => 'FTP 登录信息',
'FTP_ACCOUNT_READY' => "FTP账户已创建成功,并可以开始使用了!\n\n主机名称: %s\n用户名称: %s_%s\n密码: %s\n\n--\nVesta Control Panel\n",
'FTP_ACCOUNT_READY' => "FTP 账户已创建成功,并可以开始使用了!\n\n主机名称: %s\n用户名称: %s_%s\n密码: %s\n\n--\nVesta 管理系统\n",
'Database Credentials' => '数据库登录信息',
'DATABASE_READY' => "数据库已添加成功!\n\n数据库名称: %s\n用户名称: %s\n密码: %s\n%s\n\n--\nVesta Control Panel\n",
'DATABASE_READY' => "数据库已添加成功!\n\n数据库名称: %s\n用户名称: %s\n密码: %s\n%s\n\n--\nVesta 管理系统\n",
'forgot password' => '忘记密码',
'Confirm' => '确认',
@ -540,9 +540,9 @@ $LANG['cn'] = array(
'Reset' => '重置',
'Reset Code' => '重置代码',
'RESET_NOTICE' => '',
'RESET_CODE_SENT' => '密码重置代码已发送到您的邮箱<br>',
'MAIL_RESET_SUBJECT' => '密码重置在 %s',
'PASSWORD_RESET_REQUEST' => '重置密码请点击链接:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\n或者您可以到 https://%s/reset/?action=code&user=%s 输入密码重置代码:\n%s\n\n如果您没有要求重置密码请忽略此邮件\n\n--\nVesta Control Panel\n',
'RESET_CODE_SENT' => '重置代码已发送到您的邮箱<br>',
'MAIL_RESET_SUBJECT' => '重置密码在 %s',
'PASSWORD_RESET_REQUEST' => '重置密码请点击链接:\nhttps://%s/reset/?action=confirm&user=%s&code=%s\n\n或者您可以到 https://%s/reset/?action=code&user=%s\n输入重置代码:\n%s\n\n如果您没有要求重置密码请忽略此邮件\n\n--\nVesta 管理系统\n',
'Jan' => '01月',
'Feb' => '02月',
@ -559,7 +559,7 @@ $LANG['cn'] = array(
'Configuring Server' => '配置服务器',
'Hostname' => '主机名称',
'Time Zone' => '时区',
'Time Zone' => '系统时区',
'Default Language' => '默认语言',
'Proxy Server' => '代理服务器',
'Web Server' => 'Web 服务器',
@ -568,7 +568,7 @@ $LANG['cn'] = array(
'DNS Server' => 'DNS 服务器',
'DNS Cluster' => 'DNS 集群',
'MAIL Server' => '邮箱服务器',
'Antivirus' => '防病毒引擎',
'Antivirus' => '邮件防病毒',
'AntiSpam' => '防垃圾邮件',
'Use Web Domain SSL Certificate' => '采用网站域名SSL证书',
'Webmail URL' => '网页邮箱网址',
@ -585,15 +585,15 @@ $LANG['cn'] = array(
'ftp' => 'FTP',
'sftp' => 'SFTP',
'SFTP Chroot' => 'SFTP Chroot',
'FileSystem Disk Quota' => '文件系统磁盘配额',
'Vesta Control Panel Plugins' => 'Vesta 管理系统的插件',
'FileSystem Disk Quota' => '磁盘配额',
'Vesta Control Panel Plugins' => 'Vesta 插件',
'preview' => '预览',
'Reseller Role' => '作为经销商',
'Web Config Editor' => '网络配置编辑器',
'Template Manager' => '模板管理',
'Backup Migration Manager' => '备份迁移管理',
'FileManager' => '文件管理',
'show: CPU / MEM / NET / DISK' => '查看: CPU / 内存 / 网络 / 磁盘',
'show: CPU / MEM / NET / DISK' => '查看资源详细信息',
'sort by' => '排序方式',
'Date' => '日期',
@ -696,11 +696,11 @@ $LANG['cn'] = array(
'Switch to Left Tab' => '切换到左标签',
'Switch to Right Tab' => '切换到右标签',
'Switch Tab' => '切换标签',
'Go to the Top of the File List' => '转文件列表顶部',
'Go to the Last File' => '转最后一个文件',
'Go to the Top of the File List' => '转文件列表顶部',
'Go to the Last File' => '转最后一个文件',
'Open File / Enter Directory' => '打开文件 / 进入目录',
'Edit File' => '编辑文件',
'Go to Parent Directory' => '转父目录',
'Go to Parent Directory' => '转父目录',
'Select Current File' => '选中当前文件',
'Select Bunch of Files' => '选择多个文件',
'Add File to the Current Selection' => '将文件添加到当前选中区内',

View file

@ -15,7 +15,7 @@ if (($_SESSION['user'] == 'admin') && (!empty($_SESSION['look']))) {
}
if (empty($panel)) {
$command = VESTA_CMD."v-list-user '".$user."' 'json'";
$command = VESTA_CMD."v-list-user ".escapeshellarg($user)." 'json'";
exec ($command, $output, $return_var);
if ( $return_var > 0 ) {
header("Location: /error/");

View file

@ -7,14 +7,14 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Data & Render page
if (empty($_GET['domain'])){
exec (VESTA_CMD."v-list-dns-domains $user json", $output, $return_var);
exec (VESTA_CMD."v-list-dns-domains ".escapeshellarg($user)." json", $output, $return_var);
$data = json_decode(implode('', $output), true);
$data = array_reverse($data, true);
unset($output);
render_page($user, $TAB, 'list_dns');
} else {
exec (VESTA_CMD."v-list-dns-records ".$user." ".escapeshellarg($_GET['domain'])." json", $output, $return_var);
exec (VESTA_CMD."v-list-dns-records ".escapeshellarg($user)." ".escapeshellarg($_GET['domain'])." json", $output, $return_var);
$data = json_decode(implode('', $output), true);
$data = array_reverse($data, true);
unset($output);

View file

@ -7,14 +7,14 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Data & Render page
if (empty($_GET['domain'])){
exec (VESTA_CMD."v-list-mail-domains $user json", $output, $return_var);
exec (VESTA_CMD."v-list-mail-domains ".escapeshellarg($user)." json", $output, $return_var);
$data = json_decode(implode('', $output), true);
$data = array_reverse($data, true);
unset($output);
render_page($user, $TAB, 'list_mail');
} else {
exec (VESTA_CMD."v-list-mail-accounts ".$user." ".escapeshellarg($_GET['domain'])." json", $output, $return_var);
exec (VESTA_CMD."v-list-mail-accounts ".escapeshellarg($user)." ".escapeshellarg($_GET['domain'])." json", $output, $return_var);
$data = json_decode(implode('', $output), true);
$data = array_reverse($data, true);
unset($output);

View file

@ -30,7 +30,7 @@ if ((!empty($_POST['user'])) && (empty($_POST['code']))) {
} else {
$mailtext = __('GREETINGS');
}
$mailtext .= __('PASSWORD_RESET_REQUEST',$_SERVER['HTTP_HOST'],$user,$rkey,$_SERVER['HTTP_HOST'],$user,$rkey);
$mailtext .= __('PASSWORD_RESET_REQUEST',$hostname.":".$_SERVER['SERVER_PORT'],$user,$rkey,$hostname.":".$_SERVER['SERVER_PORT'],$user,$rkey);
if (!empty($rkey)) send_email($to, $subject, $mailtext, $from);
unset($output);
}