🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.vms
Article #247

Re: More PHP vulnerabilities

#247
From: Dan Cross
Date: Wed, 25 Nov 2026 00:25
86 lines
4680 bytes
In article <11e4ubq$36gi8$1@dont-email.me>,
Simon Clubley  <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
>On 2026-11-23, Dan Cross <cross@spitfire.i.gajendra.net> wrote:
>> In article <11e24vp$265v0$1@dont-email.me>,
>> Simon Clubley  <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
>>>
>>>As Dan has pointed out, yes. However, I absolutely hate that style of
>>>coding (and the use of short circuiting in general) - it is way too fragile.
>>>
>>>It depends on the compiler behaving as expected and it depends on someone
>>>not making some edit change that happens to have the unexpected side-effect
>>>of disabling any working short circuiting.
>>
>> I'm going to have to push back on this.  Short-circuiting of
>> boolean operators, in C, is a defined part _of the language_ and
>> is specified by an international standard.  If a compiler is
>> miscompiling them, then that's a compiler bug or a language that
>> is not C.
>>
>>>Seriously. Please consider not using short circuiting and instead writing
>>>your code so it works regardless of whether your compiler short-circuits
>>>or not. (Or it suddenly decides to stop short-circuiting one day).
>>
>> This begs the question: what other parts of the language should
>> we not use?
>
>In C, I would like to see people stop using library functions that have
>no way of doing bounded buffer copies (strcpy() and friends for example).

Ok, but those are _library functions_.  Short-circuiting of
operators is a defined part _of the language_, not of a library.

The short circuiting behavior is mandated; it does not depend on
a compiler's whims or optimization levels.  If it is not there,
the compiler is broken: period.

>I would say that is a common sense thing to ask for, but after some recent
>CVEs it would appear common sense is not all that common.
>
>Here's one I just found with a search:
>
>https://www.tenable.com/cve/CVE-2026-80671
>
>In C++, I would like to see people stop using unchecked bounds access
>(ie: []) to access containers and start using checked access (ie: at())
>always instead. It's insane that [] wasn't the checked option so you got
>safer code by default.
>
>BTW, I know some environments now allow [] to become checked. It would
>be nice to see that left enabled in production code, especially in
>today's environment.

I wasn't asking about C++, which is not the same language as C,
but this is the same fundamental thing.

>Of course, what I would _really_ like is to see safer languages used in
>our critical infrastructure. Said languages should also use readable
>syntax to make it easier to learn (Ada is far better than Rust here
>for example).

I agree that programmers should default to safe languages.
Bluntly, very few people are qualified to program in systems
languages.

But I disagree that Ada is more readable than Rust, and I know
other good judges who agree with me on that.  Ada's syntax is
overly verbose for no good reason; it gets in your way, which is
an impediment to understanding.

Further, I find its semantics wanting; we discussed the `'Valid`
attribute here a while back, and I showed that it was both
weaker than and less general than the `Result<T, E>` and
`Option<T>` monads expressible with Rust's ADTs (and those of
other languages).

>Another minor annoyance of mine. When you write code, you are modelling
>a real-world problem. I hate that people sometimes run to using signed
>integers by default when most of the time, unsigned integers are a more
>accurate match. That's something that's more language-neutral however,
>except when dealing with languages that have unexpected side effects with
>mixed signed/unsigned expressions. :-)

This is agree with.

	- Dan C.
Technical Details
Message-ID: <11e59st$k1s$1@reader2.panix.com>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
References: <11dnpep$2kvk6$2@dont-email.me> <11e24vp$265v0$1@dont-email.me> <11e2m8f$i1e$1@reader2.panix.com> <11e4ubq$36gi8$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
From: cross@spitfire.i.gajendra.net (Dan Cross)
Newsgroups: comp.os.vms
Subject: Re: More PHP vulnerabilities
Date: Wed, 25 Nov 2026 00:25:01 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <11e59st$k1s$1@reader2.panix.com>
References: <11dnpep$2kvk6$2@dont-email.me> <11e24vp$265v0$1@dont-email.me> <11e2m8f$i1e$1@reader2.panix.com> <11e4ubq$36gi8$1@dont-email.me>
Injection-Date: Wed, 25 Nov 2026 00:25:01 -0000 (UTC)
Injection-Info: reader2.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80";
	logging-data="20540"; mail-complaints-to="abuse@panix.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: cross@spitfire.i.gajendra.net (Dan Cross)