Article View: comp.os.vms
Article #239Re: More PHP vulnerabilities
From: Scott Lurndal
Date: Mon, 23 Nov 2026 20:18
Date: Mon, 23 Nov 2026 20:18
60 lines
3324 bytes
3324 bytes
Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> writes:
>On 2026-11-20, Arne Vajhøj <arne@vajhoej.dk> wrote:
>> On 11/20/2026 3:10 PM, Simon Clubley wrote:
>>> On 2026-11-20, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>> On 11/19/2026 4:25 PM, Arne Vajhøj wrote:
>>>>> echo file_get_contents("http://arnepc5.vajhoej.dk/reveal.aspx") . "\n";
>>>>> //echo file_get_contents("https://arnepc5.vajhoej.dk/reveal.aspx") . "\n";
>>>>> echo file_get_contents("https://arnepc5.vajhoej.dk/reveal.aspx", false,
>>>>> stream_context_create($sslctxopts)) . "\n";
>>>>> echo file_get_contents("HTTPS://arnepc5.vajhoej.dk/reveal.aspx") . "\n";
>>>>> echo file_get_contents("httpS://arnepc5.vajhoej.dk/reveal.aspx") . "\n";
>>>>
>>>>> $ php another.php
>>>>> Port = 80
>>>>> Port = 443
>>>>> Port = 80
>>>>> Port = 80
>>>> And for the curious - before fix:
>>>>
>>>> use_ssl = resource->scheme && (ZSTR_LEN(resource->scheme) > 4) &&
>>>> ZSTR_VAL(resource->scheme)[4] == 's';
>>>
>>> I really hope that line was always compiled by a short-circuiting
>>> compiler and that line always successfully triggered short-circuiting...
>>>
>>> Don't be surprised if everyone is now looking for similar constructs
>>> that rely on short-circuiting to be safe.
>> Doesn't C require/mandate short circuiting in cases like this??
>>
>
>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.
Must disagree. Consider the classic (ptr && *ptr) paradigm.
>
>It depends on the compiler behaving as expected
No, it depends on the programmer being familiar with
the C (and C++) language grammar.
The chance that any C compiler (outside of a first year college
course) would not properly handle those operators correctly
is exactly zero.
>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).
Seriously, use the conditonal logical operators frequently and
often. They'll work correctly unto the heat death of the universe.
>
>Oh, and before you all start mocking me, please read this:
>
>https://www.redhat.com/en/blog/security-flaws-caused-compiler-optimizations
That has nothing to do with the conditional-and/or operators.
Technical Details
Message-ID:
<dc1NS.79823$EAo4.20738@fx22.iad>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer05.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx22.iad.POSTED!not-for-mailReferences:
<11dnpep$2kvk6$2@dont-email.me> <11dpfjf$35umc$1@dont-email.me> <11dq9gg$3ghpm$1@dont-email.me> <11dqa7g$3guqc$1@dont-email.me> <11e24vp$265v0$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer05.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx22.iad.POSTED!not-for-mail X-newsreader: xrn 9.03-beta-14-64bit Sender: scott@dragon.sl.home (Scott Lurndal) From: scott@slp53.sl.home (Scott Lurndal) Reply-To: slp53@pacbell.net Subject: Re: More PHP vulnerabilities Newsgroups: comp.os.vms References: <11dnpep$2kvk6$2@dont-email.me> <11dpfjf$35umc$1@dont-email.me> <11dq9gg$3ghpm$1@dont-email.me> <11dqa7g$3guqc$1@dont-email.me> <11e24vp$265v0$1@dont-email.me> Lines: 60 Message-ID: <dc1NS.79823$EAo4.20738@fx22.iad> X-Complaints-To: abuse@usenetserver.com NNTP-Posting-Date: Mon, 23 Nov 2026 20:18:17 UTC Organization: UsenetServer - www.usenetserver.com Date: Mon, 23 Nov 2026 20:18:17 GMT X-Received-Bytes: 3112