git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: "René Scharfe." <l.s.r@web.de>
Cc: Git List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] daemon: sanitize all directory separators
Date: Fri, 26 Mar 2021 00:22:41 -0400	[thread overview]
Message-ID: <YF1hkaoFU4CV9zna@coredump.intra.peff.net> (raw)
In-Reply-To: <314451a4-ee8f-fb68-016f-66a4f3bea409@web.de>

On Thu, Mar 25, 2021 at 05:21:24PM +0100, René Scharfe. wrote:

> When sanitizing client-supplied strings on Windows, also strip off
> backslashes, not just slashes.
> [...]
>  static void sanitize_client(struct strbuf *out, const char *in)
>  {
>  	for (; *in; in++) {
> -		if (*in == '/')
> +		if (is_dir_sep(*in))

Yeah, this seems like the obviously correct thing to be doing.

-Peff

  reply	other threads:[~2021-03-26  4:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25 16:21 [PATCH] daemon: sanitize all directory separators René Scharfe.
2021-03-26  4:22 ` Jeff King [this message]
     [not found] ` <xmqq5z1fuen6.fsf@gitster.g>
2021-03-26 14:47   ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YF1hkaoFU4CV9zna@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=l.s.r@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).