mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
commit
63e7e607c7
5 changed files with 7 additions and 6 deletions
|
@ -269,7 +269,7 @@ replace_web_config() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Delete web configuartion
|
||||
# Delete web configuration
|
||||
del_web_config() {
|
||||
conf="$HOMEDIR/$user/conf/web/$domain.$1.conf"
|
||||
if [[ "$2" =~ stpl$ ]]; then
|
||||
|
@ -291,7 +291,7 @@ del_web_config() {
|
|||
# clean-up for both config styles if there is no more domains
|
||||
web_domain=$(grep DOMAIN $USER_DATA/web.conf |wc -l)
|
||||
if [ "$web_domain" -eq '0' ]; then
|
||||
sed -i "/.*\/$user\/.*/d" /etc/$1/conf.d/vesta.conf
|
||||
sed -i "/.*\/$user\/conf\/web\//d" /etc/$1/conf.d/vesta.conf
|
||||
if [ -f "$conf" ]; then
|
||||
rm -f $conf
|
||||
fi
|
||||
|
|
|
@ -532,7 +532,7 @@ is_user_format_valid() {
|
|||
is_domain_format_valid() {
|
||||
object_name=${2-domain}
|
||||
exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|_|/|\|\"|'|;|%|\`| ]"
|
||||
if [[ $1 =~ $exclude ]] || [[ $1 =~ ^[0-9]+$ ]] || [[ $1 =~ "\.\." ]]; then
|
||||
if [[ $1 =~ $exclude ]] || [[ $1 =~ ^[0-9]+$ ]] || [[ $1 =~ "\.\." ]] || [[ $1 =~ "$(printf '\t')" ]]; then
|
||||
check_result $E_INVALID "invalid $object_name format :: $1"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue