Skip to content

Commit b144929

Browse files
author
Serghey Rodin
committed
improved domain validation
1 parent 6bcebea commit b144929

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

bin/v-add-dns-domain

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# Argument definition
1717
user=$1
1818
domain=$2
19-
domain_idn=$2
2019
ip=$3
2120
ns1=$4
2221
ns2=$5

bin/v-add-mail-domain

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# Argument definition
1313
user=$1
1414
domain=$2
15-
domain_idn=$2
1615
antispam=${3-yes}
1716
antivirus=${4-yes}
1817
dkim=${5-yes}

func/main.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -875,12 +875,11 @@ format_domain() {
875875
domain=$(echo "$domain" |sed -e "s/^www.//")
876876
fi
877877
if [[ "$domain" =~ .*\.$ ]]; then
878-
domain=$(echo "$domain" |sed -e "s/\.$//")
878+
domain=$(echo "$domain" |sed -e "s/[.]*$//g")
879879
fi
880880
if [[ "$domain" =~ ^\. ]]; then
881-
domain=$(echo "$domain" |sed -e "s/^\.//")
881+
domain=$(echo "$domain" |sed -e "s/^[.]*//")
882882
fi
883-
884883
}
885884

886885
format_domain_idn() {
@@ -896,6 +895,9 @@ format_aliases() {
896895
if [ ! -z "$aliases" ] && [ "$aliases" != 'none' ]; then
897896
aliases=$(echo $aliases |tr '[:upper:]' '[:lower:]' |tr ',' '\n')
898897
aliases=$(echo "$aliases" |sed -e "s/\.$//" |sort -u)
898+
aliases=$(echo "$aliases" |tr -s '.')
899+
aliases=$(echo "$aliases" |sed -e "s/[.]*$//g")
900+
aliases=$(echo "$aliases" |sed -e "s/^[.]*//")
899901
aliases=$(echo "$aliases" |grep -v www.$domain |sed -e "/^$/d")
900902
aliases=$(echo "$aliases" |tr '\n' ',' |sed -e "s/,$//")
901903
fi

upd/add_notifications.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@
44
rm -f /usr/local/vesta/data/users/admin/notifications.conf
55
/usr/local/vesta/bin/v-add-user-notification admin "File Manager" "Browse, copy, edit, view, and retrieve all your web domain files using a fully featured <a href='http://vestacp.com/features/#filemanager'>File Manager</a>. Plugin is available for <a href='/edit/server/?lead=filemanager#module-filemanager'>purchase</a>." 'filemanager'
66
/usr/local/vesta/bin/v-add-user-notification admin "Chroot SFTP" "If you want to have SFTP accounts that will be used only to transfer files (and not to SSH), you can <a href='/edit/server/?lead=sftp#module-sftp'>purchase</a> and enable <a href='http://vestacp.com/features/#sftpchroot'>SFTP Chroot</a>"
7-
/usr/local/vesta/bin/v-add-user-notification admin "Free SSL Certificates" "Lets Encrypt is a free and automated Certificate Authority. You can find out more information at <a href='https://letsencrypt.org/'>letsencrypt.org</a>"
8-
/usr/local/vesta/bin/v-add-user-notification admin "Keyboard Control" "You can use your keyboard to perform many of the actions you perform with your mouse, such as navigating to or selecting menus and items"
9-
/usr/local/vesta/bin/v-add-user-notification admin "Release 0.9.8-17" "Notable in this release is the improved server tab. You can now edit service configs, php.ini and so on. We have added nice mail helpers and fixed a dozen bugs. For more information please read the <a href='http://vestacp.com/roadmap/#0.9.8-17'>release notes</a>"
7+
/usr/local/vesta/bin/v-add-user-notification admin "Release 0.9.8-18" "Biggest the <a href='http://vestacp.com/roadmap/#0.9.8-18'>release notes</a>"

0 commit comments

Comments
 (0)