From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4D832C80; Mon, 1 Nov 2021 20:05:37 +0000 (UTC) Received: by mail-ed1-f50.google.com with SMTP id s1so68232576edd.3; Mon, 01 Nov 2021 13:05:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:references:user-agent:in-reply-to :message-id:mime-version; bh=jtIZcGkKANkHZykd7YHh65abq+wCZzcvoRA3Om389Pg=; b=LzTXFyLNudNj+cN/2vyoyLFAUmaPhsGjnRQKGjn7cTtJa/yyXPEMVMIbkSBZhcjndv fmYgoPOp13zSihxQjNC6lUl47QUIoE7hnOViq1Nbhd3WkCXG5oNTHVHLJm4J5Q9TRVn4 z2kFYDrXixW425Or+oIOoLCOLv/DiursbmV2KQuaZwDJ7KNNbF6qHhxzACcUDI2p3U88 YIGRHy3Kf+padNbESijpq8wX+h7Wbw2ukyNjUz27fSIEQr6wQYI1bBUlT5wYp3A/lD6c yduMb52GBtRHp7g/AkVzDU+FnyVGbFolUau2rzFsqTFILaNi1fdGWDF8i9Ck3dMA0u+x Y3UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:references:user-agent :in-reply-to:message-id:mime-version; bh=jtIZcGkKANkHZykd7YHh65abq+wCZzcvoRA3Om389Pg=; b=H77Zw93/FrhoCAWq8C9LT4Yno9kra3zUyo3V0/a01HIn1oKDYUcKdu2rSJUQKb7f42 mRtmS6+Dr4IPtKArFFPIYHAXvjGVAC5g1TYUpsIZAYdaQNoGwv50WXcy/+ms8s03OtyD z3qVfwIc2Fn48jdJi2rke1EQ48RheKmRIzejCcwANMF7z/ANnoQqLh6hPlM5yVKvvQ8m +yHzLRE4IOj/YAxpxtAkguvamqm/6A9nZe7YmnMpY8TBbzQuR2wHSDOjTH9RDM2ffsw2 uB3OwXVoT0neIPVsfFnnAHp0MvypNuNry3jCIsJAdBePvuVH1Xx4Zuo4b0zlDWJX8YkV yrrQ== X-Gm-Message-State: AOAM532KgeevfoyTxe5CDJWF73LiK5M2QsQCB3ndce6Mqjs2SAZ821Ts oVgDb960vgtrv9vRneusJHM= X-Google-Smtp-Source: ABdhPJzZ1kd8C9Ot9JgSQtK2BQIutL3Qlx3YV84uO2nL/OKLHouX3iP+gX2TDEF4bxqoiG4nCpIYFw== X-Received: by 2002:a05:6402:42cd:: with SMTP id i13mr44345005edc.396.1635797136151; Mon, 01 Nov 2021 13:05:36 -0700 (PDT) Received: from gmgdl (j120189.upc-j.chello.nl. [24.132.120.189]) by smtp.gmail.com with ESMTPSA id qk16sm7488302ejc.12.2021.11.01.13.05.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 13:05:35 -0700 (PDT) Received: from avar by gmgdl with local (Exim 4.95) (envelope-from ) id 1mhdYl-002BwR-8f; Mon, 01 Nov 2021 21:05:35 +0100 From: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason To: Eric Wong Cc: Konstantin Ryabitsev , users@linux.kernel.org, tools@linux.kernel.org, git@vger.kernel.org Subject: Re: b4: unicode control characters -- warn or remove? Date: Mon, 01 Nov 2021 21:02:34 +0100 References: <20211101175020.5r4cwmy4qppi7dis@meerkat.local> <20211101190905.M853114@dcvr> User-agent: Debian GNU/Linux bookworm/sid; Emacs 27.1; mu4e 1.6.6 In-reply-to: <20211101190905.M853114@dcvr> Message-ID: <211101.86bl333als.gmgdl@evledraar.gmail.com> Precedence: bulk X-Mailing-List: tools@linux.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Mon, Nov 01 2021, Eric Wong wrote: > Konstantin Ryabitsev wrote: >> Hi, all: >> >> Per exhibit a, what should we do in the situation where we discover unicode >> control characters in an email? >> >> 1. Warn and strip these chars out, because they are extremely unlikely to be >> doing anything legitimate in the context of a patch (unless someone is >> sending patches for docs actually written in RTL languages) >> 2. Warn and error out, refusing to produce an mbox >> 3. Just warn and produce an mbox anyway >> >> I'd normally do #3, but with many people piping things to git-am, I'm not sure >> if it's the safest choice. >> >> Exibit a: https://lwn.net/Articles/874546/ > > +Cc: git@vger > > IMHO, defense for this belongs in git-am (which already checks > things like whitespace). It checks whitespace because that's something that's commonly a source of patch corruption. I'm not adverse to adding this to core.whitespace, but trying to catch malicious injected code seems like a rather big expansion of its scope, particularly since: "[...]sending patches for docs actually written in RTL languages[...]" Or just code? People write comment and even in their native languages, and not all projects are as anglo-centric as those hosted on kernel.org. I haven't checked what the overlap is between solving this issue & i18n support, but we definitely should not be assuming that git's only using by kernel.org users & similar, even something as relatively obscure as git-am.