Fax Inbox Issue After Upgrade

Status
Not open for further replies.

John

Member
Jan 23, 2017
97
8
8
Hello,

If you are on any of the 4.4.X stable branch of the FusionPBX, could you please try the following code and see if you experience the same problem?

https://github.com/fusionpbx/fusionpbx/blob/4.4/app/fax/fax_files.php

The behaviour is this:

Go to YourDomain.com/app/fax/fax.php > Click on one of the extensions' inbox or sent links > There will be no fax in the inbox
If then you revert to your original code, the faxes appear again.

I reported the bug, but it seems that they don't have any stable (4.4.X) to replicate the problem on, so if you can replicate, do you have any idea what is wrong with the update?

Thanks for reading.
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,414
376
83
I have not had much time to look at this, but at a quick glance, I think there is a problem with setting the $fax_uuid variable in the fax_files.php code that you quote on github:
Code:
//get fax extension
    if (is_uuid($fax_uuid)) {
        //get the fax uuid
        $fax_uuid = $_GET["id"];
Here it looks like $fax_uuid is being tested to see if it is a UUID before it value is assigned from $_GET["id"].

The same code section for the file in 4.4.0 looks like this:
Code:
//get fax extension
    if (strlen($_GET['id']) > 0) {
        if (is_uuid($_GET["id"])) {
            $fax_uuid = $_GET["id"];
        }

And in my installation of 4.5.10, it looks like this:
Code:
//get fax extension
    if (is_uuid($_GET["id"])) {
        $fax_uuid = $_GET["id"];
 

John

Member
Jan 23, 2017
97
8
8
Thank you for looking into it. I realized the difference, bur don't know what they mean.

I haven't heard back from Fusion Team, but my understanding is that they don't have the resources to look at issues with 4.4.10 stable version. I was looking to see if we can find the solution on our own and give it to them or at least if others experience the same, I can have a stronger voice.

Does the new code cause the same issue with yours?
 
Last edited:

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,414
376
83
Does the new code cause the same issue with yours?
I'm sorry I don't have time to test this, but looking at the code, yes it probably would cause the same issue.

if others experience the same, I can have a stronger voice.
It is unlikely that anyone would be interested in fixing this old code, especially given the massive raft of software update work that has, and is being done, in the master branch to improve security and work towards the next stable release.

There has been so much work done (so many changes to the code) like making all the SQL queries parameterised and adding CSRF tokens to the edit forms, that it is not feasible to roll many fixes back into the older stable versions.

The current recommendation from the Fusion team is to install from the master branch because it is much more secure than any of the stable branches. We all hope that the next stable release is not too far away.
 

John

Member
Jan 23, 2017
97
8
8
Thanks for sharing your opinion and your time with me. I really appreciate it.

In my opinion though, if the master was stable, it would be called stable.

Why should anyone call something stable that the developer himself doesn't officially call it stable? I think this is as obvious as days are bright and nights are dark.

It would be nice not to break the stable until the new release is out. If an update is not tested for 4.4, just don't put it there. It's that simple.

When there is an update for 4.4 it responsibily mean that it is for 4.4 and it is tested. Can't just post an update for 4.4, and say "well, if it break it, that's too bad." Why not just keep it as it is?

I personally fell in love with FusionPBX because I see Mark as a great guardian of the project. Someone who never puts an update without testing it.

But the point of this post wasn't to discuss this matter. So let's stick to the subject:)

Simply, if anyone can come up with a solution to this, it would be great.
 

markjcrane

Active Member
Staff member
Jul 22, 2018
448
162
43
49
Its Official consider the Master Branch is the Stable Branch. Adrian suggestion is actually what I recommend. I'm the creator of FusionPBX and lead developer. There were many changes done to improve security. Master branch security is stronger than 4.4 we have back ported what we could but there were too many changes needed. Consider it a rolling release for now until resources improve enough to maintain maintain multiple branches. We also have to get Master branch to a point that we think it will be easier to maintain a separate release. If you don't like that and want a separate stable release. Then please consider helping us improve the project resources by becoming a paid member. Money is an inescapable need to help pay people to work on various things like bug fixes, quality assurance, security, stability and many other things that are required for project sustainability. FusionPBX sustaintability model that we did in the past didn't work that well and there was far more demand than resources. For this reason we started FusionPBX membership to provide benefits to you and it helps builds resources so we can do more in return. Our goal is a win win relationship. Please join us in our new Positive feedback loop.
 

John

Member
Jan 23, 2017
97
8
8
I am all positive about FusionPBX project. I am currently a paid member and proudly I was the first paid member. I am afraid to upgrade to Master for a few reasons:
  1. I don't know how to do that;
  2. Even if I figure it out, I don't know how to change back to the new release once it is out;
  3. Even if I learn that, I am afraid these many back and force will create some issues;
  4. If it creates some issues, I can no longer get hourly support to fix it, unless I upgrade to the $300/month package and commit to it for 12 months (this is my understanding), which is definitely impossible for me financially.
In short, I do not want to upgrade due to lack of knowledge. I am just an end user of Fusion. I am not a developer or programmer.

Going back to the subject, if anyone can fix this code, please kindly share your knowledge.
 

ad5ou

Active Member
Jun 12, 2018
884
196
43
If you are a paid member, there is documentation and videos for most of your questions about updating. Backup and restore is also well documented.

If you can’t upgrade your member level, I would get familiar with the backup and restore process to take away some of your fears. If you have a good backup and know how to restore it, you can easily launch a new server to test with and/or break the existing server and restore if/when something goes wrong.
 

John

Member
Jan 23, 2017
97
8
8
Thank you for your suggestion! Actually, you pointed out something that I was wondering about. I know how to restore and backup, so I have a question.

Does the the database of stable branch work on master branch?

What I mean is, if I clear the database of a master branch and replace it with a stable branch database, will it work? (ignoring the voicemail and other user files that needs to be moved over)


More precisely, can a Master branch restore from a stable branch backup?
 

ad5ou

Active Member
Jun 12, 2018
884
196
43
Not quite.
There are quite a few things that have changed in the database between branches so you can’t mix 4.4 files with 4.5 database nor can 4.5 files work with 4.4 database.

The normal scripts backup all Fusion files database structure and data. So whatever branch the backup was run on, that is what would be restored.

So if you backup your existing 4.4 install you can update the existing system to 4.5.x. If it doesn’t work out, you can restore the old 4.4

If you fire up a new install on 4.5 then restore the 4.4 data, your new server would be back on 4.4
 

John

Member
Jan 23, 2017
97
8
8
Thank you for your quick reply. Appreciate it. My understanding from your post it that there is not an easy way of doing a clean install, other than doing an upgrade.

I will wait until 4.6 is out and some professionals upgrade from 4.4 to 4.6. I think at that point there will be many bugs to get fixed and those pros have the ability to take care of them. Once the bugs are fixed, I will upgrade to 4.6. I think that is the safest way for a non-pro Fusion user:)
 

UCtech

Member
Jan 9, 2019
34
6
8
A workaround that seems to be good for my 4.4.10 install is to edit the fax_files.php and replace the //get fax extension section with the one from 4.5.10 Adrian showed above, again here for convenience (around line 49):
Code:
//get fax extension
    if (is_uuid($_GET["id"])) {
        $fax_uuid = $_GET["id"];

Haven't done extensive testing but so far so good.
 
  • Like
Reactions: Adrian Fretwell

markjcrane

Active Member
Staff member
Jul 22, 2018
448
162
43
49
I reviewed the code and this is definitely needed in the is_uuid($_GET["id"]). The problem has been fixed on 4.4.
The master branch is currently secure and more stable than 4.4.
 
  • Like
Reactions: Adrian Fretwell

John

Member
Jan 23, 2017
97
8
8
A workaround that seems to be good for my 4.4.10 install is to edit the fax_files.php and replace the //get fax extension section with the one from 4.5.10 Adrian showed above, again here for convenience (around line 49):
Code:
//get fax extension
    if (is_uuid($_GET["id"])) {
        $fax_uuid = $_GET["id"];

Haven't done extensive testing but so far so good.

Thanks for looking into it. That is what I am doing right now. I am using the old code, until the new release.
 
Status
Not open for further replies.