From 21710b6e49697bcd8dc5e5117822e4f09f55ea8a Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sun, 12 May 2019 15:45:39 -0400 Subject: [PATCH] demote logs --- src/zm_crypt.cpp | 10 +++++----- src/zm_user.cpp | 4 ++-- src/zms.cpp | 2 +- web/skins/classic/views/options.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/zm_crypt.cpp b/src/zm_crypt.cpp index c37ab25bc..0235e5c13 100644 --- a/src/zm_crypt.cpp +++ b/src/zm_crypt.cpp @@ -35,7 +35,7 @@ std::pair verifyToken(std::string jwt_token_str, std } if (decoded.has_payload_claim("user")) { username = decoded.get_payload_claim("user").as_string(); - Info ("Got %s as user claim from token", username.c_str()); + Debug (1, "Got %s as user claim from token", username.c_str()); } else { Error ("User not found in claim"); @@ -44,7 +44,7 @@ std::pair verifyToken(std::string jwt_token_str, std if (decoded.has_payload_claim("iat")) { token_issued_at = (unsigned int) (decoded.get_payload_claim("iat").as_int()); - Info ("Got IAT token=%u", token_issued_at); + Debug (1,"Got IAT token=%u", token_issued_at); } else { @@ -73,7 +73,7 @@ bool verifyPassword(const char *username, const char *input_password, const char } if (db_password_hash[0] == '*') { // MYSQL PASSWORD - Info ("%s is using an MD5 encoded password", username); + Debug (1,"%s is using an MD5 encoded password", username); SHA_CTX ctx1, ctx2; unsigned char digest_interim[SHA_DIGEST_LENGTH]; @@ -96,14 +96,14 @@ bool verifyPassword(const char *username, const char *input_password, const char sprintf(&final_hash[i*2]+1, "%02X", (unsigned int)digest_final[i]); final_hash[SHA_DIGEST_LENGTH *2 + 1]=0; - Info ("Computed password_hash:%s, stored password_hash:%s", final_hash, db_password_hash); + Debug (1,"Computed password_hash:%s, stored password_hash:%s", final_hash, db_password_hash); Debug (5, "Computed password_hash:%s, stored password_hash:%s", final_hash, db_password_hash); password_correct = (strcmp(db_password_hash, final_hash)==0); } else if ((db_password_hash[0] == '$') && (db_password_hash[1]== '2') &&(db_password_hash[3] == '$')) { // BCRYPT - Info ("%s is using a bcrypt encoded password", username); + Debug (1,"%s is using a bcrypt encoded password", username); BCrypt bcrypt; std::string input_hash = bcrypt.generateHash(std::string(input_password)); password_correct = bcrypt.validatePassword(std::string(input_password), std::string(db_password_hash)); diff --git a/src/zm_user.cpp b/src/zm_user.cpp index 68b52e08c..35f25f7c9 100644 --- a/src/zm_user.cpp +++ b/src/zm_user.cpp @@ -152,7 +152,7 @@ User *zmLoadTokenUser (std::string jwt_token_str, bool use_remote_addr ) { key += remote_addr; } - Info ("Inside zmLoadTokenUser, formed key=%s", key.c_str()); + Debug (1,"Inside zmLoadTokenUser, formed key=%s", key.c_str()); std::pair ans = verifyToken(jwt_token_str, key); std::string username = ans.first; @@ -192,7 +192,7 @@ User *zmLoadTokenUser (std::string jwt_token_str, bool use_remote_addr ) { return NULL; } - Info ("Got stored expiry time of %u",stored_iat); + Debug (1,"Got stored expiry time of %u",stored_iat); Info ("Authenticated user '%s' via token", username.c_str()); mysql_free_result(result); return user; diff --git a/src/zms.cpp b/src/zms.cpp index 8442b6a65..64c1103db 100644 --- a/src/zms.cpp +++ b/src/zms.cpp @@ -161,7 +161,7 @@ int main( int argc, const char *argv[] ) { strncpy( auth, value, sizeof(auth)-1 ); } else if ( !strcmp( name, "token" ) ) { jwt_token_str = value; - Info("ZMS: JWT token found: %s", jwt_token_str.c_str()); + Debug(1,"ZMS: JWT token found: %s", jwt_token_str.c_str()); } else if ( !strcmp( name, "user" ) ) { username = UriDecode( value ); diff --git a/web/skins/classic/views/options.php b/web/skins/classic/views/options.php index d7b264834..c0b437855 100644 --- a/web/skins/classic/views/options.php +++ b/web/skins/classic/views/options.php @@ -345,7 +345,7 @@ foreach ( array_map('basename', glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDI dbQuery('UPDATE Users SET APIEnabled=1 WHERE Id=?', array($markUid)); // echo "UPDATE Users SET APIEnabled=1"." WHERE Id=".$markUid."
"; } - echo "Updated."; + echo "Updated"; } if(array_key_exists('revokeAllTokens',$_POST)){