Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116980 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 48885 invoked from network); 4 Feb 2022 09:49:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Feb 2022 09:49:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6DC391804C3 for ; Fri, 4 Feb 2022 03:04:22 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS199118 195.10.208.0/24 X-Spam-Virus: No X-Envelope-From: Received: from mout-b-110.mailbox.org (mout-b-110.mailbox.org [195.10.208.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 4 Feb 2022 03:04:21 -0800 (PST) Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-110.mailbox.org (Postfix) with ESMTPS id 4Jqt2r111bz9slL; Fri, 4 Feb 2022 12:04:20 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=woltlab.com; s=MBO0001; t=1643972658; 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; bh=nuJs0Kb7nQTYnzqNddscGNoe6Ug63fAYbJpiJB9n1tE=; b=JWDAyed+rDl188wzAIvmF1z/Eq78AAIgxYjCTnIsklRaUqsXf0bBoyxJZoPSFZnu05TbQV gMj/IKQpDS7IqU1J9PXj3xuMzthcIy0oj59ugRt5QzXgceFsngzAGW9xjb/PKFUxwkRTw8 KYi0yN9+yB1UIVDmPr/KkbR2B3jFRllLoEfMwplPwsSIEI0vL382hCFMjVukjeYbj6//Tn iPcfEfLG9a1Pq20vx1a+VePYA3e4jrD7SermCOFLCqLN6wGma/xr3Vcpc5FzkfyqNPWcQV i8yKcvM89400wQko+Myh17nXAQY6DJFiKIYjLKEf3BfHDFvl6SldnD/THlNQdg== Message-ID: Date: Fri, 4 Feb 2022 12:04:12 +0100 MIME-Version: 1.0 Content-Language: en-US To: =?UTF-8?Q?Alexandru_P=c4=83tr=c4=83nescu?= Cc: PHP internals References: <1d272d70-1d78-5bd1-2e11-9f903c755073@woltlab.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] RFC [Discussion]: Redacting parameters in back traces From: duesterhus@woltlab.com (=?UTF-8?Q?Tim_D=c3=bcsterhus=2c_WoltLab_GmbH?=) Hi Alex On 2/1/22 07:38, Alexandru Pătrănescu wrote: > I think storing the original value within the replacement value should be > considered and voted in this RFC as well, even if implemented in a separate > PR. > I did write some code where I process programmatically the backtraces and > while I might not have used it with sensitive parameters, it would be good > to have the code generic, if this passes. > > I'm guessing that mostly means accepting the value as a constructor > parameter exposing a getValue() method > And, of course, making sure var_dump/print_r/string-casting does not print > it. I mean, it looks like the implementation is doable. I've now proceeded with this: https://wiki.php.net/rfc/redact_parameters_in_back_traces?do=diff&rev2%5B0%5D=1643710897&rev2%5B1%5D=1643972253&difftype=sidebyside I've also updated the example implementation: https://github.com/php/php-src/pull/7921 Please take a look, looking forward to your feedback! Best regards Tim Düsterhus Developer WoltLab GmbH -- WoltLab GmbH Nedlitzer Str. 27B 14469 Potsdam Tel.: +49 331 96784338 duesterhus@woltlab.com www.woltlab.com Managing director: Marcel Werk AG Potsdam HRB 26795 P