Skip to content

Commit 396dedc

Browse files
committed
Merge pull request #90 from knnniggett/patch-8
zms crashes with hashed authentication - fixes #88 Previously, systems without gnutls were computing auth_md5 to be twice the size of what it was defined to be, thus causing zms to crash. The for loop at line 227 builds auth_md5 by looping every "2j", which means the upper limit (md5len) should be half the desired size of auth_md5.
2 parents a33ddcb + 4e9698a commit 396dedc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/zm_user.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ User *zmLoadAuthUser( const char *auth, bool use_remote_addr )
196196

197197
char auth_key[512] = "";
198198
char auth_md5[32+1] = "";
199-
size_t md5len = 32;
199+
size_t md5len = 16;
200200
unsigned char md5sum[md5len];
201201

202202
time_t now = time( 0 );

0 commit comments

Comments
 (0)