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 ny/gKDkTpmDYEgAAgWs5BA (envelope-from ) for ; Thu, 20 May 2021 09:43:53 +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 +Aj+IzkTpmBpLQAA1q6Kng (envelope-from ) for ; Thu, 20 May 2021 07:43:53 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 0D46D15E49 for ; Thu, 20 May 2021 09:43:51 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 115CA2AAB8; Thu, 20 May 2021 03:43:47 -0400 (EDT) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [IPv6:2a0b:5c81:1c1::37]) by mail.notmuchmail.org (Postfix) with ESMTPS id 9C1C42AAAB for ; Thu, 20 May 2021 03:43:43 -0400 (EDT) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 3A8641B001AD; Thu, 20 May 2021 10:43:37 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1621496617; 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: in-reply-to:in-reply-to:references:references; bh=Re/Rxq6XMcFccKThbiomFSxTTeFIFYnLV01B2UBQZFs=; b=pSPkGfMiS+MQepoNy3T+e+i6fBzLXiFP296zgtX3Sgw2QQi0/ux6Fo+p1icwJSJge83jAO eYLx3NEs7aD9kpNZ8KgEFRV3fFoGAeK7Wnfyd3nWEQEk1GrNpq9vUjt5tg2t6fFmamqiPH wNciCbYv38w66zt+fHUllC/fb+zwyNNlat1zF0PTyVWa3J9Ufb5kAXPaHaDfKpaVud/iLk Q8KrKzlx81I2pJz9NW38Vh7m7RJ3sk30mYE1AT4wZ2PmC1GSg1ncXH+FbPMkyMB8qXHGg+ NMjExMKuEUjSPFLpa9AMBy560wKl9IR6fFHy4EqhkR9QxtEL1PrL9A2bt23Hug== From: Tomi Ollila To: Felipe Contreras Subject: Re: [PATCH v3] test: replace notmuch_passwd_sanitize() with _libconfig_sanitize() In-Reply-To: References: <20210518055443.21964-1-tomi.ollila@iki.fi> User-Agent: Notmuch/0.32+21~gfdddd4c (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1621496617; 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: in-reply-to:in-reply-to:references:references; bh=Re/Rxq6XMcFccKThbiomFSxTTeFIFYnLV01B2UBQZFs=; b=HR8b7T6j+b+lFtkklUA2HRjRZS44400lEf39D+I7gLvyWpsqXcqUtvQEvYpwm8kJPKbMjK Sq28LiVAn3XHGI1ovUSkP+RrQ17a/DvQRoo2HY3vhtxyh+BodKMxIJRf7LS1f/oKyQCVjU tK1TzT6r+2wdFSnxcCtqIY69UiyJtzLq4jJRMesh5RwnNr60OqWlzoHcrqt49g0KtUPiYE iYkMn2ocsTiRV3Ct5wJIYkki/OzmYHqAeI3dE8UPpMpKUqS2j4fqreXSSCiKNhjpllp7XV YVYem/H2+ekNd7QgmBOjy22VBoemkpLsttXbRz13k9l8jELVp7v4G03pJxQcXw== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1621496617; a=rsa-sha256; cv=none; b=sQtYMPcgfPmvLawIz4gTyAgh9WI1wavvOJ4irHycH8rANH51qhrWg+oV1Mnno7+b7UwDiG CQnwmuBfTCr49GCjMbzg8WCOm6dmI4gEw+KvxjDLH1QWxOrr7qpLw2ZVfvl5gdfOCqS7MA e3h+OGhjw2tH4dbo5E2yeVyh6E1Nh4Ors7IO1LMeAipF/sWWmb4X5Nc9/4uzJZVuP406xP CtXOQEJreomt3ph8H486bMXIOSetYM64esBbJJqsL33/kh8WGAi+9Z4B3QKl8d3XSaA/QY pDyWAw2pKCZxVqvoxAJ61WUo3ryn4b4TVea184qwenXSrCFokreRwQZG17hYKQ== Message-ID-Hash: FFV3DKPATDFYUC3SWF6FJLUL2GFHMR34 X-Message-ID-Hash: FFV3DKPATDFYUC3SWF6FJLUL2GFHMR34 X-MailFrom: tomi.ollila@iki.fi 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621496633; 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=lpVkOrl3qt/ZFVG+i6jciQfbQ3ZQCaGTM46KnlXk6sU=; b=M1dJSpCPqXjBU0eLWf4r/ELRA45Tdre3y+EAoPqjyu2bzkc9jPq/tJ0M4JgkmsHaJvucON 3HBnSmXJSB0FZIoonfRoQbl3xc2Fq8eSPncEQsHzxtHbpXHPuW57wstk5Vif7lsngDjOoP SKQMkiBEiJSFZMoEuHrOSnpcFBlx/nyuH8iMhztoakJDdDIINHSzKhfEBzzUjsYdIs2544 RgH61hbYJ+dcd8PS45Z70QRY8M08RnY5ekJwlE+CxqixoVV5IRHduKX4NBfh+ymyWWfYBM po/vc5Oyg34yyzGDdlQDgpzA+Q4qxtN86lfgB8IprCJyPuGHf+Lq7dENkNJAuQ== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1621496633; a=rsa-sha256; cv=fail; b=TzsOdcGpy0aKpOSWMbiz0FIrthsbm70XG91BpAhQntnSOhqGlsNv27uA8wLyxw4dgvGWiw 2JOBr+4UlcSMpoqOox3SDIxl3Ap7B8HUYZ2k4b7EE/yXq4AjzPC1Fo8Td6hbdqoEHLmXVj RhNZE1qid9DDhgJcl2pFdVuulIJ5Y/NacyJUCC2/1zU8Aw2K2inXpe9CT6QLWC4LXSPyLc nu8ailv0X2PWk4YEv01aF/j7C+MVXUm7RmL5M/y8LbSWgZQ0yqZk6XlzgVjIJOlO3asHzi V9sHyl0ROj7jQL8V8tbvxruY0HcHsjHV3aTy/QgL+g5S2rcqzPOh6xf3+Clx+w== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=pSPkGfMi; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 1.08 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=pSPkGfMi; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 0D46D15E49 X-Spam-Score: 1.08 X-Migadu-Scanner: scn1.migadu.com X-TUID: gMaPe/VnEAFs 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. 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) Tested the above. That python /dev/fd/3 3< > -- > Felipe Contreras Tomi