]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Reduce the "non-hashed password" messages to the info level
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 30 Jun 2021 14:25:53 +0000 (16:25 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 16 Sep 2021 12:12:28 +0000 (14:12 +0200)
pdns/dnsdist-lua.cc

index bd646ab0ed049344721035c5f310b496926c4254..9130bb34a35d3d5bfd1a3941ecfe0a80aeef41cc 100644 (file)
@@ -946,7 +946,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
           if (password) {
             auto holder = make_unique<CredentialsHolder>(std::string(*password), false);
             if (!holder->wasHashed() && holder->isHashingAvailable()) {
-              warnlog("Passing a plain-text password to 'webserver()' is deprecated, please use 'setWebserverConfig()' with a hashed password instead.");
+              infolog("Passing a plain-text password to 'webserver()' is deprecated, please use 'setWebserverConfig()' instead and consider generating a hashed password using 'hashPassword()'.");
             }
 
             setWebserverPassword(std::move(holder));
@@ -999,7 +999,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
         std::string password = boost::get<std::string>(vars->at("password"));
         auto holder = make_unique<CredentialsHolder>(std::move(password), hashPlaintextCredentials);
         if (!holder->wasHashed() && holder->isHashingAvailable()) {
-          warnlog("Passing a plain-text password via the 'password' parameter to 'setWebserverConfig()' is deprecated, please generate a hashed one using 'hashPassword()' instead.");
+          infolog("Passing a plain-text password via the 'password' parameter to 'setWebserverConfig()' is not advised, please consider generating a hashed one using 'hashPassword()' instead.");
         }
 
         setWebserverPassword(std::move(holder));
@@ -1009,7 +1009,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
         std::string apiKey = boost::get<std::string>(vars->at("apiKey"));
         auto holder = make_unique<CredentialsHolder>(std::move(apiKey), hashPlaintextCredentials);
         if (!holder->wasHashed() && holder->isHashingAvailable()) {
-          warnlog("Passing a plain-text API key via the 'apiKey' parameter to 'setWebserverConfig()' is deprecated, please generate a hashed one using 'hashPassword()' instead.");
+          infolog("Passing a plain-text API key via the 'apiKey' parameter to 'setWebserverConfig()' is not advised, please consider generating a hashed one using 'hashPassword()' instead.");
         }
 
         setWebserverAPIKey(std::move(holder));