🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.vms
Article #66

Re: Re: ‘This Is Not a Drill’: Critical PHP Vulnerabilities Are Setting the Internet on Fire

#66
From: Dan Cross
Date: Sat, 24 Oct 2026 19:42
111 lines
5241 bytes
In article <11bivpt$305om$1@dont-email.me>,
Arne Vajhøj <arne@vajhoej.dk> wrote:
>On 10/23/2026 5:11 PM, Dan Cross wrote:
>> The early web was a mess.  The protocol was hugely wasteful; the
>> markup language was anemic, and people were resorting to all
>> kinds of bad ideas to try and build content (constructing forms
>> from tables, for example, so that boxes could be aligned).  The
>> web had coalesced around an example from a book with a single
>> addition, but like a high-school kegger, the word got out and it
>> quickly got out of hand. A lot of non-technical people were
>> authoring web pages and web sites by writing HTML directly.
>> They didn't _want_ to become programmers.
>> 
>> CFML, ASP, and PHP stepped into that world and filled a bit of a
>> void.  It inverted the model; you weren't writing programs to
>> generate markup guided by the program's behavior, you were
>> injecting behavior by embedding little snippets of programs in
>> your markup.  The design-oriented types who wanted to focus on
>> content could largely do that.  I don't think that has to be
>> inherently insecure, though I can see how having someone around
>> to add a bit of domain expertise to the mix can prevent a lot of
>> problems down the road.  Textual interpolation is a powerful
>> tool; so is a chainsaw.  Both can do a lot of damage.
>
>No doubt that the switch from CGI to ASP and PHP changed
>who could and who did make dynamic web pages.
>
>But at the core ASP and PHP are really just a way to
>save a gazillion "response write".

Yup.  That's exactly what I mean when I say that it "inverted
the model": it went from using content embedded in programs, to
program (fragment)s embedded in content.  You can teach a
designer HTML fairly easily, regardless of whether they have any
interest in programming or not.  It's not a big lift to get them
to embed `<?php ...?>` tags into that content to add a little
dynamic sauce.  Teaching them Java, Perl, or C?  That's a
different matter.

>Here is super simple example of DCL CGI:
>
>$ write sys$output "content-type: text/html"
>$ write sys$output ""
>$ write sys$output "<html>"
>$ write sys$output "<head>"
>$ write sys$output "<title>Show time</title>"
>$ write sys$output "</head>"
>$ write sys$output "<body>"
>$ write sys$output "<h1>Show time</h1>"
>$ write sys$output "<p>"
>$ write sys$output "Time is " + f$time() + "."
>$ write sys$output "</p>"
>$ write sys$output "</body>"
>$ write sys$output "</html>"
>$ exit

I guess Perl could use a "HERE" document for that:

#!/usr/bin/perl
use warnings;
use strict;
use POSIX qw(strftime);
my $now = uc strftime "%d-%b-%Y %T", localtime;
print <<"EOF";
<html>
<head>
<title>Show time</title>
</head>
<body>
<h1>Show time</h1>
<p>
Time is $now.
</p>
</body>
</html>
EOF

>(I chose DCL because with my Perl skills I would
>not bother the Perl gurus here with my way of writing
>Perl)

"There's more than one way to do it!"

>[snip]
>The interesting part is what happens under the hood. JSP
>pages are not interpreted - they are compiled. Or more
>precisely: they are triple compiled. The JSP compiler
>compiles from JSP to Java source, the Java compiler
>compiles from Java source to Java byte code and the
>JVM JIT compiles from Java byte code to native code.

It may be relevant to point out that PHP is basically a compiled
to a bespoke virtual machine (Zend) at this point; the old days
of a slow, simple interpreter are long gone.

Facebook came up; it was (in)?famously written in PHP
originally, but some may be familiar with the "Hack" language
they developed that introdcued gradual typing for it; they also
have a bespoke VM ("Hip Hop") that runs it.  I doubt they care
*too* much about what happens in the mainstream PHP world.

https://github.com/facebook/hhvm
https://research.facebook.com/publications/the-hiphop-virtual-machine/
https://engineering.fb.com/2014/03/20/developer-tools/hack-a-new-programming-language-for-hhvm/
https://hacklang.org

Regardless, PHP is not a good language, and there are better
alternatives for the application space.

	- Dan C.
Technical Details
Message-ID: <11bj1n9$kbg$1@reader2.panix.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
References: <11bcbi1$k068$1@dont-email.me> <nk1gv8F1eecU1@mid.individual.net> <11bgih8$f7a$1@reader2.panix.com> <11bivpt$305om$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
From: cross@spitfire.i.gajendra.net (Dan Cross)
Newsgroups: comp.os.vms
Subject: Re: Re: ‘This Is Not a Drill’: Critical PHP Vulnerabilities Are Setting the Internet on Fire
Date: Sat, 24 Oct 2026 19:42:33 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <11bj1n9$kbg$1@reader2.panix.com>
References: <11bcbi1$k068$1@dont-email.me> <nk1gv8F1eecU1@mid.individual.net> <11bgih8$f7a$1@reader2.panix.com> <11bivpt$305om$1@dont-email.me>
Injection-Date: Sat, 24 Oct 2026 19:42:33 -0000 (UTC)
Injection-Info: reader2.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80";
	logging-data="20848"; mail-complaints-to="abuse@panix.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: cross@spitfire.i.gajendra.net (Dan Cross)