From b0fe9f0f2a65ab620a114ea0235d32d6e85eefcc Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 18 Mar 2015 12:56:32 +0000 Subject: [PATCH] make sure login user exists svn path=/trunk/; revision=60 --- actions/login.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/login.sh b/actions/login.sh index 6705eca..8cd9e74 100755 --- a/actions/login.sh +++ b/actions/login.sh @@ -26,7 +26,7 @@ if [ -r "$userfile" ]; then ssum=$(sed -nr 's:^auth=(.+)$:\1:p' "$userfile") rsum=$(echo -E "$salt$pass" |sha1sum |cut -c1-40) fi -if [ "$ssum" = "$rsum" ]; then +if [ -n "$ssum" -a "$ssum" = "$rsum" ]; then sid="$(apg -n1 -a1 -m32 -x32 -M CLN)" sessionfile="$_DATA/auth/session$sid" echo -E "$user $(($(date +%s) + 1800))" >"$sessionfile" -- 2.39.2