From 870a8702b83c14091999a9b6183481ae34f5b173 Mon Sep 17 00:00:00 2001 From: Erik Schilling Date: Thu, 20 Feb 2014 22:43:45 +0100 Subject: Forget clean text password after registration Currently all passwords stay in the db for ever. This now deletes no longer required passwords. Please also run `DELETE FROM tmw_accounts WHERE STATE = 1;` --- bin/create_account.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/create_account.sh b/bin/create_account.sh index 14fab86..f073a48 100755 --- a/bin/create_account.sh +++ b/bin/create_account.sh @@ -74,15 +74,14 @@ frob_accounts() if grep -q 'successfully created' <<< "$RESULT" then send_email 'Your account was created successfully. Have fun playing The Mana World!' - do_mysql << __EOF__ -update $SQL_TABLE set state = 1 where id = $ID -__EOF__ + STATE=1 else send_email $'Something went wrong when automatically creating your account.\nError message:' "$RESULT" - do_mysql << __EOF__ -update $SQL_TABLE set state = 2 where id = $ID -__EOF__ + STATE=2 fi + do_mysql << __EOF__ +update $SQL_TABLE set state = $STATE, password = '' where id = $ID +__EOF__ done } -- cgit v1.2.3-60-g2f50