Rogue file

Open to all! Ask other shopowners for help.
Post Reply
Yahalimu
Member
Posts: 29
Joined: Mon Oct 26, 2020 1:27 pm
Phoenix Version: v1.0.5.0
Has thanked: 4 times
Been thanked: 1 time

Rogue file

Post by Yahalimu »

Hi,
I have v1.0.5.0
I'm going through the code to fix deprecated functions so I can move to PHP 8.2 ultimately.
In my pub folder (normally used for product data-sheets for download) I have a compatibility.php file which is full of deprecated functions. (Different from the /includes/compatibility.php file, which is considerably smaller.)
I've searched through the code and nothing ever calls /pub/compatibility.php.
Is it safe to remove it? Is it a remnant of the install process?
Last edited by Yahalimu on Sat Mar 04, 2023 12:11 am, edited 2 times in total.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Yahalimu
Member
Posts: 29
Joined: Mon Oct 26, 2020 1:27 pm
Phoenix Version: v1.0.5.0
Has thanked: 4 times
Been thanked: 1 time

Re: Rogue file

Post by Yahalimu »

Notes at the top of the file:
////
// Recursively handle magic_quotes_gpc turned off.
// This is due to the possibility of have an array in
// $HTTP_xxx_VARS
// Ie, products attributes

Similar to incudes/compatibilty.php but is quite a bit larger.
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Rogue file

Post by ecartz »

I am absolutely positive that Phoenix never had a pub/compatibility.php -- it's a bad place to put a code file, as it is the directory available for downloads. I find it unlikely that previous versions put it there for the same reason.

I see three basic possibilities:

1. Someone stuck it there by mistake.
2. There was a hack attempt.
3. An add-on stuck it there.

Only with the third is there any risk of removing it. I'd back it up and remove it. Check for things that are broken.
Yahalimu
Member
Posts: 29
Joined: Mon Oct 26, 2020 1:27 pm
Phoenix Version: v1.0.5.0
Has thanked: 4 times
Been thanked: 1 time

Re: Rogue file

Post by Yahalimu »

Thanks. I checked github and it wasn't there so I deleted it.
All seems good.
I think it was probably reason 1.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply