Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114079 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 93143 invoked from network); 19 Apr 2021 21:28:53 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Apr 2021 21:28:53 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B6EA11804E2 for ; Mon, 19 Apr 2021 14:31:15 -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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (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 ; Mon, 19 Apr 2021 14:31:15 -0700 (PDT) Received: by mail-qk1-f181.google.com with SMTP id y136so5311665qkb.1 for ; Mon, 19 Apr 2021 14:31: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=oIAJeThzzXWz0izGhU5SqFDerHghTdM+pdxhAHucdqo=; b=N8rAb4CTedNMmXhcE9qZL6O60BBRZK+XDw6RixorjBC84g1+vTZwTpZEV9vZZb02/k /Nnr9HZd3UiRjfFFg0qu/HucqYtM+Tf8eZTQL1qfJF+4nVtXg79QefFGUE8iYU8hyzsb aUir222VhOAS2+aNxhTN3ofEtORYwlReWvhIkPhk88nXeSDA39EWwLZF/mCzLUJ4XNw4 SbL0k6Mh6iy/LNnNsapHphKZLYAAw/j9wynVVcav8LJvSquVWAHuCQuTuGNntutUxCId LRJw8vjf+Bgrjkv8yw6emL6u1GToW2c/A9H7lR/h3qg2bg2kdfOMcoDolY5C44Vfp4ke GQ7Q== 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=oIAJeThzzXWz0izGhU5SqFDerHghTdM+pdxhAHucdqo=; b=NMKkBDwny4UnYo2q8BNF0c6s3mFv7NdmrqxawBK4I85wdIeLQ3gESu/dcWT2bX56Qc adkSBks3RLI9CgMEQhCWYwD8yQUpG4ACqD+jX/i8uid6z9dsdChKiKKzG6093fwE2ren iSvcG8zr6hM9kkngb+vC/yz13Vbm6/yTEMnfQGcrCYbksSfngVy4H+I1zB9SoXHoCYhh FA426vQjDuUdYa9CVzqVh24ja01xtkc+6WQqr0dPJXPXW3GnQc+CW5CmFFr16YkTmSon AFqzFL/qvd40tWZpr3ny4NYrBxoJIxzpDvYJQhgwouZYYwWpUN31uYo/cStiK6m+2420 itAQ== X-Gm-Message-State: AOAM532yi93jsOgI7oiEDCqldybIJ8FrIo6kvqCr52XjcDXm5kJcVOkK ExgyAlc1u92Ob+0H8aipM6PGtwit8/q4ExqqdVms1Bi1Sk+/gg== X-Google-Smtp-Source: ABdhPJwrw+/u9yHha/iSUS/3uqky8rx7ko0QtQUrc1s0w+yViFJR/yKYv+/10R3vuNn6ASQlYx5cneoO/DBveAFTZuI= X-Received: by 2002:a37:9f8f:: with SMTP id i137mr2823301qke.222.1618867874281; Mon, 19 Apr 2021 14:31:14 -0700 (PDT) MIME-Version: 1.0 References: <28be190c-21ea-b796-cec7-b8db21d14eca@gmail.com> In-Reply-To: Date: Mon, 19 Apr 2021 22:31:03 +0100 Message-ID: To: PHP internals Cc: Nikita Popov Content-Type: multipart/alternative; boundary="00000000000095ba6f05c05a0cb7" Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.1 From: tekiela246@gmail.com (Kamil Tekiela) --00000000000095ba6f05c05a0cb7 Content-Type: text/plain; charset="UTF-8" Hi Nikita, I would like to propose a deprecation of FILTER_SANITIZE_STRING. This is a very dubious filter that has almost no use. It removes NUL bytes, encodes single and double quotes in HTML, and removes anything between < and optional >. It does not function the same as strip_tags() as pointed out in this comment https://www.php.net/manual/en/filter.filters.sanitize.php#118186 It is also one of the only two filters using FILTER_FLAG_NO_ENCODE_QUOTES flag. I believe this function is very misleading especially to new users who are looking for a default string filter. The real default one is called FILTER_UNSAFE_RAW which sounds like something one should not use. While in reality, it is FILTER_SANITIZE_STRING that can damage your data and should not be used. This also includes the deprecation of FILTER_SANITIZE_STRIPPED which is just its alias. Regards, Kamil --00000000000095ba6f05c05a0cb7--