Routercongfigs plugin broken?

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

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

Routercongfigs plugin broken?

Post by GlueGuy »

I just installed the routerconfigs plugin, and it appears to be seriously broken.

When I ran it, it appeared to do "nothing" when I attempted to add and an account. I checked the cacti log file, and it was getting errors attempting to put records into one of the routerconfigs tables.

I checked the cacti DB, and none of the tables exist.

I also checked the plugin, and I couldn't find anything that actually created any of the SQL tables (which would come from running 'routerconfigs.sql').

Further, checking the index.php file, it only has one line:

Code: Select all

<?php
That's it. So I think the plugin as it is on the cacti web site is broken.

Jimmy, where are you?
---------
The Glue Guy
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Re: Routercongfigs plugin broken?

Post by GlueGuy »

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
MrRat
Cacti User
Posts: 136
Joined: Thu Jan 07, 2010 10:33 am

Re: Routercongfigs plugin broken?

Post by MrRat »

cacti 0.8.8g rev 7768 fixes this
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Re: Routercongfigs plugin broken?

Post by GlueGuy »

MrRat wrote:cacti 0.8.8g rev 7768 fixes this
and that will be when?
---------
The Glue Guy
MrRat
Cacti User
Posts: 136
Joined: Thu Jan 07, 2010 10:33 am

Re: Routercongfigs plugin broken?

Post by MrRat »

I do not know when the official release will be but now if you want it. http://svn.cacti.net/viewvc/cacti/tags/0.8.8g/ or

Code: Select all

svn co svn://svn.cacti.net/cacti/cacti/tags/0.8.8g
User avatar
GlueGuy
Cacti User
Posts: 255
Joined: Fri Nov 04, 2005 3:37 pm
Location: Ca US
Contact:

Re: Routercongfigs plugin broken?

Post by GlueGuy »

Too bad we couldn't just patch 0.8.8f. It seems (from my non-informed perspective) that a patch would be relatively simple. Then again, I am not all that familiar with all the tentacles...
---------
The Glue Guy
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests