Nectar Report ''New Report'' Sent Successfully - NOT

General discussion about Plugins for Cacti

Moderators: Moderators, Developers

Post Reply
Author
Message
MrGRTuk
Posts: 3
Joined: Fri Jul 24, 2015 6:02 am

Nectar Report ''New Report'' Sent Successfully - NOT

#1 Post by MrGRTuk » Fri Jul 24, 2015 6:12 am

Hello,
Sorry for this being my first post.
Been using Cacti for close to 3 years now but just decided to install the Settings and Nectar plugin with the aim of sending email reports daily.

The Test email is working but sending the report via the "Send Report" link in Nectar is not even though it shows "Nectar Report ''New Report'' Sent Successfully".

I've tried different settings and different email destinations and always end up with the same result; an apparently successfully sent report that doesn't arrive anywhere.

I've took a tcpdump and all looks successful. Let me know what kind of information you'd like to see to help me.

Cacti version: 0.8.8f
Ubuntu 12.04 LTS
Report.jpg
Report.jpg (287.48 KiB) Viewed 3334 times
Thanks

MrGRTuk
Posts: 3
Joined: Fri Jul 24, 2015 6:02 am

Re: Nectar Report ''New Report'' Sent Successfully - NOT

#2 Post by MrGRTuk » Fri Jul 24, 2015 10:26 am

Looks like the problem is that Cacti is adding the simple quotes in the Nectar Tab.

MrGRTuk
Posts: 3
Joined: Fri Jul 24, 2015 6:02 am

Re: Nectar Report ''New Report'' Sent Successfully - NOT

#3 Post by MrGRTuk » Mon Jul 27, 2015 7:37 am

The issue is indeed cacti adding the single quotes every time the Nectar report is saved. This occurs on Cacti 0.8.8f but not in 0.8.8c

djamp42
Posts: 5
Joined: Fri Apr 24, 2015 11:28 am

Re: Nectar Report ''New Report'' Sent Successfully - NOT

#4 Post by djamp42 » Fri Sep 18, 2015 10:32 am

Does anyone have a fix for this, Cacti is adding single quotes around my fields too.

Thanks,

mgeb2003
Posts: 1
Joined: Mon Oct 05, 2015 8:56 am

Re: Nectar Report ''New Report'' Sent Successfully - NOT

#5 Post by mgeb2003 » Mon Oct 05, 2015 9:07 am

Hello,
I have the same problem, is there a solution to fix it or a way around the problem.

Thank you

cacti 0.8.8f
nectar0.35a

ubertinador
Posts: 1
Joined: Tue Oct 06, 2015 2:37 am

Re: Nectar Report ''New Report'' Sent Successfully - NOT

#6 Post by ubertinador » Tue Oct 06, 2015 2:44 am

Hi,

In the last version of Cacti, they changed 2 functions :
- sql_sanitize
- sql_save

I guess it did not work out for the plugin nectar...

All you have to do, is to change the file *cacti folder*\lib\database.php by the one in a previous version (0.8.8c).
For me, everything works like a charm.

Someone, point it out : http://forums.cacti.net/viewtopic.php?f=21&t=54909

User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Re: Nectar Report ''New Report'' Sent Successfully - NOT

#7 Post by GlueGuy » Wed Nov 18, 2015 9:30 pm

I think the problem is the way the components (CentOS, php, and mysql) have changed in later revisions.

On my system (CentOS 6.7, php 5.3.3, and mysql 5.1.73), it turns out that the $_POST automatically fixes the outer quotes. So I just removed sql_sanitize() everywhere it occurred. Unfortunately, that broke embedded single quotes (and other characters) that were within a text field (e.g. ' became \' ).

What I discovered turned out to be relatively simple. I just replaced "sql_sanitize()" with "stripslashes()" wherever it occurred. For example, the following line

Code: Select all

$save['name']                   = sql_sanitize(form_input_validate($_POST['name'], 'name', '', false, 3));
became

Code: Select all

$save['name']                   = stripslashes(form_input_validate($_POST['name'], 'name', '', false, 3));
stripslashes is a built-in php function.
---------
The Glue Guy

markcasera
Posts: 2
Joined: Thu Mar 03, 2016 10:26 pm

Re: Nectar Report ''New Report'' Sent Successfully - NOT

#8 Post by markcasera » Thu Mar 03, 2016 10:29 pm

I tried your solution man. my whole cacti went down. im getting error 500. lol

aftershocks
Cacti User
Posts: 117
Joined: Fri Aug 22, 2014 2:11 pm

Re: Nectar Report ''New Report'' Sent Successfully - NOT

#9 Post by aftershocks » Tue Nov 07, 2017 5:54 pm

bump... i'm having this issue too.. stupid quotes! :P

anyone with a solution?

Post Reply