From unknown Sat Aug 16 18:18:58 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#64392 <64392@debbugs.gnu.org> To: bug#64392 <64392@debbugs.gnu.org> Subject: Status: cksum: escaping issues of --check output Reply-To: bug#64392 <64392@debbugs.gnu.org> Date: Sun, 17 Aug 2025 01:18:58 +0000 retitle 64392 cksum: escaping issues of --check output reassign 64392 coreutils submitter 64392 Christoph Anton Mitterer severity 64392 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 30 20:21:16 2023 Received: (at submit) by debbugs.gnu.org; 1 Jul 2023 00:21:16 +0000 Received: from localhost ([127.0.0.1]:55996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFOMW-0006Xp-Bq for submit@debbugs.gnu.org; Fri, 30 Jun 2023 20:21:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:46490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFOMU-0006Xg-6p for submit@debbugs.gnu.org; Fri, 30 Jun 2023 20:21:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFOMK-0003Ox-KU for bug-coreutils@gnu.org; Fri, 30 Jun 2023 20:21:05 -0400 Received: from dog.birch.relay.mailchannels.net ([23.83.209.48]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFOMI-0004wn-PL for bug-coreutils@gnu.org; Fri, 30 Jun 2023 20:21:04 -0400 X-Sender-Id: instrampxe0y3a|x-authuser|calestyo@scientia.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id E1957800C55 for ; Sat, 1 Jul 2023 00:10:56 +0000 (UTC) Received: from cpanel-007-fra.hostingww.com (unknown [127.0.0.6]) (Authenticated sender: instrampxe0y3a) by relay.mailchannels.net (Postfix) with ESMTPA id CCFD58009D3 for ; Sat, 1 Jul 2023 00:10:55 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1688170256; a=rsa-sha256; cv=none; b=oMauzzdgzK4gHXYnL668/xFW5p1VVASadZn7BJ0HZO7a4pFcoHL768kULYLaahIfePSVyK rK10MsRf/QHdUMpdal3iWUHzKxOVUCy5PdjrYRaL449p1M54W6LvjMPhvihVudEh3LrpG0 Hx+XcowLU4m7mHtd93vbi6uuDGc6q0gvdtC+lNZgKM2kr0qLXu2yRP3Ufn+K/30g5w3lD0 7WSAq1BaOffYm9AujVMAANIIWwOTUVO4HEmW505EQ4iPZZIqLNYpsnuPUn9MRoFhN8zsXe MkCEGxydjgxaxCocr6VZsQjhPkofuNqhHrLDCJDmqBaDQU2jylxo0OP/E+9/pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1688170256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G/963hyvHSeXRaV7omPDqSsZ+Oh7mvlLXpjQxzpod5U=; b=PGkW3fxvrrQyBhHVroY9jLoxsaxPwvq/qbjujzLm7ImxDvh2bhVVNM/09Gu7GtyWl88mOt OiuTwUvjGDcJsl5YssZFhpCn3/Wnyt2oizs/Th0D/xUijp0UpeX23tF5Sj6P2kdS/OPKrg EAciyfVmGCi2yMkZ9YF4RvtFWB12Vg+mChfAvtv87yfDFKoo2E1EyeWgNHaPMpoatgVBRW 6okXT0P6qSCgyV3egW9IRvqP/WjjX0oSqwkm6PS/EfKKo84Xr3x5s5XKFrAzlIZH+CHl+l wlNSWdwc/ImdvK59sk6PT+D6Y2HrfNYZkAdJ98nHknock+ewkr3lcqTDXJ6pSw== ARC-Authentication-Results: i=1; rspamd-7ccd4b867f-6ffjs; auth=pass smtp.auth=instrampxe0y3a smtp.mailfrom=calestyo@scientia.org X-Sender-Id: instrampxe0y3a|x-authuser|calestyo@scientia.org X-MC-Relay: Neutral X-MailChannels-SenderId: instrampxe0y3a|x-authuser|calestyo@scientia.org X-MailChannels-Auth-Id: instrampxe0y3a X-Shoe-Reaction: 6816da93722b742e_1688170256312_1964335842 X-MC-Loop-Signature: 1688170256312:2045538824 X-MC-Ingress-Time: 1688170256312 Received: from cpanel-007-fra.hostingww.com (cpanel-007-fra.hostingww.com [3.69.87.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.116.63.82 (trex/6.9.1); Sat, 01 Jul 2023 00:10:56 +0000 Received: from p57b04b11.dip0.t-ipconnect.de ([87.176.75.17]:36610 helo=heisenberg.fritz.box) by cpanel-007-fra.hostingww.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qFOCS-00Cksc-0m for bug-coreutils@gnu.org; Sat, 01 Jul 2023 00:10:54 +0000 Message-ID: Subject: cksum: escaping issues of --check output From: Christoph Anton Mitterer To: bug-coreutils@gnu.org Date: Sat, 01 Jul 2023 02:10:49 +0200 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.3-1 MIME-Version: 1.0 X-AuthUser: calestyo@scientia.org Received-SPF: pass client-ip=23.83.209.48; envelope-from=calestyo@scientia.org; helo=dog.birch.relay.mailchannels.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hey. It seems to me that the output of --check mode in cksum (and likely also in md5sum and friends) suffers from improper escaping (which, IIRC, is not even documented for that output... but may be wrong): $ touch a $'new\nline' '\n' z $ ls -al total 0 drwxr-xr-x 1 calestyo calestyo 24 Jul 1 02:01 . drwxr-xr-x 1 calestyo calestyo 176 Jul 1 01:48 .. -rw-r--r-- 1 calestyo calestyo 0 Jul 1 02:01 a -rw-r--r-- 1 calestyo calestyo 0 Jul 1 02:01 'new'$'\n''line' -rw-r--r-- 1 calestyo calestyo 0 Jul 1 02:01 z -rw-r--r-- 1 calestyo calestyo 0 Jul 1 02:01 '\n' $ cksum -a sha512 --tag * > sums.tagged $ cksum -a sha512 --untagged * > sums.untagged $ cat sums.tagged=20 SHA512 (a) =3D cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36c= e9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e \SHA512 (\\n) =3D cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d= 36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e \SHA512 (new\nline) =3D cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f= 4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da= 3e SHA512 (z) =3D cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36c= e9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e $ cat sums.untagged=20 cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d8= 5f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e a \cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d= 85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e \\n \cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d= 85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e new\nline 65bb946645079f3ebfa931460430c1676d656e455e5a6266b85fa0c78f08f63507eb417b70f= 67106c8ad9cdebeacb29fa770e86b1624763f310f1ebb6bd0542a sums.tagged cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d8= 5f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e z $ cksum -c sums.tagged a: OK \n: OK \new\nline: OK z: OK $ cksum -c sums.untagged=20 cksum: sums.untagged: no properly formatted checksum lines found $ sha512sum -c sums.untagged=20 a: OK \n: OK \new\nline: OK sums.tagged: OK z: OK Assuming the same rules for the --check output as for the sums files, a leading \ should serve as the escaping indicator. So for: \new\nline: OK that would be fine but for: \n: OK it's not but would rather need to be: \\\n: OK The failed cases may be similarly affected by this. Thanks, Chris. btw: Though it's probably too late to change, I think the output format is rather unfortunate. It should have been more closely to the BSD style format used for the sums file, e.g. something like: () =3D again with the optional leading \ to indicate escaping. The problem with the current format is especially, that it's not possible to determine the alog, which may however be of interest if there are more than one per file. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 01 12:07:26 2023 Received: (at 64392-done) by debbugs.gnu.org; 1 Jul 2023 16:07:26 +0000 Received: from localhost ([127.0.0.1]:58528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFd8A-0006HK-8C for submit@debbugs.gnu.org; Sat, 01 Jul 2023 12:07:26 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:55389) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFd86-0006H6-OQ for 64392-done@debbugs.gnu.org; Sat, 01 Jul 2023 12:07:25 -0400 Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-311394406d0so3339308f8f.2 for <64392-done@debbugs.gnu.org>; Sat, 01 Jul 2023 09:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688227637; x=1690819637; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:sender:from:to:cc:subject:date :message-id:reply-to; bh=7eO84eit4HKK5q8yg0VKDGcsD3HSQLnH7lH+tdCjZ1A=; b=hzl2lnkg0D+a6fGDO4/3K1dapQKmbLPMwLJX/tA0tO0W2P7fQ0vNnYjMi2LNJEpFlx 1MnqXKDYN6h60JVFwwLafFjAZq2OdpJ135tbKPBEXDlD+LskU1mEYzVbJcI2+sNSpkKU 7ySepdco7qq6xqvGRgwMw/Rs3TMb9iVlEmwYWdviqiXhAwG+aDjwFJD36IqEueUV0PlJ prSraGM+GR4IDYYVtt2SO0ZFwggE5JBIMu/b0YZuDTAh1lexE0jQNLgphMiRCzQ+oVYB reY4XVB+/E784d9ULsVLy3E55C705KLKCnK+ZBcC2UNd9oscPKtI8ng8hFSIS1eD0s56 MGxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688227637; x=1690819637; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7eO84eit4HKK5q8yg0VKDGcsD3HSQLnH7lH+tdCjZ1A=; b=V80eE1BtIQ2y3mTdsSuXpbmhj9a9PAb94PCFXe0dbyGaeX1r5fL1lvLFfPo85HaF6d jnjK50hTUDcXFN9BIFbL26D71wex69GI2Dwy/rrqKcI10ukaxibR3DjQchJki1iu9M5i 5ss0ovnYmYFa2w0i/GOxrB4Emz2ENCrTzC69bdemoI+YtolmE5/tPV7qqBD/qjZEVfcr 9kSnTwxYeOV+mN/aonUgvtlCXGpvfmKT8+mO6kHEwE3DScseFodEPpsbRbNjQlrjwZu3 TKJu5OnT8zJJ5+pih5FtRcworktwqy0Te6SE0U4KDwyd3jYiLtxhB9jNjpP2IOU2UuAV eQCg== X-Gm-Message-State: AC+VfDyu0ETHZJc/duZTGifejqJMX5vqG9mJ218ZVyAMmDcfMjzAW2fp YqLrYX/+NQKqP/1Nl8m/d1E= X-Google-Smtp-Source: ACHHUZ5JamyZnOk90JdIHTjyJl/NJ6ImnUPKrsTtx2/ocNVmMtWMVLYXntKt2Vs3zVfLv/vlLW5RjQ== X-Received: by 2002:a1c:7c1a:0:b0:3f9:b297:1804 with SMTP id x26-20020a1c7c1a000000b003f9b2971804mr4137038wmc.17.1688227636620; Sat, 01 Jul 2023 09:07:16 -0700 (PDT) Received: from [192.168.1.20] (95-44-90-175-dynamic.agg2.lod.rsl-rtd.eircom.net. [95.44.90.175]) by smtp.googlemail.com with ESMTPSA id q6-20020a7bce86000000b003fbaa2903f4sm11815424wmj.19.2023.07.01.09.07.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 01 Jul 2023 09:07:15 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------Jzsiqdc2h2GvvsEJjifEVSlG" Message-ID: Date: Sat, 1 Jul 2023 17:07:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#64392: cksum: escaping issues of --check output Content-Language: en-US To: Christoph Anton Mitterer , 64392-done@debbugs.gnu.org References: From: =?UTF-8?Q?P=C3=A1draig_Brady?= In-Reply-To: X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 64392-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) This is a multi-part message in MIME format. --------------Jzsiqdc2h2GvvsEJjifEVSlG Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 01/07/2023 01:10, Christoph Anton Mitterer wrote: > Hey. > > It seems to me that the output of --check mode in cksum (and likely > also in md5sum and friends) suffers from improper escaping (which, > IIRC, is not even documented for that output... but may be wrong): > > $ touch a $'new\nline' '\n' z > $ ls -al > total 0 > drwxr-xr-x 1 calestyo calestyo 24 Jul 1 02:01 . > drwxr-xr-x 1 calestyo calestyo 176 Jul 1 01:48 .. > -rw-r--r-- 1 calestyo calestyo 0 Jul 1 02:01 a > -rw-r--r-- 1 calestyo calestyo 0 Jul 1 02:01 'new'$'\n''line' > -rw-r--r-- 1 calestyo calestyo 0 Jul 1 02:01 z > -rw-r--r-- 1 calestyo calestyo 0 Jul 1 02:01 '\n' > > $ cksum -a sha512 --tag * > sums.tagged > $ cksum -c sums.tagged > a: OK > \n: OK > \new\nline: OK > z: OK > Assuming the same rules for the --check output as for the sums files, a > leading \ should serve as the escaping indicator. > > So for: > \new\nline: OK > that would be fine but for: > \n: OK > it's not but would rather need to be: > \\\n: OK Right. We traditionally didn't escape any chars in the --check output, but that changed with https://github.com/coreutils/coreutils/commit/646902b30 To minimize escaping, that patch only considered the '\n' character, but we should also have considered file names with a leading '\'. The attached should address this. Marking this as done. thanks, Pádraig --------------Jzsiqdc2h2GvvsEJjifEVSlG Content-Type: text/x-patch; charset=UTF-8; name="cksum-leading-backslash.patch" Content-Disposition: attachment; filename="cksum-leading-backslash.patch" Content-Transfer-Encoding: base64 RnJvbSA3Yzc4NzBhMWYyYTYwOGFjYTFjZmYyNGY0MDJlNGE0NDM1OGYwOGNlIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/UD1DMz1BMWRyYWlnPTIwQnJhZHk/ PSA8UEBkcmFpZ0JyYWR5LmNvbT4KRGF0ZTogU2F0LCAxIEp1bCAyMDIzIDE3OjAxOjE4ICsw MTAw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Citjb21wYXJlIGV4cCBvdXQgfHwgZmFpbD0xCisKIAogIyBFbnN1 cmUgQlNEIHRyYWRpdGlvbmFsIGZvcm1hdCB3aXRoIEdOVSBleHRlbnNpb24gZXNjYXBlcwog IyBpcyBpbiB0aGUgZXhwZWN0ZWQgZm9ybWF0Ci0tIAoyLjQxLjAKCg== --------------Jzsiqdc2h2GvvsEJjifEVSlG-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 01 13:20:53 2023 Received: (at 64392) by debbugs.gnu.org; 1 Jul 2023 17:20:53 +0000 Received: from localhost ([127.0.0.1]:58607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFeHE-0008He-Pa for submit@debbugs.gnu.org; Sat, 01 Jul 2023 13:20:53 -0400 Received: from bird.elm.relay.mailchannels.net ([23.83.212.17]:2290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFeHB-0008HS-7c for 64392@debbugs.gnu.org; Sat, 01 Jul 2023 13:20:51 -0400 X-Sender-Id: instrampxe0y3a|x-authuser|calestyo@scientia.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 04CEE360B94; Sat, 1 Jul 2023 17:20:48 +0000 (UTC) Received: from cpanel-007-fra.hostingww.com (unknown [127.0.0.6]) (Authenticated sender: instrampxe0y3a) by relay.mailchannels.net (Postfix) with ESMTPA id D1EEA360BF1; Sat, 1 Jul 2023 17:20:46 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1688232047; a=rsa-sha256; cv=none; b=QvzTp7r5QYTMJHcF75xZgbuW93+WGr9iZPIvQV91xv53DVvIRpFPDAkqXUp0akpOzVme6+ +hkBTrxWpihST4QArksdjGsX+WaSxCiFXmhNQAHNn6wWBbRsn6m9H/+vDdb/1xqB0xNuj+ YURFJry/ApI3ul3K/NMBsH7r+PTk+JH/ULli7Smjs7eBEegZcjQ8FMsktG0GSJVQSgTlOq rlm+V6Bg7XDFU5mupU6SFj+ccLzAIYWQFV9olOPnpBCOIdQk6k4jmpI8p+w08n9Mcpx6CG QsNhhcovdefc7VNuIUmKc7Jzn2UrLzyn8iwHRkkG92owq34eqFBiG/MqietqJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1688232047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X2LA/v1+Pq229jJxJ1GtD5Ndx81TpljTbtAcoMl0e9w=; b=Qa4ezP4JgGnHFNAr9PVHxazVg+5+mRkZjTxS1a8dEiq0X00s/+awVa2uJPsjayFyKifGoU BG0PaS/krR79vLcxduBYL2SIZxkxYca7YUa3IPe+DVdbb06NtO1fHif6XTrpv1SetbgTGp 8dx9Bfe/ouA1Ltvy/DZzuSvrx5ZJ3jnet09bEI3aAxSlMh5WLsmIwSMU0MrOHNHsu0A3i9 FIgGg1wshiWvjm9bAMuc5e1jtgLYYHmAr4BTAt8fp+d4Qs5aWYCO4VXJjzrqkpnMOAUvCX u8lDShk5Ka+Bts65XZdvZ9yRK7NH7FCtnipXRWQ3QivorZiugDrtg7rPeQd/Qw== ARC-Authentication-Results: i=1; rspamd-7ccd4b867f-28gws; auth=pass smtp.auth=instrampxe0y3a smtp.mailfrom=calestyo@scientia.org X-Sender-Id: instrampxe0y3a|x-authuser|calestyo@scientia.org X-MC-Relay: Neutral X-MC-Copy: stored-urls X-MailChannels-SenderId: instrampxe0y3a|x-authuser|calestyo@scientia.org X-MailChannels-Auth-Id: instrampxe0y3a X-Supply-Reaction: 789d370325ed7014_1688232047476_1377251865 X-MC-Loop-Signature: 1688232047476:881105720 X-MC-Ingress-Time: 1688232047476 Received: from cpanel-007-fra.hostingww.com (cpanel-007-fra.hostingww.com [3.69.87.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.103.187.85 (trex/6.9.1); Sat, 01 Jul 2023 17:20:47 +0000 Received: from p57b04b11.dip0.t-ipconnect.de ([87.176.75.17]:56376 helo=heisenberg.fritz.box) by cpanel-007-fra.hostingww.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qFeH5-004qY5-0E; Sat, 01 Jul 2023 17:20:45 +0000 Message-ID: <3f937371734acc925d38c0b6b047fd16806bf5ff.camel@scientia.org> Subject: Re: bug#64392: cksum: escaping issues of --check output From: Christoph Anton Mitterer To: =?ISO-8859-1?Q?P=E1draig?= Brady , 64392@debbugs.gnu.org Date: Sat, 01 Jul 2023 19:20:38 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.3-1 MIME-Version: 1.0 X-AuthUser: calestyo@scientia.org X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64392 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, 2023-07-01 at 17:07 +0100, P=C3=A1draig Brady wrote: > Right. We traditionally didn't escape any chars in the --check > output, > but that changed with > https://github.com/coreutils/coreutils/commit/646902b30 > To minimize escaping, that patch only considered the '\n' character, > but we should also have considered file names with a leading '\'. >=20 > The attached should address this. Thanks, but wouldn't it be better to use exactly the same escaping as in the sums output? I.e. also escaping \r? Also, documenting the escaping behaviour in info/manpages? Cheers, Chris. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 01 13:27:23 2023 Received: (at 64392) by debbugs.gnu.org; 1 Jul 2023 17:27:24 +0000 Received: from localhost ([127.0.0.1]:58611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFeNX-0008S0-KO for submit@debbugs.gnu.org; Sat, 01 Jul 2023 13:27:23 -0400 Received: from insect.birch.relay.mailchannels.net ([23.83.209.93]:27962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFeNU-0008Rr-Pz for 64392@debbugs.gnu.org; Sat, 01 Jul 2023 13:27:21 -0400 X-Sender-Id: instrampxe0y3a|x-authuser|calestyo@scientia.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id DE6F1C0774; Sat, 1 Jul 2023 17:27:19 +0000 (UTC) Received: from cpanel-007-fra.hostingww.com (unknown [127.0.0.6]) (Authenticated sender: instrampxe0y3a) by relay.mailchannels.net (Postfix) with ESMTPA id 1CEAAC04F4; Sat, 1 Jul 2023 17:27:18 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1688232439; a=rsa-sha256; cv=none; b=r2ZqAZ5Gg7IrCrgb8NJO238VoC6efxmT076YbSiF90vJFs/SqK3c03PyJa7brIHNwvZggI BO4sjrTN4S2C/OUQXXU1CIcPnM7aKJTnYBxeawWTy697R0eMuA//mq0/fIPpW/Ntvt9dGa I2p6+AiLNeDbWi34sPlaACJjSVj90nbwNea7aRk29yIwmlImH84Fr5meDdvbYO0xynTh8Q 3UaJTEQtUO+8B6Z7yO7dCzkTahXGpajKUGP/Y61tHPeZ0/VPisJhL4B3+i9hi4uWrKLI8V S3gz9RES23wh00TXPMD7GddxzPXJd7EgPqqrVOXsNHmb2JLRenQcnZ3jKuOnGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1688232439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T7WUzMW5jMzepfe2NTP34ISRBewctd30xRz5PqWiiXQ=; b=FgJPUcCtxTpq/CJwO9bmNPCRiICc7m/I8eibT7/SfFcqCr3hg3JX85ffiIGlvGMhJdbKl3 O08i4ddJx/ed5GQo2zuC526AhVs9eq2rYnIzCR3DwbzH9KfyYqEQOcC4jA7ec9dsn+CJsm zcl+CBbmImaFFuczwQsFAVe7+LcMG5SOpSQ3g7BkUC34resa91E5PXREQIJlDWZItiGlQz 2MXmVTDqRd7AweCSC5ZD6FesjnMuPfs4iteu+xwZKXVdC+GyDFQ3e8xWnprwenjN+xbVTn VWoiXvhzXzjG8fz96qBr8TpMgB8sfJCKBcw8mVswHuxJ0pDtnEnYKC+h2F0ikA== ARC-Authentication-Results: i=1; rspamd-7ccd4b867f-zmjfh; auth=pass smtp.auth=instrampxe0y3a smtp.mailfrom=calestyo@scientia.org X-Sender-Id: instrampxe0y3a|x-authuser|calestyo@scientia.org X-MC-Relay: Neutral X-MailChannels-SenderId: instrampxe0y3a|x-authuser|calestyo@scientia.org X-MailChannels-Auth-Id: instrampxe0y3a X-Tangy-Robust: 0ae5fdb500c454c5_1688232439745_1467628442 X-MC-Loop-Signature: 1688232439745:1105572929 X-MC-Ingress-Time: 1688232439745 Received: from cpanel-007-fra.hostingww.com (cpanel-007-fra.hostingww.com [3.69.87.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.115.231.140 (trex/6.9.1); Sat, 01 Jul 2023 17:27:19 +0000 Received: from p57b04b11.dip0.t-ipconnect.de ([87.176.75.17]:35864 helo=heisenberg.fritz.box) by cpanel-007-fra.hostingww.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qFeNP-004rW1-1n; Sat, 01 Jul 2023 17:27:17 +0000 Message-ID: <583bfcce4ed2154bbcd541e38f3a6e1bdf8683f1.camel@scientia.org> Subject: Re: bug#64392: cksum: escaping issues of --check output From: Christoph Anton Mitterer To: =?ISO-8859-1?Q?P=E1draig?= Brady , 64392@debbugs.gnu.org Date: Sat, 01 Jul 2023 19:27:11 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.3-1 MIME-Version: 1.0 X-AuthUser: calestyo@scientia.org X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64392 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Oh and I've seen you really escape \ only if it's the first character. Same here, I'd suggest to apply the same escaping rules as for the other output, and escape '\\' '\n' and '\r' as soon as any of them occurs in the output. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 01 13:53:22 2023 Received: (at 64392) by debbugs.gnu.org; 1 Jul 2023 17:53:22 +0000 Received: from localhost ([127.0.0.1]:58669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFemg-0000qs-1n for submit@debbugs.gnu.org; Sat, 01 Jul 2023 13:53:22 -0400 Received: from mail-wm1-f48.google.com ([209.85.128.48]:48461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFemb-0000qa-6E for 64392@debbugs.gnu.org; Sat, 01 Jul 2023 13:53:20 -0400 Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-3fbc0609cd6so28316995e9.1 for <64392@debbugs.gnu.org>; Sat, 01 Jul 2023 10:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688233991; x=1690825991; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=l/H15QuQnnfi6dQEvaZ6kL/7HwZjfz760B3zbmBFyFk=; b=aENxVAuXnfKxoaxRkFE19pqAT73ybP4YQu3z0tzBkDPtLf/GAXqDUpVFygc44stunQ +Yvwd1bxivmd77+d2X/9f+eE163euaCKhvBPu8rDtY6wKU8lMTHNm1WQvJJJT3NXrP6g qnLdBlRuSSGrmvVvnURh4B6i7WxN0wyYhkcsVHodI4W1nm0srCY95uFaMzsbh5nFdJqi oBgHqW1S2/WYOZmCvTkxuKsMuo3cMwL3XL70nIbRYwZNVdPxkQko8t98TEwpPFQ23wwl MeCfIf0ciJEchANNr+78CCzwtNWBjLBqMZTT96RUk4zaqAmFYijYYdY0oxZVeyvwNtvO t5Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688233991; x=1690825991; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=l/H15QuQnnfi6dQEvaZ6kL/7HwZjfz760B3zbmBFyFk=; b=j8o2XiCBXLLhqSw7ulBq1j0WCMS5gQlUC/JeF9pCkrDdg+/A3Rcv7RARnkIB0l2m/5 /ylxmaRnv/lAxSIfa9v0ZjoSBzL1QOosL3frOl1MsVDPbPNhyZg4rIDjXMvpCPWws0oo LotjpPmgM5rIArUL6VG7L7bfMyuh5Hw7ZWTyHEKJgeS4nP0BWxCjqRAUaUk7zXkFyNM0 eGL5agqSpoSjcxHdJB6zLK6rjj7HRUlzq2ZhGolYsBZI//Hg20gTnObsYdgYlumkZbov e4GTW+5r1+hERhYarBZU/uhHHcCaYd6NZh7jU5Z+KsOz/xHTS0Hf+wLkwTGFAYCjNlxg bQXQ== X-Gm-Message-State: AC+VfDyYudbBL1l1qYvBBvXf7PQj6y5LllwwFR0p42T1m/BXcgZEh1oL 0Ej30UX8s/eBrACLyFqGLNs= X-Google-Smtp-Source: ACHHUZ6MxnlQACh8x+RpjOZooMLTo28/KZc6epgQndqXMUWzVEUBOWJFvGCuvlbja9LAa/PGqfqt0g== X-Received: by 2002:a1c:4c10:0:b0:3fa:991c:2af9 with SMTP id z16-20020a1c4c10000000b003fa991c2af9mr4228073wmf.16.1688233991071; Sat, 01 Jul 2023 10:53:11 -0700 (PDT) Received: from [192.168.1.20] (95-44-90-175-dynamic.agg2.lod.rsl-rtd.eircom.net. [95.44.90.175]) by smtp.googlemail.com with ESMTPSA id n10-20020a05600c3b8a00b003f7f475c3bcsm2706947wms.1.2023.07.01.10.53.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 01 Jul 2023 10:53:10 -0700 (PDT) Message-ID: <2247c6e6-4e36-16de-96db-e1f81eba9085@draigBrady.com> Date: Sat, 1 Jul 2023 18:53:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#64392: cksum: escaping issues of --check output Content-Language: en-US To: Christoph Anton Mitterer , 64392@debbugs.gnu.org References: <3f937371734acc925d38c0b6b047fd16806bf5ff.camel@scientia.org> From: =?UTF-8?Q?P=C3=A1draig_Brady?= In-Reply-To: <3f937371734acc925d38c0b6b047fd16806bf5ff.camel@scientia.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 64392 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) On 01/07/2023 18:20, Christoph Anton Mitterer wrote: > On Sat, 2023-07-01 at 17:07 +0100, Pádraig Brady wrote: >> Right. We traditionally didn't escape any chars in the --check >> output, >> but that changed with >> https://github.com/coreutils/coreutils/commit/646902b30 >> To minimize escaping, that patch only considered the '\n' character, >> but we should also have considered file names with a leading '\'. >> >> The attached should address this. > > Thanks, but wouldn't it be better to use exactly the same escaping as > in the sums output? I.e. also escaping \r? Yes maybe. I was thinking this status output would be less likely to be persisted, and so would not need the same escaping requirements, but for consistency it may be better to have the same escaping rules, with the caveat that file names with a literal backslash anywhere would now be escaped. That's not a common case I suppose, so I'm amenable to using the consistent escaping here. > Also, documenting the escaping behaviour in info/manpages? Info docs already contain: "Without ‘--zero’, if FILE contains a backslash, newline, or carriage return, the line is started with a backslash, and each problematic character in the file name is escaped with a backslash, making the output unambiguous even in the presence of arbitrary file names." cheers, Pádraig From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 01 15:12:56 2023 Received: (at 64392) by debbugs.gnu.org; 1 Jul 2023 19:12:57 +0000 Received: from localhost ([127.0.0.1]:58710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFg1g-0002uj-Cw for submit@debbugs.gnu.org; Sat, 01 Jul 2023 15:12:56 -0400 Received: from bee.birch.relay.mailchannels.net ([23.83.209.14]:2131) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFg1a-0002uV-Ok for 64392@debbugs.gnu.org; Sat, 01 Jul 2023 15:12:54 -0400 X-Sender-Id: instrampxe0y3a|x-authuser|calestyo@scientia.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 324FD7E0839; Sat, 1 Jul 2023 19:12:49 +0000 (UTC) Received: from cpanel-007-fra.hostingww.com (unknown [127.0.0.6]) (Authenticated sender: instrampxe0y3a) by relay.mailchannels.net (Postfix) with ESMTPA id 206607E1023; Sat, 1 Jul 2023 19:12:47 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1688238768; a=rsa-sha256; cv=none; b=wcDZ9AbjezHTxeDWNdhVavSaGdCT5uKyPNFh51/XWNUcbdun4QQrCTPYKQ/gUXROHwCUep lJaSk8WcNRZiWHcZoAROZY4ta658ooAVZ8NWWn1vxbZC+pn9yYRfJF1pvgsRPdEpoodzHw tPWFSxe0Ki2eyK6lXxXt1sAUy1LDPrpDwYzaJ0s71aPIgg2jEqzl8Sj+fs++2IzdgbygKe HWevDtNly3z1+GIIs/EJsyTVVUD4AADgbFHD5E6U+A6k8YNCmHpE5qZ6idQqDWoy1rnwWG MCbBT3eglE9wyHnIknpKeSMXy69YmRnc++Q8BewVWyIZ1ELUfWAhCiU0KWXezA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1688238768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uMlxk+zQ15c49YZmAQhOQLSXqHkfsHopq8yvs3UopCw=; b=bW13QI6MJ21hO1sTwaLGLPmZ6OQitwltg5dgYnGxCM/+QQTWU/i1rNktG9DuD8VouuJNwk MRuojem0z8dtCYJBkVpv86GYLhyc2ccOEzJLoLjSnp86Au5xZhi+P1tLXNmfcexGGPhZuz EtlEXZWC1JjF+qNVNxSPHKYswucnyxiD4YJmUw24bybMdMJiiSKd69l88vQ/DTLNyRnc5y 2OAmoayTY5+6/lBVRRCvLQKukQcOK2HXr+bh/hHopvEnZ+F0nQaHIiifNAZEZEarX6ZfCq ShbTUakQkRARraeL0k064352A3Cdnd30kUaMRQBdF7DY1a011PTySw4ijSXo9w== ARC-Authentication-Results: i=1; rspamd-85899d6fcc-d4zwr; auth=pass smtp.auth=instrampxe0y3a smtp.mailfrom=calestyo@scientia.org X-Sender-Id: instrampxe0y3a|x-authuser|calestyo@scientia.org X-MC-Relay: Neutral X-MailChannels-SenderId: instrampxe0y3a|x-authuser|calestyo@scientia.org X-MailChannels-Auth-Id: instrampxe0y3a X-Juvenile-Tangy: 6dbdadc10330a664_1688238768761_532905267 X-MC-Loop-Signature: 1688238768760:3797028997 X-MC-Ingress-Time: 1688238768760 Received: from cpanel-007-fra.hostingww.com (cpanel-007-fra.hostingww.com [3.69.87.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.123.193.136 (trex/6.9.1); Sat, 01 Jul 2023 19:12:48 +0000 Received: from p57b04b11.dip0.t-ipconnect.de ([87.176.75.17]:37296 helo=heisenberg.fritz.box) by cpanel-007-fra.hostingww.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qFg1U-005Hc2-35; Sat, 01 Jul 2023 19:12:46 +0000 Message-ID: <5fd6d6026840091ed4bb8ee7fde77edf78348a1c.camel@scientia.org> Subject: Re: bug#64392: cksum: escaping issues of --check output From: Christoph Anton Mitterer To: =?ISO-8859-1?Q?P=E1draig?= Brady , 64392@debbugs.gnu.org Date: Sat, 01 Jul 2023 21:12:41 +0200 In-Reply-To: <2247c6e6-4e36-16de-96db-e1f81eba9085@draigBrady.com> References: <3f937371734acc925d38c0b6b047fd16806bf5ff.camel@scientia.org> <2247c6e6-4e36-16de-96db-e1f81eba9085@draigBrady.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.3-1 MIME-Version: 1.0 X-AuthUser: calestyo@scientia.org X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64392 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, 2023-07-01 at 18:53 +0100, P=C3=A1draig Brady wrote: > That's not a common case I suppose, > so I'm amenable to using the consistent escaping here. Good :-) > Info docs already contain: >=20 > "Without =E2=80=98--zero=E2=80=99, if FILE contains a backslash, newline,= or carriage > return, the line is started with a backslash, and each problematic > character in the file name is escaped with a backslash, making the > output unambiguous even in the presence of arbitrary file names." Well yes, but that's in like the "common" section. Further down, for --tag, it's explicitly mentioned again there, that there's the escaping when \ is present as leading escaping indicator. For --untagged and --check there's no such further mentioning ... so at least it's a bit inconsistent... and could lead people to think it would happen only with --tag. Actually I'd even more "definitely" describe the escaping algorithm above, in the sense that any \ \r and \n are escaped, and that any other \-sequence (like \" \0 \xXX etc.) are explicitly reserved for future use. This especially in hindsight that other tools may also use the tagged/unttaged output formats and add their own add-ons assuming they're free to do so. Cheers, Chris. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 11 07:27:22 2023 Received: (at 64392) by debbugs.gnu.org; 11 Jul 2023 11:27:22 +0000 Received: from localhost ([127.0.0.1]:49838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJBWb-0002XX-Qi for submit@debbugs.gnu.org; Tue, 11 Jul 2023 07:27:22 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:48266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJBWY-0002XI-M9 for 64392@debbugs.gnu.org; Tue, 11 Jul 2023 07:27:20 -0400 Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-3fbea147034so56372765e9.0 for <64392@debbugs.gnu.org>; Tue, 11 Jul 2023 04:27:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689074833; x=1691666833; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=YoU3/14WOoYyVbGG22Bc7J5kPT5p+ooR79J0IKN67Sc=; b=b/gbxD09cTU8H98b7G+fshHl/t8yR7hI74gd3yQvWFygKjAwgngHAANcAZevU3XieP phxUNrQuoS/VRHY2o2PDz3D05i9tb0oswzvPTlwSeZtVvChS8fkSzT48s3CS8Fku6FyE ltZZGEn/UEFT0bFf+pRR2u+RueI7gFM7+2gcd+I2QxqioiWamCpvxMss++LEpkj4R6Zt HH7i9bUpY6zZ2gfM1WppYtmjxvqYYybN8SGadzJxmeuFMC+0BBMCd3wHtA9c65cjqU5H DqUV5wyf03K2E+hy7xQbzRcgCRwIMK6Fm6p/nux+yGOHFU0wyM1wkg6x6I8MpPwzrNUx kCQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689074833; x=1691666833; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YoU3/14WOoYyVbGG22Bc7J5kPT5p+ooR79J0IKN67Sc=; b=kT1t6S/22PmdsuyVgopohkXLC2ogDj1RkofQJKHazCaGRqLTRQlCC3RgrPFHd0/NtO 4PML0N8KovrLeTj2DWZaHiNoVKb5mOhZCDTaSOCy2V8Ouzg4B+PDSKbiSxbU+6Kczq+W nsm3moKZeqBmTrVnN9vIuE3CrUodFrD0GZSM22qRlvuIvGLoUR4/VPRrhSQtLpTgj4Xy hLyN4PYKfQYIE+f5p36oEaLg4x3LBDyXpaPKAyo3SSN+aM9P1xU1N1hSRuwMC/roRyoS eoc4zgHODoyABZ3SgKjSsWKO22etwhVv75xc3eQzbQLsPmDyetRAhN8FJM2bE7i2oYYB VidA== X-Gm-Message-State: ABy/qLb3dTpjkXW8PgXpSEL4kv2IVpGaTZH88gaieE7i8ReeFmrRUpQL v8Z0tFnPINN9zLf7u7LcKNc= X-Google-Smtp-Source: APBJJlG5cAfJBcnnnablUQfHfO1hRsCHZFtOBSnwfDaPnLtW2HZdK+kuMedzz6KhVmP+Ilc9CI7gaQ== X-Received: by 2002:a05:600c:3786:b0:3fb:b890:128b with SMTP id o6-20020a05600c378600b003fbb890128bmr13601598wmr.27.1689074832091; Tue, 11 Jul 2023 04:27:12 -0700 (PDT) Received: from [192.168.71.36] ([212.129.86.143]) by smtp.googlemail.com with ESMTPSA id c26-20020a05600c0ada00b003fbcdba1a52sm12827964wmr.3.2023.07.11.04.27.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Jul 2023 04:27:11 -0700 (PDT) Message-ID: <4bb3704e-ff25-ace7-0549-6cec47342427@draigBrady.com> Date: Tue, 11 Jul 2023 12:27:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#64392: cksum: escaping issues of --check output Content-Language: en-US To: Christoph Anton Mitterer , 64392@debbugs.gnu.org References: <3f937371734acc925d38c0b6b047fd16806bf5ff.camel@scientia.org> <2247c6e6-4e36-16de-96db-e1f81eba9085@draigBrady.com> <5fd6d6026840091ed4bb8ee7fde77edf78348a1c.camel@scientia.org> From: =?UTF-8?Q?P=C3=A1draig_Brady?= In-Reply-To: <5fd6d6026840091ed4bb8ee7fde77edf78348a1c.camel@scientia.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 64392 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) On 01/07/2023 20:12, Christoph Anton Mitterer wrote: > On Sat, 2023-07-01 at 18:53 +0100, Pádraig Brady wrote: >> That's not a common case I suppose, >> so I'm amenable to using the consistent escaping here. > > Good :-) > > >> Info docs already contain: >> >> "Without ‘--zero’, if FILE contains a backslash, newline, or carriage >> return, the line is started with a backslash, and each problematic >> character in the file name is escaped with a backslash, making the >> output unambiguous even in the presence of arbitrary file names." > > > Well yes, but that's in like the "common" section. > > Further down, for --tag, it's explicitly mentioned again there, that > there's the escaping when \ is present as leading escaping indicator. > > For --untagged and --check there's no such further mentioning ... so at > least it's a bit inconsistent... and could lead people to think it > would happen only with --tag. > > > Actually I'd even more "definitely" describe the escaping algorithm > above, in the sense that any \ \r and \n are escaped, and that any > other \-sequence (like \" \0 \xXX etc.) are explicitly reserved for > future use. > This especially in hindsight that other tools may also use the > tagged/unttaged output formats and add their own add-ons assuming > they're free to do so. Full escaping and doc adjustments pushed at: https://git.sv.gnu.org/cgit/coreutils.git/commit/?id=86614ba1c cheers, Pádraig From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 11 08:33:32 2023 Received: (at 64392) by debbugs.gnu.org; 11 Jul 2023 12:33:32 +0000 Received: from localhost ([127.0.0.1]:49920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJCYe-0000nx-5j for submit@debbugs.gnu.org; Tue, 11 Jul 2023 08:33:32 -0400 Received: from purple.birch.relay.mailchannels.net ([23.83.209.150]:53267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJCYY-0000nk-Td for 64392@debbugs.gnu.org; Tue, 11 Jul 2023 08:33:30 -0400 X-Sender-Id: instrampxe0y3a|x-authuser|calestyo@scientia.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 8C72E101FE9; Tue, 11 Jul 2023 12:33:25 +0000 (UTC) Received: from cpanel-007-fra.hostingww.com (unknown [127.0.0.6]) (Authenticated sender: instrampxe0y3a) by relay.mailchannels.net (Postfix) with ESMTPA id 22A621011C5; Tue, 11 Jul 2023 12:33:23 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1689078804; a=rsa-sha256; cv=none; b=pAv3By9vgX55WpW1WQNHKPdJ+K/kgR+O/R98sbNKDApgBmh6djOUnnLmpGCY6ka0X74ygj gbVY6ntAjNBukJugqA+9MKyrLd1xUBCpCNVsNwwkEYq5t0VXtDYopYhR/yQx8JERhhsBxq yxfqpCcvuKZyfYeSXxZMT5eodoK28sxX+2wT+yp5LRqSEz4m5p+40OjIm3nHTqEP+sq/M6 M4BAZYFHnwe/lg1GoouoUCj4of9dXIf+6c9+lZhJTrvszC5NZ1KCRsietrHxP0Iaa7RdMm IZ7SUGSrOrg6Bzu6jFA4x/7JNHIqgLinrNA2YszAQDe2fZVQdUhSIcJNbX2BZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1689078804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7SKJNjV/1OLk6P2kVVkg+L8vnGjUfyJzLPlwOvovazw=; b=Z49Qm3k4n3+relWYJoQHwPpTx2SZH/k3MhUcbn5rC6g1V6CS3tZ8+4ikv5anMOBVA1uRpb DazP0Xv1iGNahEmWjYWKbOKq8hGpxEWZ9+0y/wNygpJQUQQJQD3APE8Q/jOiCsncSddHfo mmYnURu5PRNtPx47Try3BdXujUzk5lX/4ZFcRNt5fureIfGPIFixhRsx4dnEbuCq/WO4MM 7WHYiBAfPQOpUtbBVAlX41+p+KVvp93TGFvKyufxEoVLnLP/+mPyWcyqeGKZ7MxB1MtTG8 FS+237sHF+uaxkQmrwjF51x/DukN4D1+KX5srmOA2LX1bm0arR39VpMFw+tc8w== ARC-Authentication-Results: i=1; rspamd-7d9c4d5c9b-kprkf; auth=pass smtp.auth=instrampxe0y3a smtp.mailfrom=calestyo@scientia.org X-Sender-Id: instrampxe0y3a|x-authuser|calestyo@scientia.org X-MC-Relay: Neutral X-MC-Copy: stored-urls X-MailChannels-SenderId: instrampxe0y3a|x-authuser|calestyo@scientia.org X-MailChannels-Auth-Id: instrampxe0y3a X-Occur-Abortive: 17d9f0e4263ce1ca_1689078804988_2566583437 X-MC-Loop-Signature: 1689078804988:238393678 X-MC-Ingress-Time: 1689078804988 Received: from cpanel-007-fra.hostingww.com (cpanel-007-fra.hostingww.com [3.69.87.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.127.59.40 (trex/6.9.1); Tue, 11 Jul 2023 12:33:24 +0000 Received: from p5090f58d.dip0.t-ipconnect.de ([80.144.245.141]:40678 helo=heisenberg.fritz.box) by cpanel-007-fra.hostingww.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qJCYR-009taU-0l; Tue, 11 Jul 2023 12:33:22 +0000 Message-ID: Subject: Re: bug#64392: cksum: escaping issues of --check output From: Christoph Anton Mitterer To: =?ISO-8859-1?Q?P=E1draig?= Brady , 64392@debbugs.gnu.org Date: Tue, 11 Jul 2023 14:33:17 +0200 In-Reply-To: <4bb3704e-ff25-ace7-0549-6cec47342427@draigBrady.com> References: <3f937371734acc925d38c0b6b047fd16806bf5ff.camel@scientia.org> <2247c6e6-4e36-16de-96db-e1f81eba9085@draigBrady.com> <5fd6d6026840091ed4bb8ee7fde77edf78348a1c.camel@scientia.org> <4bb3704e-ff25-ace7-0549-6cec47342427@draigBrady.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4-1 MIME-Version: 1.0 X-AuthUser: calestyo@scientia.org X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64392 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Tue, 2023-07-11 at 12:27 +0100, P=C3=A1draig Brady wrote: > Full escaping and doc adjustments pushed at: > https://git.sv.gnu.org/cgit/coreutils.git/commit/?id=3D86614ba1c Thanks :-) Cheers, Chris. From unknown Sat Aug 16 18:18:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 09 Aug 2023 11:24:14 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator