Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124634 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 711241A00B7 for ; Sat, 27 Jul 2024 01:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1722042809; bh=QDjZPbyq43g6TxomwkPpMTKwzba01+SUEXzVJZZGpRE=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=WwDfr38Q5AShhPQBjL50ibGoGEsWO4DMD5QLT1oTmSvfncyofiQ/uU7txSXUfn7Wi 1sG0LfB8/dAligWaf8Xl2jQQS20ksRJ0u0VAMBVyh/xRXEb/cr9DNvxFk0sXM+vMeh E450DETFkWaVzDUB2iMMDr1Qpw227LdR/j6LmwQHGSIpoFJA20GDxH/ND740jIvvBl pjyeNGhIXPwN7kOiC6LbgosbAMPlXR1oZhzrlr7xRR6OWeyyH3R6By6p/apb0plOsh U4L/tXybTp3zdHKJA/g/2vhu56+ylV0yWQ36YHLslsv/WUV4HwFDWJ5t1y60956sOh vAMg6cOT/41QQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B669E18005D for ; Sat, 27 Jul 2024 01:13:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: ** X-Spam-Status: No, score=2.3 required=5.0 tests=BAYES_50,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DMARC_MISSING,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-yw1-f180.google.com (mail-yw1-f180.google.com [209.85.128.180]) (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 php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 27 Jul 2024 01:13:28 +0000 (UTC) Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-66498fd4f91so2565147b3.3 for ; Fri, 26 Jul 2024 18:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20230601.gappssmtp.com; s=20230601; t=1722042712; x=1722647512; darn=lists.php.net; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SW7nxeGAt52CbpsXVDWyLxlKlrxssVTf6hiVRq8cGlc=; b=HaGtIHRJFjsBEcE22wCu6ZTb94vgjrq3ECxfYSxvt+F34z/FZLLXwM0+j6/rkCl0ZU fkAMWj0byOgC5QAw3Br+yBaRfdg7P+lEm+3NBoLFCgttxNeu/j0S9++0DPil1Dc/fOG3 f7LVz5P5hNa1CjdNJz9+ZQfV1epqj0iPh1rYBTkp80SkhPu02ElYsep88RzBqf5ERTQ2 5Mr6Uzieg+0cXnFA2OEgGac8ELv5JahJIAO4B589WEMeg8qzlQEOy/EoLdoJw3ZM0fqE 0NiBZiuwzwy+5AIz+xkc3TMD1fiF1UyCDi0x7kfHS2brLXe4lin+N3mN+2p3NoxhUz1I jGzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722042712; x=1722647512; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SW7nxeGAt52CbpsXVDWyLxlKlrxssVTf6hiVRq8cGlc=; b=JZArCrK8BT01HqkZJAdSAFJ4xhZDqE4acX2VMo7l0ZQkI9mdJbiRIbJ9qLmCOelj3H 0ZgkpwY+peLsJmCVxrPPudZgH+o6Chcf+st9+f00R3QsaA483NF9p88QW7Dx2b+S+Jnc bCSXrOO8uc08xyDan8759EA2O1Yy1bz4Bci/u5+Jdq4aMjTc9BTFXNmSQiKvW0DJk9aS /UHncZp7k7racEGJHC+apWUKuRYDYJNwxR5hzyDyiAdFHHza5KXomOBuQUqTKx+pWUgY TvKdB7Ycd2QNahA/IrvVdfIeyAXSoeS+IqzuxtdNiRpsaBDUn5I7dASL50aipWSxwQM9 GGgg== X-Forwarded-Encrypted: i=1; AJvYcCVWiTG7CfNoM7tpoOWEEO8jhnnohBBii2tdjpYFSsbk3VwxbneCnJdEvlQghrH8vqs6R9fRM+NT5UTCHuXN2CtQ1YMWBG02oA== X-Gm-Message-State: AOJu0YyFfklErmAGb8QcloolIbqHvkxio+21Oml0eu7uNt6eY+BssJzd X0p8T80Tfm9SuVklX8LMa++uNrPc3euQ31fhKfoRo2Tt2DCPozU2m5pOUx1o/rx2dfRfASAGllF WrJM= X-Google-Smtp-Source: AGHT+IHo8XVPFweqg/TV4S/ItCjglfMejt1/bbYUOlU+5I5Dz7bpuKQxhzZ1rRSJLJIOw7KFGqiBNA== X-Received: by 2002:a0d:f3c6:0:b0:627:24d0:5037 with SMTP id 00721157ae682-679ffbfc4a8mr18448557b3.0.1722042711756; Fri, 26 Jul 2024 18:11:51 -0700 (PDT) Received: from smtpclient.apple (c-98-252-216-111.hsd1.ga.comcast.net. [98.252.216.111]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6756c07790fsm10899697b3.132.2024.07.26.18.11.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jul 2024 18:11:50 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.8\)) Subject: [PHP-DEV] =?utf-8?B?UmU6IFtQSFAtREVWXSBbUkZDXSBbVk9URV0gRGVwcmVjYXRpb25z?= =?utf-8?B?IGZvciBQSFAgOC40IOKAlMKgVXNlIGEgY2Fycm90LCBub3QgYSBzdGljay4=?= In-Reply-To: Date: Fri, 26 Jul 2024 21:11:49 -0400 Cc: =?utf-8?Q?Tim_D=C3=BCsterhus?= , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <1a88918e-e808-d778-45e1-53797660e093@php.net> <95147d9d-d6e8-4396-bf0b-409c33679f90@bastelstu.be> To: "Gina P. Banyard" X-Mailer: Apple Mail (2.3696.120.41.1.8) From: mike@newclarity.net (Mike Schinkel) > On Jul 26, 2024, at 6:03 AM, Gina P. Banyard = wrote: >=20 > Stephen Rees-Carter, a security expert that has performed countless = security audits on Wordpress and Laravel websites, would like to = disagree with the fact that it is not enough of a good reason. [1] People who work in emergency rooms think that motorcycles are the = ultimate evil and should be banned, because emergency room workers are = the ones who see all of the carnage of the small percent who wreck their = motorcycles, and they see none of motorcycling's upsides. Similarly, security experts see everything through the lens of security = issues, because they see the problems FAR more often than everyone else. = And as security expertise, they don't see code through other lenses = where security is not an issue. Not saying the input of a security experts is not useful, but one man's = input is only one side of the story, just like emergency room workers = vs. motorcycles. > Yet again the PHP community doesn't care about security of its users, = current and future, and just prefers the convenience of needing to type = less characters and not go back fix some code for better design. Explicitly stated, that is a straw man argument, which Rowan already = called out. Different people weight risks, costs, and benefits differently, and just = because you might feel your approach for addressing security concerns = should eclipse anyone else's approach and all other concerns does not = mean your approach exists at the peak of the moral high ground. Every time PHP deprecates software it places the burden and the cost of = remediation on anyone and everyone who continues to use the software = that requires the deprecated items. Those who are zealously = security-first generally dismiss those burdens and cost of remediation = =E2=80=94 because they do not have to be burdened by then nor pay the = costs =E2=80=94 and so they shift them to everyone, including those who = are using functions properly. Those more pragmatic balance that burden and cost with the potential = burden and costs that deprecating can impose. And in the case of md5() = where public code on GitHub shows almost 1 million uses, that imposed = burden and cost is pretty large. But ignoring the burden and cost, is it strongly arguable that = deprecating md5() wouldn't even fix the security problems in most cases = as those you most want to force to fix things will the ones more likely = to just create a polyfill and move on. As many has already stated on = this thread. Kudos to Tim D=C3=BCsterhus for identifying = https://www.phptutorial.net/php-tutorial/php-csrf/ and = https://www.php-einfach.de/php-tutorial/die-wichtigsten-php-funktionen/ = but his takeaway for an action item was less inspiring. He argued those = articles support deprecations when it seems to me the more obvious = takeaway after finding those articles would be to reach out to those = websites =E2=80=94 as well as others publishing insecure information =E2=80= =94 and provide them with updated content to replace the content they = are currently publishing with content that is promotes secure practices. = Getting those websites updated is likely to have far more positive = impact for new PHP developers learning to do things "the right way" then = forcing them to update their code where they'll likely just use = hash("md5"). Further, rather than shift the burden of remediation to everyone else, = why not write a crawler that can automatically and proactively submit = PRs to all the code out there using md5(), etc. so that most people only = need to accept the PR to update their code, and make is available as a = CLI for internal use? I know it is not that simple to remediate, but who = do you expect will know how to do that better than those on PHP = internals. Certainly not most GitHub repo owners. Besides, the PR could = say "Review your code we are proposing the change, and if you are = confident that your uses are secure then do not apply this PR. But if = you are not sure they are secure then just apply the PR, test it, and = then you'll certainly be safer." Rather than just take a low-effort, feel-good action for security = theater, if the PHP community REALLY cares about security for its users = it would take a pro-active, higher-effort approach to addressing the = concern. The WordPress community implemented at least one successful = technology-supported "marketing" campaign to move its user base in the = past, one of which was the "Serve Happy" campaign to get people to = update their version of PHP (how ironic!):=20 https://make.wordpress.org/core/features/servehappy/ Why not create a working group to promote a "SERVE SECURELY" campaign = modeled after WordPress's "Serve Happy" campaign, and do your best to = help people remediate their security issues? Hell, imagine the free = press and industry-wide exposure that such as campaign would provide as = a way to educate PHP programmers on the dangers of misusing md5() and = other insecure approaches? It is also strongly possible you could even get significant sponsorship = for such as campaign to pay for some more developer time to address the = problem. It almost certainly could be seen as a feel-good thing for big = industry players to support. Frankly, if the pro-deprecation voters in the PHP community are not = willing to pursue an initiative that proactively seeks to help users = remediate and educate users about security concerns then I would argue = *they* do not really care about security of PHP users but instead are = only willing to paying lip service to it. #fwiw TLDR;? Use a carrot, not a stick. -Mike