r1579 + add a check to complain about missing userauth file
authorDenis Ovsienko <infrastation@yandex.ru>
Mon, 21 Jan 2008 14:48:28 +0000 (14:48 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Mon, 21 Jan 2008 14:48:28 +0000 (14:48 +0000)
gateways/lib.sh

index 9136b4a9783ba1446b758ff10eb9132e377a35aa..83465593b7f029751ae7a89aaa7d3a84c2182d61 100644 (file)
@@ -1,5 +1,10 @@
 #!/bin/sh
 
+if [ ! -s "$MYDIR/userauth.php" ]; then
+       echo "ERR!Authorization file $MYDIR/userauth.php is either missing or empty"
+       return
+fi
+
 authorized()
 {
        local endp=$1 user=$2 action=$3 arg1=$4 arg2=$5 skip=yes cval