Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cedar/Admin.c')
-rw-r--r--src/Cedar/Admin.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Cedar/Admin.c b/src/Cedar/Admin.c
index 1b4702dd..6bc4edd4 100644
--- a/src/Cedar/Admin.c
+++ b/src/Cedar/Admin.c
@@ -1109,11 +1109,14 @@ ADMIN *JsonRpcAuthLogin(CEDAR *c, SOCK *sock, HTTP_HEADER *h)
{
Lock(h->lock);
{
- if (Cmp(pw_hash, h->HashedPassword, SHA1_SIZE) == 0)
+ if (Cmp(h->HashedPassword, empty_pw_hash, SHA1_SIZE) != 0 && IsZero(h->HashedPassword, sizeof(h->HashedPassword)) == false)
{
- is_hub_admin = true;
+ if (Cmp(pw_hash, h->HashedPassword, SHA1_SIZE) == 0)
+ {
+ is_hub_admin = true;
- StrCpy(hub_name, sizeof(hub_name), h->Name);
+ StrCpy(hub_name, sizeof(hub_name), h->Name);
+ }
}
}
Unlock(h->lock);