diff --git a/packages/mcp/www/register.cgi b/packages/mcp/www/register.cgi index b1d8598..2567276 100755 --- a/packages/mcp/www/register.cgi +++ b/packages/mcp/www/register.cgi @@ -22,13 +22,15 @@ Content-type: text/html
That token has not been assigned.
" +if [ -z "$hash" ]; then + echo "Empty hash, cannot complete request
" +elif ! grep -q $hash $CTF_BASE/state/teams/assigned.txt; then + echo "That hash has not been assigned.
" elif [ -f $CTF_BASE/state/teams/names/$hash ]; then - echo "That token has already been registered.
" + echo "That hash has already been registered.
" else - printf "%s" "$team" > $CTF_BASE/state/teams/names/$h - echo "Okay, your team has been named and you may begin using your token!
" + printf "%s" "$team" > $CTF_BASE/state/teams/names/$hash + echo "Okay, your team has been named and you may begin using your hash!
" fi cat <