From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aFFYJa4Qq2AzSwAAgWs5BA (envelope-from ) for ; Mon, 24 May 2021 04:34:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +44BIa4Qq2DYJAAA1q6Kng (envelope-from ) for ; Mon, 24 May 2021 02:34:22 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D9A96146F7 for ; Mon, 24 May 2021 04:34:21 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 4585B2AB33; Sun, 23 May 2021 22:34:18 -0400 (EDT) Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by mail.notmuchmail.org (Postfix) with ESMTPS id A6C692AB31 for ; Sun, 23 May 2021 22:34:15 -0400 (EDT) Received: by mail-wr1-x42b.google.com with SMTP id y14so24818081wrm.13 for ; Sun, 23 May 2021 19:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=U23C/v0H7X0AEbyE79rg4gRW4dHCGCvGNAjUf/xTgaQ=; b=UNDOqmJKKLOPhoBarXhjoBHxH1UFKRTwKenkqqNw7F5ndwqvOJaJeslUTPu2k3V8xe DUqQrYEeI9tmVp8kv8iVtYwqiLQrcEvb0jiUYwSTGfywlM0FpFi6gLQlAxKrJSbTQ45P 0YouNsWnexHI+O+8g5WCjnehve/WmXWipqFcxxWMwZeSYTTTOCE1Lh2ZvLr0n8VnhI0D VTdQ0X5uqh6nlm6JxL4y2vjsdcwNvrPdvBrP5ZreiJK6YdjmViGFfDtpTTLkx74EXQJl oFyvvz38UCUF9Zy1yAB+2DW/FBJnC4+KVT7pqcN0LwPBYmSbDMSeONs5JwynojUd+eVi P0NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U23C/v0H7X0AEbyE79rg4gRW4dHCGCvGNAjUf/xTgaQ=; b=AyElwLwgEfmFpA3pA6EwI4v5deVYCzjkX+zG/fPZEGaaUPh1u44wWtSpbDqYsz2yHe mVWIoYYL3tvdJf/gIkM62+Zdh8IcpyvBu37yAmgHQ5cR3auLWEkXEG5YjKO2vrynrq3x m5JH3JM0NonsszkkWYNOBSWdTMPttZy5X545JOJX4EJZIsn83QOY2qJXweAh70rsCy+7 y9byNlruZsINyR5W2bfa9NKDguWTSpMP8+eqRwIMnFUBdQFdB2ZZCCUb/xTZsLlUX6Wj 5B+eDxeuj2ToitNL889TgzZAinyNeZ7t5AM/cMGWFtW7O1RDN82rmCJ0bDib6I2nXzIa oP/A== X-Gm-Message-State: AOAM533CXI1i2n9q52HY1Ym6xx16zxmKiOY3YRZRSGLfL5MAJ1PIelnK Z5QuFogiZfvW4fczW44E6iVpLnxO4ZGNgTX6uxg= X-Google-Smtp-Source: ABdhPJyk/nvwMVUDIDRekSh04GJ68pgVO1PvjadAIu3JXu9hl3L3DnUOd+SdJn3lRsSYolkcw5v+UsF6KNmBqPO4GBM= X-Received: by 2002:a5d:5184:: with SMTP id k4mr19542964wrv.84.1621823654570; Sun, 23 May 2021 19:34:14 -0700 (PDT) MIME-Version: 1.0 References: <20210518055443.21964-1-tomi.ollila@iki.fi> In-Reply-To: From: Felipe Contreras Date: Sun, 23 May 2021 21:34:03 -0500 Message-ID: Subject: Re: [PATCH v3] test: replace notmuch_passwd_sanitize() with _libconfig_sanitize() To: Tomi Ollila Message-ID-Hash: D5LA4CA4FN5CN4LS3C2MFQV6QHI3AWIM X-Message-ID-Hash: D5LA4CA4FN5CN4LS3C2MFQV6QHI3AWIM X-MailFrom: felipe.contreras@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: "notmuch@notmuchmail.org" X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621823662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=XuboPG2Ve70wqexeujqPVHBt5w/290zqR3a0eVNKccE=; b=Ga6nQQH5910QYz6mfkrk3+/VKHD+E8HMNowoaZgOxpbr31sTMFKYUdmV6+9agDmVN0CDuA OJXYCcMpslH1E2FeWG37R8l6N3i9SlOUG3NPZYHWK/JPXmRHNmIuXKAY3t/6AecgPGW6re Yp/4Z68SockwCb0pIYcTXtfzpR7LAe3p/4x/lY9KHM87IElmCNimuakdO6A3AqtPPMHIgN DeQozUWZqzmlJsoGom36mvGy8VLgRqanoarC45oc3DeUaLlwWldC6FvhyIB7Rzn9PRR5A1 QnjWUuBTDmc0x66kwym4ww7ibqhmPsn3KSLxD7VgIPwnDzQNy6a3i+RWucEN+A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621823662; a=rsa-sha256; cv=none; b=QQLi8F2q1XrDE0XSV/26NhFxGzOqL67+FQSFbCvaMomyr8hvPWypFosJycndwxW1cURLeM AfM4mqeGrOvPu60TTR3GcaCflcPkoSj2CxvFv6AcGcxRuW+RVmXqRXjGb43sc6W0nxEsqX w5uLmtQmGYjzZOqaBs4LKtcPTLKTcjU8qrbPn7T5PfwY/apXuoLL40fTS444hIttsFM/ID Oh+I9PXoKW0AOaYlG0mw3yYeq0kbTNx7NVPLtikqO4cK6fru+zv926RiBQO9fFmmSYNZaa OmRpWUmP2+fK4gvwHYfX+8g9lq4qEMR0lB5m+UsZmF3FU8GXmWVPwfPckDPKkw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=UNDOqmJK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.97 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=UNDOqmJK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: D9A96146F7 X-Spam-Score: -0.97 X-Migadu-Scanner: scn1.migadu.com X-TUID: Ro6Tme/GB96f On Fri, May 21, 2021 at 1:22 PM Tomi Ollila wrote: > > On Fri, May 21 2021, Felipe Contreras wrote: > > > On Thu, May 20, 2021 at 2:43 AM Tomi Ollila wrote: > >> > >> On Wed, May 19 2021, Felipe Contreras wrote: > >> > >> > On Wed, May 19, 2021 at 12:34 PM Tomi Ollila wrote: > >> > > >> >> Haha, as we do _libconfig_sanitize < OUTPUT > OUTPUT.clean > >> >> reading python script from stdin don't work (perl has __DATA__ ;). > >> >> (bitten again, I did and tested the change... :D). > >> > > >> > That can be fixed with: > >> > > >> > python /dev/fd/3 3< >> > EOF > >> > >> According to > >> > >> https://unix.stackexchange.com/questions/123602/portability-of-file-descriptor-links > >> > >> that solution could be portable enough. > > > > What the operating system does doesn't really matter, bash emulates /dev/fd/x: > > In this case, /dev/fd/3 is given as a parameter to a command, not part of > redirections -- bash cannot know how the program is going to use the > arguments it gets... Right. I did try doing the redirection inside the python code. That also works fine, but I don't think there's a need of doing that unless there's an actual issue with /dev/fd/3. > > And as far as I know the testing framework only works correctly on bash... So... > > > >> Another way still using -c ... I've played to look how it actually looks is > >> (diff since patch v3) > >> > >> - sq = chr(39) # single quote > >> - l = l.replace(sq + name, sq + "USER_FULL_NAME", 1) > >> + l = l.replace("'\''" + name, "'\''USER_FULL_NAME", 1) > > > > Yes, that works too. But that's what I said in another mail that is > > weird stuff. I had to read it again three times and then copy to a > > proper text editor with monospace font to see if it was correct. > > To me '\'' is /idiomatic/ way to embed ' in the middle of a long argument > string... Maybe. I've written a lot of shell code and whenever that happens I switch to double quotes. "foo 'quote' bar" is much more readable to me than 'foo '\''quote'\'' bar'. Cheers. -- Felipe Contreras