also check for empty team name

This commit is contained in:
Neale Pickett 2013-02-05 23:07:35 -07:00
parent 9ba3da388a
commit c15e4bca3f
1 changed files with 2 additions and 2 deletions

View File

@ -22,8 +22,8 @@ Content-type: text/html
<h1>Team Registration</h1> <h1>Team Registration</h1>
EOF EOF
if [ -z "$hash" ]; then if [ -z "$hash" ] || [ -z "$team" ]; then
echo "<p>Empty hash, cannot complete request</p>" echo "<p>Empty field, cannot complete request</p>"
elif ! grep -q $hash $CTF_BASE/state/teams/assigned.txt; then elif ! grep -q $hash $CTF_BASE/state/teams/assigned.txt; then
echo "<p>That hash has not been assigned.</p>" echo "<p>That hash has not been assigned.</p>"
elif [ -f $CTF_BASE/state/teams/names/$hash ]; then elif [ -f $CTF_BASE/state/teams/names/$hash ]; then