From 8b7acb68a3fe718556d10ec261d2143ce04b9fb3 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 29 Mar 2017 20:07:58 -0400 Subject: [PATCH] fix password and add debug --- src/zms.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/zms.cpp b/src/zms.cpp index aed29af35..4deacb03b 100644 --- a/src/zms.cpp +++ b/src/zms.cpp @@ -161,9 +161,11 @@ int main( int argc, const char *argv[] ) { if ( !strcmp( name, "user" ) ) { username = UriDecode( value ); + Debug( 1, "Have %s for username", username.c_str() ); } if ( !strcmp( name, "pass" ) ) { - password = UriDecode( password ); + password = UriDecode( value ); + Debug( 1, "Have %s for password", password.c_str() ); } } } @@ -183,12 +185,16 @@ int main( int argc, const char *argv[] ) { if ( *auth ) { user = zmLoadAuthUser( auth, config.auth_hash_ips ); + } else { + Debug( 1, "Need both username and password" ); } } //else if ( strcmp( config.auth_relay, "plain" ) == 0 ) { if ( username.length() && password.length() ) { user = zmLoadUser( username.c_str(), password.c_str() ); + } else { + Debug( 1, "Need both username and password" ); } } } // auth is none or something else