<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git, branch v2.43.6</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=v2.43.6</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=v2.43.6'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2024-11-26T21:14:59Z</updated>
<entry>
<title>Git 2.43.6</title>
<updated>2024-11-26T21:14:59Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-10-29T23:52:18Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=664d4fa692cb8637a7c9297c94abf0de8593e585'/>
<id>urn:sha1:664d4fa692cb8637a7c9297c94abf0de8593e585</id>
<content type='text'>
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>Sync with 2.42.4</title>
<updated>2024-11-26T21:14:59Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-10-29T23:52:16Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c39c2d29e62d5bd13f390ca20f6e756aced681b1'/>
<id>urn:sha1:c39c2d29e62d5bd13f390ca20f6e756aced681b1</id>
<content type='text'>
* maint-2.42:
  Git 2.42.4
  Git 2.41.3
  Git 2.40.4
  credential: disallow Carriage Returns in the protocol by default
  credential: sanitize the user prompt
  credential_format(): also encode &lt;host&gt;[:&lt;port&gt;]
  t7300: work around platform-specific behaviour with long paths on MinGW
  compat/regex: fix argument order to calloc(3)
  mingw: drop bogus (and unneeded) declaration of `_pgmptr`
  ci: remove 'Upload failed tests' directories' step from linux32 jobs
</content>
</entry>
<entry>
<title>Git 2.42.4</title>
<updated>2024-11-26T21:14:58Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-10-29T23:39:06Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=54ddf17f827969c989576f2411d9ff519fa8091f'/>
<id>urn:sha1:54ddf17f827969c989576f2411d9ff519fa8091f</id>
<content type='text'>
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>Sync with 2.41.3</title>
<updated>2024-11-26T21:14:58Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-10-29T23:39:04Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=102e0e6daa920a811890a612578a7723335b1f77'/>
<id>urn:sha1:102e0e6daa920a811890a612578a7723335b1f77</id>
<content type='text'>
* maint-2.41:
  Git 2.41.3
  Git 2.40.4
  credential: disallow Carriage Returns in the protocol by default
  credential: sanitize the user prompt
  credential_format(): also encode &lt;host&gt;[:&lt;port&gt;]
  t7300: work around platform-specific behaviour with long paths on MinGW
  compat/regex: fix argument order to calloc(3)
  mingw: drop bogus (and unneeded) declaration of `_pgmptr`
  ci: remove 'Upload failed tests' directories' step from linux32 jobs
</content>
</entry>
<entry>
<title>Git 2.41.3</title>
<updated>2024-11-26T21:14:58Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-10-29T23:27:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=6fd641a521a722e438b291ec7b852b7bb508b18b'/>
<id>urn:sha1:6fd641a521a722e438b291ec7b852b7bb508b18b</id>
<content type='text'>
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>Sync with 2.40.4</title>
<updated>2024-11-26T21:14:57Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-10-29T23:27:52Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=676cddebf94fab8defe704b2f58c5b59912bb40c'/>
<id>urn:sha1:676cddebf94fab8defe704b2f58c5b59912bb40c</id>
<content type='text'>
* maint-2.40:
  Git 2.40.4
  credential: disallow Carriage Returns in the protocol by default
  credential: sanitize the user prompt
  credential_format(): also encode &lt;host&gt;[:&lt;port&gt;]
  t7300: work around platform-specific behaviour with long paths on MinGW
  compat/regex: fix argument order to calloc(3)
  mingw: drop bogus (and unneeded) declaration of `_pgmptr`
  ci: remove 'Upload failed tests' directories' step from linux32 jobs
</content>
</entry>
<entry>
<title>Git 2.40.4</title>
<updated>2024-11-26T21:14:57Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-10-29T23:17:53Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=54a3711a9dd968a04249beef157393d64b579d64'/>
<id>urn:sha1:54a3711a9dd968a04249beef157393d64b579d64</id>
<content type='text'>
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'disallow-control-characters-in-credential-urls-by-default'</title>
<updated>2024-11-26T21:14:45Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-10-29T22:52:11Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=08756131a3b7038a60365ae56804cea4301082a9'/>
<id>urn:sha1:08756131a3b7038a60365ae56804cea4301082a9</id>
<content type='text'>
This addresses two vulnerabilities:

- CVE-2024-50349:

	Printing unsanitized URLs when asking for credentials made the
	user susceptible to crafted URLs (e.g. in recursive clones) that
	mislead the user into typing in passwords for trusted sites that
	would then be sent to untrusted sites instead.

- CVE-2024-52006

	Git may pass on Carriage Returns via the credential protocol to
	credential helpers which use line-reading functions that
	interpret said Carriage Returns as line endings, even though Git
	did not intend that.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>credential: disallow Carriage Returns in the protocol by default</title>
<updated>2024-11-26T19:24:04Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-11-04T13:48:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=b01b9b81d36759cdcd07305e78765199e1bc2060'/>
<id>urn:sha1:b01b9b81d36759cdcd07305e78765199e1bc2060</id>
<content type='text'>
While Git has documented that the credential protocol is line-based,
with newlines as terminators, the exact shape of a newline has not been
documented.

From Git's perspective, which is firmly rooted in the Linux ecosystem,
it is clear that "a newline" means a Line Feed character.

However, even Git's credential protocol respects Windows line endings
(a Carriage Return character followed by a Line Feed character, "CR/LF")
by virtue of using `strbuf_getline()`.

There is a third category of line endings that has been used originally
by MacOS, and that is respected by the default line readers of .NET and
node.js: bare Carriage Returns.

Git cannot handle those, and what is worse: Git's remedy against
CVE-2020-5260 does not catch when credential helpers are used that
interpret bare Carriage Returns as newlines.

Git Credential Manager addressed this as CVE-2024-50338, but other
credential helpers may still be vulnerable. So let's not only disallow
Line Feed characters as part of the values in the credential protocol,
but also disallow Carriage Return characters.

In the unlikely event that a credential helper relies on Carriage
Returns in the protocol, introduce an escape hatch via the
`credential.protectProtocol` config setting.

This addresses CVE-2024-52006.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>credential: sanitize the user prompt</title>
<updated>2024-11-26T19:24:04Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-10-30T12:26:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=7725b8100ffbbff2750ee4d61a0fcc1f53a086e8'/>
<id>urn:sha1:7725b8100ffbbff2750ee4d61a0fcc1f53a086e8</id>
<content type='text'>
When asking the user interactively for credentials, we want to avoid
misleading them e.g. via control sequences that pretend that the URL
targets a trusted host when it does not.

While Git learned, over the course of the preceding commits, to disallow
URLs containing URL-encoded control characters by default, credential
helpers are still allowed to specify values very freely (apart from Line
Feed and NUL characters, anything is allowed), and this would allow,
say, a username containing control characters to be specified that would
then be displayed in the interactive terminal prompt asking the user for
the password, potentially sending those control characters directly to
the terminal. This is undesirable because control characters can be used
to mislead users to divulge secret information to untrusted sites.

To prevent such an attack vector, let's add a `git_prompt()` that forces
the displayed text to be sanitized, i.e. displaying question marks
instead of control characters.

Note: While this commit's diff changes a lot of `user@host` strings to
`user%40host`, which may look suspicious on the surface, there is a good
reason for that: this string specifies a user name, not a
&lt;username&gt;@&lt;hostname&gt; combination! In the context of t5541, the actual
combination looks like this: `user%40@127.0.0.1:5541`. Therefore, these
string replacements document a net improvement introduced by this
commit, as `user@host@127.0.0.1` could have left readers wondering where
the user name ends and where the host name begins.

Hinted-at-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
</feed>
