Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114950 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 88049 invoked from network); 18 Jun 2021 12:15:09 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Jun 2021 12:15:09 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B856E1804B0 for ; Fri, 18 Jun 2021 05:32:24 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (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, 18 Jun 2021 05:32:24 -0700 (PDT) Received: by mail-qk1-f170.google.com with SMTP id d196so10439572qkg.12 for ; Fri, 18 Jun 2021 05:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=Jic8AxxSps9X0gCXU3IRQkKM59xfpTBYsOBoW2L973s=; b=FmTWf6lQZU2/VbCrWOZ9U86EbHkBGmwaguLEvqMJTZHKEm0xZJea0jvnOLdW8Df/7/ wBpBt653So8mnGUk9YpTnxswi7slFFnSLDglnEl2beNAm5FD/KFmm89GbpKh0yGo8OBC lrhIfV/nneTzcB5pMM/OdTbDFAd3QorF2HROh/cKdEWBiHyvSvk7yQgT0M62Wf6rWZo2 KzeZ0GLIXoPoPONW6qto7X1RgEaFjJMe+2nvoGvRVRSLz2ZQaUosinXczZsEZM3+ZRz4 rFhVAZtR8NRBQCJccwoZA6K7wRVwgRilgJ0PS04RR76uwBTQnfI3+hH1JrVlhS3E8wWH 9KRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=Jic8AxxSps9X0gCXU3IRQkKM59xfpTBYsOBoW2L973s=; b=bLrQzd1LlsFfZ1jD1RsMf4oy13rDVJk0UgS5DgDnWaBIRoTWbv1LxM3uUz4cPBGNp2 Jsw7x0jWgWSB53pTxN7jF3ICqUt2Qxd83f7gBtn7OWvnA17Lr5gdTKvnKJ9GLLPJ88Xu 12Bqq8HR+SAyRAf61OwWl9eQDLYoHREHgnWliugUgMxge/zuhVaA4+2VwJceWo0nQHY7 41fbJQILu5cuKbRmwLelYyEKY0mO+tae/uhbYxdSyKBe8h+1R+79pMjudHjASUVaYdvs dpgXh0Dx0DoSptTDNEKbiGxRGxdfhn1/5pJ9VFnGwLs4FjY7hBq4d7RwIcD+m1ScJNwE EddQ== X-Gm-Message-State: AOAM532W9qBDL4147ksqdxl9u4W0daGMjJ0NuDwfqw1re9aGzZe9N2ie fmQ/FNawR1dEMA7VFSgROKk5RL1WgwNjsCtV X-Google-Smtp-Source: ABdhPJz11QN3Y46zkxK4igkbbVaNtzkt5TWs62IjXyHjturppK5N6wBRiUc9eiJGPvFJc9AwmbLViQ== X-Received: by 2002:a37:bb82:: with SMTP id l124mr8971315qkf.119.1624019543732; Fri, 18 Jun 2021 05:32:23 -0700 (PDT) Received: from [192.168.1.10] (c-24-98-254-8.hsd1.ga.comcast.net. [24.98.254.8]) by smtp.gmail.com with ESMTPSA id u3sm5296419qtg.16.2021.06.18.05.32.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jun 2021 05:32:23 -0700 (PDT) Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_F39A6AE6-8246-488F-9F68-ED2D06EC2C52" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Date: Fri, 18 Jun 2021 08:32:22 -0400 In-Reply-To: Cc: php internals To: Craig Francis References: X-Mailer: Apple Mail (2.3608.120.23.2.7) Subject: Re: [PHP-DEV] [RFC] is_literal From: mike@newclarity.net (Mike Schinkel) --Apple-Mail=_F39A6AE6-8246-488F-9F68-ED2D06EC2C52 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 18, 2021, at 8:30 AM, Mike Schinkel = wrote: >=20 >=20 >> On Jun 18, 2021, at 7:22 AM, Craig Francis > wrote: >>=20 >> On Fri, 18 Jun 2021 at 11:45 am, Guilliam Xavier = > >> wrote: >>=20 >>> IIUC, with the addition of integers, the function will return true = for e.g. >>> `'SELECT * FROM foo LIMIT ' . (int)$limit` even if $limit doesn't = come from >>> a "static" value (e.g. random_int() or even `$_GET['limit']`) >>=20 >> Yes, that=E2=80=99s correct. >>=20 >> Supporting integers from any source helps with adoption, and we = cannot find >> any security issues (it=E2=80=99s a fairly small change to the RFC, = and that >> prompted the new name, especially as the original is_literal wasn=E2=80= =99t >> perfect). >=20 > For the avoidance of doubt can you confirm that this $sql would indeed = be trusted? >=20 > $ids =3D array_map( 'intval', $_GET['ids'] ?? [] ); Sorry, that should have been: $ids =3D array_map( 'intval', $_GET['ids'] ?? [0] ); -Mike --Apple-Mail=_F39A6AE6-8246-488F-9F68-ED2D06EC2C52--