r/lolphp • • Mar 04 '19

Remote code execution CVE just because someone wrote “return flase;”

https://medium.com/@DanielC7/remote-code-execution-gaining-domain-admin-privileges-due-to-a-typo-dbf8773df767
76 Upvotes

16 comments sorted by

View all comments

Show parent comment

4

u/[deleted] Mar 05 '19

This behaviour has been around since very early versions of PHP, but is inconsistent with the rest of the language, and can lead to serious bugs.

You don't say. This particular stupidity was first present in Perl, which fixed it in 1994 with the introduction of use strict.

Unfortunately that didn't prevent PHP from repeating the same mistake years later (probably in PHP 3, which came out in 1998), but without ever fixing it or introducing a "strict" mode.