git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [JGIT PATCH 2/5] Don't display passwords on the console in fetch/push output

From
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Date
Jul 10, 2008, 20:17 UTC
Message-ID
<200807102217.38459.robin.rosenberg.lists@dewire.com>
In-Reply-To
<200807102056.43912.robin.rosenberg@dewire.com>
>From 99c09cf2321f36eb81043aed2fa6834811ee762b Mon Sep 17 00:00:00 2001
From: Robin Rosenberg <robin.rosenberg@dewire.com>
Date: Thu, 10 Jul 2008 22:16:19 +0200
Subject: [PATCH] Avoid password leak from URIIsh

The toString() method is commonly used for dumping information. We never ever want to use toString when the password is needed. By masking out the password we avoid unintentional password leaks.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../src/org/spearce/jgit/transport/URIish.java     |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/URIish.java b/org.spearce.jgit/src/org/spearce/jgit/transport/URIish.java
index e022e57..632c8ad 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/transport/URIish.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/transport/URIish.java
@@ -318,7 +318,7 @@ public class URIish {
 			r.append(getUser());
 			if (getPass() != null) {
 				r.append(':');
-				r.append(getPass());
+				r.append("PASSWORD");
 			}
 		}
 
-- 
1.5.6.2.220.g44701
Previous: Robin RosenbergNext: Johannes Schindelin
Message 8 of 12 in “Yet another round of transport fixes”
  1. 0/5 Yet another round of transport fixesShawn O. Pearce, Jul 10, 2008
  2. 1/5 Include a progress meter for large uploads to Amazon S3Shawn O. Pearce, Jul 10, 2008
  3. 2/5 Don't display passwords on the console in fetch/push outputShawn O. Pearce, Jul 10, 2008
  4. 3/5 Reuse the same SSH connection when automatically fetching tagsShawn O. Pearce, Jul 10, 2008
  5. 4/5 Report remote SSH execution errors during push via TransportExceptionShawn O. Pearce, Jul 10, 2008
  6. 5/5 Explicitly capture the stderr from a failed SSH fetch or pushShawn O. Pearce, Jul 10, 2008
  7. Robin RosenbergJul 10, 2008
  8. Robin RosenbergJul 10, 2008
  9. Johannes SchindelinJul 10, 2008
  10. Robin RosenbergJul 10, 2008
  11. Shawn O. PearceJul 11, 2008
  12. Robin RosenbergJul 11, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.