This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 923a6124936 CLI: Suppress printing out of password to console when 
using auth command (#2857)
923a6124936 is described below

commit 923a6124936eabe86751fa2ac3fe8f11ac7e4307
Author: Christos Malliaridis <malliari...@apache.org>
AuthorDate: Thu Dec 12 17:21:26 2024 +0200

    CLI: Suppress printing out of password to console when using auth command 
(#2857)
    
    ---------
    
    Co-authored-by: Eric Pugh <ep...@opensourceconnections.com>
    (cherry picked from commit aadac837034f7996876d91526afabf01d3bfcf37)
---
 solr/CHANGES.txt                                     | 2 ++
 solr/core/src/java/org/apache/solr/cli/AuthTool.java | 5 +----
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index e8c7b19f797..1c2d7adc4de 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -78,6 +78,8 @@ Improvements
 * SOLR-16470: Replication "fetch file" API now has a v2 equivalent, available 
at `GET /api/cores/coreName/replication/files/fileName`
   (Matthew Biscocho via Jason Gerlowski)
 
+* SOLR-17554: Suppress printing out of password to console when using auth CLI 
command. (Christos Malliaridis via Eric Pugh)
+
 
 Optimizations
 ---------------------
diff --git a/solr/core/src/java/org/apache/solr/cli/AuthTool.java 
b/solr/core/src/java/org/apache/solr/cli/AuthTool.java
index 8d92cef2cdf..b8d3d736bd6 100644
--- a/solr/core/src/java/org/apache/solr/cli/AuthTool.java
+++ b/solr/core/src/java/org/apache/solr/cli/AuthTool.java
@@ -539,10 +539,7 @@ public class AuthTool extends ToolBase {
             includeFile.toPath(), basicAuthConfFile.getAbsolutePath(), null, 
cli);
         final String successMessage =
             String.format(
-                Locale.ROOT,
-                "Successfully enabled basic auth with username [%s] and 
password [%s].",
-                username,
-                password);
+                Locale.ROOT, "Successfully enabled basic auth with username 
[%s].", username);
         echo(successMessage);
         return 0;
 

Reply via email to