Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support
It is currently Mon May 21, 2012 8:41 am


ATTENTION: All users passwords have been cleared.
Please use the "Forgot Password" feature to reset your password.


All times are UTC - 5 hours




Post new topic Reply to topic  [ 50 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: Wed Feb 13, 2008 8:39 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
I believe the megaman fix to be secure.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 14, 2008 12:00 am 
Offline
Cacti User

Joined: Sat May 14, 2005 8:00 pm
Posts: 54
Make that 5 people with the problem (except I am on Windows).


Top
 Profile  
 
 Post subject: Possible workaround without touching the code
PostPosted: Thu Feb 14, 2008 12:40 pm 
Offline

Joined: Thu Feb 14, 2008 11:54 am
Posts: 4
Hi,

I also observed this behavior. So, to make sure it runs, I just assured that alias path on the web-browser is the same as the cacti linux sub-folder.

Clarifying what I wrote above:

E.g.:
your alias on your browser: http://localhost/cacti/index.php
your cacti home folder: /home/cactiuser/cacti/

Cacti sub-folder: /cacti
Web-browser alias: /cacti

So cacti can find all files on both structures (alias and path).

:D


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 14, 2008 1:01 pm 
Offline

Joined: Tue Feb 12, 2008 1:07 pm
Posts: 5
It's a way around the bug, but doesn't solve it unfortunately. And you're also exposing yourself to potential future exploits by having a "standard" xxx/cacti form.

The FreeBSD port (and I assume Linux's "ports/rpm") install in a xxx/cacti folder and the modification of the Alias is to somewhat secure cacti from standard exploits that target xxx/cacti.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 18, 2008 8:02 am 
Offline

Joined: Thu Mar 16, 2006 4:00 am
Posts: 1
Hello!

I have the FreeBSD installation from ports:

I added some debug here:
Code:
                               echo "\nInvalid PHP_SELF Path \n";
                                echo $_SERVER["PHP_SELF"] ;
                                echo " - ";
                                echo $_SERVER["DOCUMENT_ROOT"];
                                echo " - ";
                                echo $_SERVER["SCRIPT_FILENAME"];
                               exit;


This show me:
Invalid PHP_SELF Path /cacti/index.php - /usr/local/www/apache22/data - /usr/local/share/cacti/index.php

As we can see, this installed not under DOCUMENT_ROOT, but cacti checked for this.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 22, 2008 10:17 am 
Offline

Joined: Fri Feb 09, 2007 1:53 pm
Posts: 38
Location: Tallahassee, Florida
I've got the same problem after upgrading using the Ubuntu Gutsy package, but I can't find global.php in /usr/share/cacti/site/include/

Any help?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 22, 2008 10:18 am 
Offline
Cacti Guru User
User avatar

Joined: Fri Sep 19, 2003 8:36 am
Posts: 2326
Location: Sophia-Antipolis, France
Hi

with Debian/Ubuntu, is it under /etc/cacti ?

_________________

HOWTOs :
Templates :


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 22, 2008 10:25 am 
Offline

Joined: Fri Feb 09, 2007 1:53 pm
Posts: 38
Location: Tallahassee, Florida
Nope, not there either.

I've done a $ locate global.php

and it doesn't show up . . .


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 23, 2008 6:38 am 
Offline

Joined: Sat Feb 23, 2008 6:35 am
Posts: 1
For Ubuntu Gutsy, the file you're looking for is '/usr/share/cacti/site/include/config.php'

The fix mentioned works.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 23, 2008 4:46 pm 
Offline

Joined: Fri Feb 09, 2007 1:53 pm
Posts: 38
Location: Tallahassee, Florida
Thank you so much. The fix is confirmed to work for me in the file mentioned above :)


Top
 Profile  
 
 Post subject: Same problem, same fix
PostPosted: Sun Feb 24, 2008 3:42 am 
Offline

Joined: Sun Feb 24, 2008 3:39 am
Posts: 1
For the record, same problem in Ubuntu Gutsy after upgrading the cacti package yesterday.

Fixed by applying Megaman's fix on /usr/share/cacti/site/include/config.php line 87.

Thanks.


Top
 Profile  
 
 Post subject: Same Issue Here!
PostPosted: Sun Feb 24, 2008 5:29 pm 
Offline

Joined: Tue Nov 06, 2007 12:14 pm
Posts: 26
Location: JHB
Wel ive got the exact same problem here....
Running on FreeBSD6.2.

megaman's fix worked for me.

_________________
http://www.thavinci.za.net
http://ddns.thavinci.za.net


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 24, 2008 5:36 pm 
Offline

Joined: Sun Jul 09, 2006 1:51 am
Posts: 42
Location: detroit'ish
config.php tweaks in ubuntu edgy didn't work. :(


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 25, 2008 6:49 am 
Offline

Joined: Mon Feb 25, 2008 6:45 am
Posts: 1
Test this solution:
https://bugs.launchpad.net/ubuntu/+sour ... bug/194687


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 25, 2008 11:41 pm 
Offline

Joined: Fri Feb 22, 2008 1:36 am
Posts: 3
I can confirm that upgrading cacti to 0.8.0.6h on Ubuntu Dapper 6.06 LTS breaks cacti but this fixes it.

edit /usr/share/cacti/site/include/config.php

Look at line 86

Replace this line

Code:
if (!((is_file($_SERVER["SCRIPT_FILENAME"])) && (substr_count($_SERVER["SCRIPT_FILENAME"], $_SERVER["PHP_SELF"])))) {


With this

Code:
if (!((is_file($_SERVER["SCRIPT_FILENAME"])))) {


I had to run through the install process after doing this. All my data was still there.

Hope this helps.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 50 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group