OpenCATS icon indicating copy to clipboard operation
OpenCATS copied to clipboard

Remove references to get_magic_quotes_* functions.

Open pribeiro42 opened this issue 5 years ago • 8 comments

Since PHP 5.4.0, released on 2012-01-03 (according to https://www.php.net/releases/#5.4.0) the get_magic_quotes_* functions allways return false. These functions were deprecated on PHP 7.4.0 (released on 2019-11-28, check https://www.php.net/releases/#7.4.0) and, as such, they emit a E_DEPRECATED warning every time they're used. So, accordingly, I've created this PR to remove the use of these functions throughout the code. It also removes the checks from the InstallationTests.php and the stripslashes_deep function from the index.php files.

If this PR is wrongly created in any way, please let me know so I can improve it.

pribeiro42 avatar Aug 07 '20 13:08 pribeiro42

Hi Pedro, thank you for the PR, I'll defer to @shantadam for his far far greater expertise to review this..

RussH avatar Aug 13 '20 11:08 RussH

Forgive me @pribeiro42, but there are critical concerns prior to in-taking changes.

@pribeiro42 feel free to chip-in your thoughts on my following question and concerns to @RussH.

@RussH, I have the following business decision questions and concerns:

  • Are we simply keeping the doors open to any minor versions of PHP 7?
  • Also, just because a technology releases updates in recent months, doesn't mean that we have to in-take immature updates.
  • It seems that there is no set in-stone version of PHP to draw the line at for the upcoming OpenCATS release.
  • Where and when do we draw the line for the next release that many consumers are awaiting for?

shantadam avatar Aug 13 '20 18:08 shantadam

Codacy Here is an overview of what got changed by this pull request:


Issues
======
+ Solved 1
           

Complexity decreasing per file
==============================
+ lib/InstallationTests.php  -1
         

See the complete overview on Codacy

RussH avatar Aug 14 '20 09:08 RussH

@shantadam @pribeiro42 I'm thinking, as you are running the current release in anger on php 7.2 we can safely release that as production, pin the maximum PHP version supported as 7.2... and then accept patches into develop (such as this) to pick-up changes needed to operate on PHP 7.x

RussH avatar Aug 14 '20 10:08 RussH

@RussH, indeed, it makes sense to have happy loyal clients.

Now, on the flip side, v8 of PHP is in Beta mode the current release is at v7.4.9. My thoughts are, as such:

  • We’ve come far to make the leap to v7.
  • Lets draw the line at v7.4.9.
  • There has been many security patches applied by PHP.
  • It will make a lot of audience happy.
  • Test everything.
  • Release OpenCATS 9.5.
  • Subsequent changes we’ll patch.

Regards, Shant Adam,

On Aug 14, 2020, at 6:11 AM, RussH [email protected] wrote:



@shantadamhttps://github.com/shantadam @pribeiro42https://github.com/pribeiro42 I'm thinking, as you are running the current release in anger on php 7.2 we can safely release that as production, pin the maximum PHP version supported as 7.2... and then accept patches into develop (such as this) to pick-up changes needed to operate on PHP 7.x

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/opencats/OpenCATS/pull/480#issuecomment-674001633, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA53AVPHSUXG65OGJ3HUKATSAUEVNANCNFSM4PXUVU4A.

shantadam avatar Aug 14 '20 11:08 shantadam

Hi @RussH @shantadam, thank you for your input.

No matter what PHP version range you define for openCATS, it would make sense to remove or refactor code to avoid the use of deprecated features. Feel free to re-target this patch to a post-release branch...

pribeiro42 avatar Aug 18 '20 16:08 pribeiro42

Hold the thought @pribeiro42. Let me ask @RussH. @RussH did we confirm if the latest release for php v.7.2 support is in good functional state?

shantadam avatar Jul 16 '21 23:07 shantadam

Hi Shant, yes the PHP 7.2 version tests out well. I think the development branch should now be targeting PHP8.x fixes?

I suspect a migration from mcrypt (for passwords) to something openssl-based will be fairly involved though.. needs a migration utility?


Russ

On Sat, 17 Jul 2021 at 00:05, Shant Adam @.***> wrote:

Hold the thought @pribeiro42 https://github.com/pribeiro42. Let me ask @RussH https://github.com/RussH. @RussH https://github.com/RussH did we confirm if the latest release for php v.7.2 support is in good functional state?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/opencats/OpenCATS/pull/480#issuecomment-881763198, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACFA7BARINLD2W5LBOWUPDTYC3M7ANCNFSM4PXUVU4A .

RussH avatar Aug 16 '21 14:08 RussH