From d74c932d16db49b450bbe1ef384cc79740363511 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Wed, 10 Jul 2013 23:22:12 -0500 Subject: [PATCH] fix register script in mcp --- packages/mcp/www/register.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/mcp/www/register.cgi b/packages/mcp/www/register.cgi index 6d84dda..c05f8fc 100755 --- a/packages/mcp/www/register.cgi +++ b/packages/mcp/www/register.cgi @@ -40,12 +40,12 @@ EOF if [ -z "$hash" ] || [ -z "$team" ]; then echo "

Empty field, cannot complete request

" -elif ! grep -q " $hash$" $CTF_BASE/state/teams/assigned.txt; then +elif ! grep -q "^$hash$" state/teams/assigned.txt; then echo "

That hash has not been assigned.

" -elif [ -f $CTF_BASE/state/teams/names/$hash ]; then +elif [ -f state/teams/names/$hash ]; then echo "

That hash has already been registered.

" else - printf "%s" "$team" > $CTF_BASE/state/teams/names/$hash + printf "%s" "$team" > state/teams/names/$hash echo "

Okay, your team has been named and you may begin using your hash!

" fi