I found out that this is happening because there is no user with id 0 in my database. It seems to be a bug in the table, as it's simply enumerated from 0-n, instead of using the actual user's id. The same user having the link with id=0 above actually has id=7 in the database and in the link under Resources -> Customers, where the link works fine:
https://froxlor/admin_customers.php?page=customers&action=su&sort=customerName&id=7
Same for the mismatched customer links. The ids are just ascending numbers no matter the name of the customer (as it seems).
OS/Version:
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
** Kernel: Linux host 5.15.0-92-generic '#'102-Ubuntu SMP Wed Jan 10 09:33:48 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
To Reproduce
(The steps in the description should be sufficient, but I imagine this would also work on a fresh install of froxlor, as far as I understand the issue now)
Steps to reproduce the behavior:
create a customer aone
create another customer bone
delete customer aone.
go to: Traffic -> Customers
Click on 'bone' in the traffic table
You should see an empty page (the id of the customer isn't found in the database anymore)
Expected behavior
Impersonate the clicked on customer, not another, nor show an empty page.
Logfiles
n/a
Additional context
Server was upgraded from ubuntu 18.04 to 20.04 to 22.04. Froxlor was uninstalled on 20.04 as it blocked the upgrade and reinstalled afterwards on 22.04.
I couldn't test the issue on a new install yet.
Describe the bug If I go to Traffic -> Customers and select the first customer by the link on their name I get an empty page. URL: https://froxlor/admin_customers.php?page=customers&action=su&id=0
But if I select any other customer I jump into the customer panel dashboard of another customer. (the "impersonate" feature, but for the wrong customer - not the one I clicked on.) eg: https://froxlor/admin_customers.php?page=customers&action=su&id=1
I found out that this is happening because there is no user with id 0 in my database. It seems to be a bug in the table, as it's simply enumerated from 0-n, instead of using the actual user's id. The same user having the link with id=0 above actually has id=7 in the database and in the link under Resources -> Customers, where the link works fine: https://froxlor/admin_customers.php?page=customers&action=su&sort=customerName&id=7 Same for the mismatched customer links. The ids are just ascending numbers no matter the name of the customer (as it seems).
If I manually edit the link to: https://froxlor/admin_customers.php?page=customers&action=su&id=7 the link works as expected. So this seems to be a bug in the table, right?
Version: System information
To Reproduce (The steps in the description should be sufficient, but I imagine this would also work on a fresh install of froxlor, as far as I understand the issue now) Steps to reproduce the behavior:
Expected behavior Impersonate the clicked on customer, not another, nor show an empty page.
Logfiles n/a
Additional context Server was upgraded from ubuntu 18.04 to 20.04 to 22.04. Froxlor was uninstalled on 20.04 as it blocked the upgrade and reinstalled afterwards on 22.04. I couldn't test the issue on a new install yet.