Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When a user has been deleted, checking permissions can cause errors #5184

Closed
bmfmancini opened this issue Jan 11, 2023 · 6 comments
Closed
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Milestone

Comments

@bmfmancini
Copy link
Member

Not sure if this is new but I don't see any bug reports

2023/01/11 11:07:02 - CMDPHP ERROR: A DB Row Failed!, Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND type = 1) OR h.id IN (SELECT item_id FROM user_auth_group_perms WHERE group_' at line 1
2023/01/11 11:07:02 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/intropage/poller_intropage.php[107]:intropage_gather_stats(), /plugins/intropage/poller_intropage.php[222]:maint(), /plugins/intropage/panellib/misc.php[173]:intropage_get_allowed_devices(), /plugins/intropage/include/functions.php[42]:get_allowed_devices(), /lib/auth.php[2685]:get_policy_where(), /lib/auth.php[1922]:CactiErrorHandler())
2023/01/11 11:07:02 - ERROR PHP NOTICE: Undefined index: id in file: /var/www/html/cacti/lib/auth.php on line: 1922
2023/01/11 11:07:02 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/intropage/poller_intropage.php[107]:intropage_gather_stats(), /plugins/intropage/poller_intropage.php[222]:maint(), /plugins/intropage/panellib/misc.php[173]:intropage_get_allowed_devices(), /plugins/intropage/include/functions.php[42]:get_allowed_devices(), /lib/auth.php[2685]:get_policy_where(), /lib/auth.php[1919]:CactiErrorHandler())
2023/01/11 11:07:02 - ERROR PHP NOTICE: Undefined index: policy_graph_templates in file: /var/www/html/cacti/lib/auth.php on line: 1919
2023/01/11 11:07:02 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/intropage/poller_intropage.php[107]:intropage_gather_stats(), /plugins/intropage/poller_intropage.php[222]:maint(), /plugins/intropage/panellib/misc.php[173]:intropage_get_allowed_devices(), /plugins/intropage/include/functions.php[42]:get_allowed_devices(), /lib/auth.php[2685]:get_policy_where(), /lib/auth.php[1914]:CactiErrorHandler())
2023/01/11 11:07:02 - ERROR PHP NOTICE: Undefined index: id in file: /var/www/html/cacti/lib/auth.php on line: 1914
2023/01/11 11:07:02 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/intropage/poller_intropage.php[107]:intropage_gather_stats(), /plugins/intropage/poller_intropage.php[222]:maint(), /plugins/intropage/panellib/misc.php[173]:intropage_get_allowed_devices(), /plugins/intropage/include/functions.php[42]:get_allowed_devices(), /lib/auth.php[2685]:get_policy_where(), /lib/auth.php[1911]:CactiErrorHandler())
2023/01/11 11:07:02 - ERROR PHP NOTICE: Undefined index: policy_hosts in file: /var/www/html/cacti/lib/auth.php on line: 1911
@xmacan
Copy link
Member

xmacan commented Jan 22, 2023

It isn't Intropage issue. It is in cacti auth functions. Maybe @TheWitness will know more.

@TheWitness
Copy link
Member

Oh my gosh. This looks like an old bug. not even sure it's still relevant. Let me grab the latest intropage develop and take a peak.

@xmacan
Copy link
Member

xmacan commented Jan 22, 2023

I think that it isn't intropage issue. Intropage has function intropage_get_allowed_devices which call get_allowed_devices from auth.php. We don't know Cacti version which @bmfmancini used. ...

@TheWitness
Copy link
Member

Just added this. I'm move this bug to the Cacti side shortly, if I can. Otherwise, we can refer to the bug and close. Basically, it's a deleted user.

image

@bmfmancini
Copy link
Member Author

This is on 1.2.22

@TheWitness TheWitness transferred this issue from Cacti/plugin_intropage Jan 22, 2023
@TheWitness TheWitness changed the title Intropage 4.0.2 - SQL Errors Cacti permission checks generate SQL errors is the user has been deleted Jan 22, 2023
@TheWitness TheWitness added this to the v1.2.24 milestone Jan 22, 2023
TheWitness added a commit that referenced this issue Jan 22, 2023
Cacti permission checks generate SQL errors is the user has been deleted
@TheWitness TheWitness added bug Undesired behaviour resolved A fixed issue confirmed Bug is confirm by dev team labels Jan 22, 2023
TheWitness added a commit that referenced this issue Jan 22, 2023
TheWitness added a commit that referenced this issue Jan 22, 2023
TheWitness added a commit that referenced this issue Jan 22, 2023
@TheWitness TheWitness added porting required Requires porting to develop and removed porting required Requires porting to develop labels Jan 22, 2023
@TheWitness
Copy link
Member

Porting to develop complete.

@netniV netniV changed the title Cacti permission checks generate SQL errors is the user has been deleted When a user has been deleted, checking permissions can cause errors Feb 15, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants