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

Automation Graph Rule Failing to modify/save #6090

Open
botts99 opened this issue Feb 5, 2025 · 11 comments
Open

Automation Graph Rule Failing to modify/save #6090

botts99 opened this issue Feb 5, 2025 · 11 comments
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team
Milestone

Comments

@botts99
Copy link

botts99 commented Feb 5, 2025

Describe the bug

When adding a Automation Graph Rule, any option under the Graph Creation Criteria except for a blank fiueld name value does not complete.

My previous rules are intact but cant be modifed

To Reproduce

Steps to reproduce the behavior:

  1. Go to automation

  2. Click on graph rules

  3. create a new rule and a device selection criteria with SNMP Interface Statistics, adding a graph creation criteria with IfOperstats. If you leave the value blank the vlaue is saved.

  4. Jquery thows a console error and the save does not complete.

Expected behavior

Expected value to save.

Desktop (please complete the following information)

  • OS: Windows 10

  • Browser Chrome

  • Version Latest Release

Also verified a recent upgrade from cact 1.2.26 to 1.2.29 and the same issues is present

@botts99 botts99 added bug Undesired behaviour unverified Some days we don't have a clue labels Feb 5, 2025
@bmfmancini
Copy link
Member

Can you paste the console error here please

@botts99
Copy link
Author

botts99 commented Feb 5, 2025

Image

@botts99
Copy link
Author

botts99 commented Feb 5, 2025

It also does look like the log file throws an error after a while as well.

2025-02-05 11:03:34 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler()) -- 2025-02-05 11:03:34 - ERROR PHP ERROR: Uncaught Error: Call to undefined function raise_messsage() in /var/www/html/automation_graph_rules.php:134 Stack trace: #0 /var/www/html/automation_graph_rules.php(40): save() #1 {main} thrown in file: /var/www/html/automation_graph_rules.php on line: 134 2025-02-05 11:03:12 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler()) 2025-02-05 11:03:12 - ERROR PHP ERROR: Uncaught Error: Call to undefined function raise_messsage() in /var/www/html/automation_graph_rules.php:134 Stack trace: #0 /var/www/html/automation_graph_rules.php(40): save() #1 {main} thrown in file: /var/www/html/automation_graph_rules.php on line: 134

@TheWitness
Copy link
Member

Confirmed. If you can edit those two files and change raise_messsage() to raise_message() that'll get you back up and running.

@TheWitness TheWitness added confirmed Bug is confirm by dev team and removed unverified Some days we don't have a clue labels Feb 6, 2025
@TheWitness TheWitness added this to the v1.2.30 milestone Feb 6, 2025
@botts99
Copy link
Author

botts99 commented Feb 6, 2025

Verified both files are changed. Verified my host template is in the database, I get the prompt of an injection.

2025-02-06 17:02:06 - SECURITY ERROR: An attempt was made to perform a SQL Injection in Graph Automation from client address 'My IP'

29 | e6b1f751d2523b699821cdcd4f9b63f0 | Juniper EX | unassigned

So somthing is still not matching

Image

@TheWitness
Copy link
Member

Thanks for reporting this back. What actions were you taking when the error occurred? Can you share a screen shot of that?

@botts99
Copy link
Author

botts99 commented Feb 7, 2025

I am trying to add a Rule item for the HT.name Juniper EX which will graph if the interface is Up. If you try to edit the Pre installed Traffic 64bit Server Graph rule, you get the same error trying to edit and save the up rule already present as well.

Image

@TheWitness
Copy link
Member

Okay, reproduced now.

@botts99
Copy link
Author

botts99 commented Feb 7, 2025

Okay, reproduced now.

Great, If you need any more info let me know! As always thanks for making Cacti Great for everyone involved!

TheWitness added a commit that referenced this issue Feb 7, 2025
This should resolve the issue reported in 6090 more completely.
@TheWitness
Copy link
Member

Okay, so I've create a new pull request in the patch-6090 branch. I've tested your case and it's is not properly covered. Feel free to also test. Hopefully, we can get it merged proper today.

#6095

@botts99
Copy link
Author

botts99 commented Feb 7, 2025

Okay, so I've create a new pull request in the patch-6090 branch. I've tested your case and it's is not properly covered. Feel free to also test. Hopefully, we can get it merged proper today.

#6095

Confirmed the all issues resolved and i was able to add the graph rule!

Thanks so much!

TheWitness added a commit that referenced this issue Feb 7, 2025
* Fix: #6090 - Incorrect raise_message() function name in automation

* QA: Issues with initial fix to #6090

This should resolve the issue reported in 6090 more completely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team
Projects
None yet
Development

No branches or pull requests

3 participants