Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114838 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 47098 invoked from network); 12 Jun 2021 19:05:42 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Jun 2021 19:05:42 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0C71B1804D8 for ; Sat, 12 Jun 2021 12:21:32 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,URIBL_SBL,URIBL_SBL_A autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (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 ; Sat, 12 Jun 2021 12:21:31 -0700 (PDT) Received: by mail-lj1-f177.google.com with SMTP id r16so14206860ljk.9 for ; Sat, 12 Jun 2021 12:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craigfrancis.co.uk; s=default; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=muGIEnz3JMKmDu53ni8pA78BcNj7bAzwaHJJqg6KS8E=; b=cv7Pp67gxHP51OWnlaQ6mixdFHdHO4T3AfpXvv2XgQ9rIN1JucBvbEnuShk313i7Xk uW/Y7aQb4Fu3G09ASK+816g5G5TyXSHAliv2k+PxDOJRekUjCbnTB57XghJRN486cOpL 3lohYNYq6H6jJ4s0jUqYG19HYSe+cqC6WzFMY= 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=muGIEnz3JMKmDu53ni8pA78BcNj7bAzwaHJJqg6KS8E=; b=JFnXZjSocdQ3s09fioemrQq7HGljP5JNjVP9XjAJQ6DYamtY6NvtFXCQ6w4ZZyYzmz 7fiiJkLPTee8K5MiEhNPMEg95gUrW0AJEDCUhE4phWSurTZm+13a3bjSVV0PIBvCM6FL tfXpIudCFZnGee7TGZarP1581lhP4xIrcNxEKVwVG1WHY8nPg1oOIwl78DZxUMwPQ/U/ RTVhNsS7Q0Fo1jQpDrj7Nz0k5FClE7khBXs1lgbrC8aVd6ZK6IjA2DPyRuSfclOhcb/V mw792fd7uGXztSY3qRE5Z4gYGLyaYwK+0hgCJ16l9I+4S3VsXDrjzQEtXcEb8OZ0biTT JMMQ== X-Gm-Message-State: AOAM5334VlnTcG0NSN2HsG/JbPDeqkaoHPqLbeGxzrwBbOhnLMB8YbQv GDcv7GRLS8mYp3s/zWnRdlcnZQCCOeVGMOxXQegpqQ== X-Google-Smtp-Source: ABdhPJxNF5kajXECLny30WRXoWA4ZWiHZ+nAXqSM4gzbny7Kv9XJp37iU6PeAMKS6X1DZ852gZOyWSA4oLlaZL19cz8= X-Received: by 2002:a2e:b60d:: with SMTP id r13mr7768459ljn.314.1623525689805; Sat, 12 Jun 2021 12:21:29 -0700 (PDT) MIME-Version: 1.0 References: <315be10c00c5e68238fb210ee543df1d@gmail.com> In-Reply-To: <315be10c00c5e68238fb210ee543df1d@gmail.com> Date: Sat, 12 Jun 2021 20:21:19 +0100 Message-ID: To: =?UTF-8?Q?Lauri_Kentt=C3=A4?= Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000065aac05c49688ca" Subject: Re: [PHP-DEV] [RFC] is_literal From: craig@craigfrancis.co.uk (Craig Francis) --000000000000065aac05c49688ca Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 12 Jun 2021 at 19:59, Lauri Kentt=C3=A4 wr= ote: > Hi, > > I wrote the untaint() / make_literal() function, just in case. > > implode("", array_map(fn($c) =3D> $chars[ord($c)], str_split($s, 1))) > > https://3v4l.org/EaN9Z#focus=3Drfc.literals > > Sorry and bye. > > Yes, I have a similar example in the RFC (eval). The is_literal() function provides a guard rail (for everyone, but especially for less knowledge developers), but as with most security things, there=E2=80=99s nothing stopping you from deliberately climbing up = and jumping off, but at that point it=E2=80=99s very clearly your choice to do = so. Thanks for looking it over, and I hope it will be useful. > -- > Lauri Kentt=C3=A4 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > --000000000000065aac05c49688ca--