Mercurial > hgrepos > hgweb.cgi > s4
diff s4-funcs.sh @ 83:815840076efa
Directory structure refreshed
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Mon, 03 Aug 2015 12:16:06 +0900 |
parents | ddc8a4c0b8d9 |
children | 8dc950197939 |
line wrap: on
line diff
--- a/s4-funcs.sh Mon Aug 03 12:15:28 2015 +0900 +++ b/s4-funcs.sh Mon Aug 03 12:16:06 2015 +0900 @@ -7,14 +7,12 @@ myname=`basename ${SCRIPT_NAME:-$0}` mydir=`dirname ${SCRIPT_FILENAME:-$0}` myargs="$@" -#bindir=`(cd $mydir/bin; pwd)` -# :$bindir PATH=/usr/local/sqlite3/bin:/usr/local/vim7/bin:/usr/iekei/ImageMagick/bin:/usr/local/ImageMagick/bin:$PATH tmpdir=${TMPDIR:-tmp} dbdir=${DBDIR:-db} tmpfiles="" db=${DB:-$dbdir/cgi.sq3} -admin=${ADMIN:-wwwadmin@gentei.org} +admin=${ADMIN:-hostmaster@example.org} templ=${TEMPL:-templ} layout=${LAYOUT:-$templ/default} formdir=${FORMDIR:-$templ/form} @@ -906,7 +904,9 @@ checkdomain() ( # Check the validity of domain by referring DNS item=$1 - host ${item#@*} >/dev/null 2>&1 +err checkdomain $1 +host ${item#*@} 1>&3 2>&3 + host ${item#*@} >/dev/null 2>&1 ) pwcheck() { # $1=passwd @@ -920,8 +920,11 @@ } wasureta() { user=$1 - if checkdomain $user; then - echo "ユーザ名には正しいメイルアドレスが必要です。" + if ! checkdomain $user; then + contenttype; echo + m4 -D_TITLE_='Invalid email' $layout/title-only.html + echo "ユーザ名($user)には正しいメイルアドレスが必要です。" | html p + putfooter exit 0 fi newpswd=`genrandom` # newsalt=`genrandom 5`