Home Private Messages Search
CPG Dragonfly™ CMS stopsoftwarepatents.eu petition banner
Toggle Content
 
Forums ⇒ CMS (All) ⇒ Security :: Archives ⇒ Quick opinion from security guru's on this module coding :: Archived


Quick opinion from security guru's on this module coding :: Archived
Post any security related questions in here.
Please send discovered reports to security @ cpgnuke.com
Do Not post links to exploits or hacker sites - your post will be edited/deleted.
If you think you've been hacked, FIRST go through your server logs.

Post new topic    Revive this topic    Printer Friendly Page     Forum Index ⇒  Security

Topic Archived View previous topic :: View next topic  
Author Message
staybright
Supporter
Supporter

Offline Offline
Joined: Apr 20, 2004
Posts: 91

PostPosted: Thu Sep 16, 2004 9:11 am
Post subject: Quick opinion from security guru's on this module coding

Hey there,

Wasn't sure were to put this so i figured here might work Smile

I found this index file a while back when I was using phpnuke which allowed me to add an html page I created as a module in the main menu. I wanted to make sure I did not open a security hole in my site by using it and since I am not familiar with php enough I was hope one of our security specialists could let me know Smile

Thanks

Code::
<?php 

if (!eregi("modules.php", $PHP_SELF)) { 
die ("You can't access this file directly..."); 
} 

require_once("mainfile.php"); 
$module_name = basename(dirname(__FILE__)); 

/* You can change this: */ 
/* $index = 0; (right side off) */ 
$index = 1; 

include("header.php"); 

OpenTable(); 
include("myfile.html"); /* This is where you include HTML file */ 
CloseTable(); 

include("footer.php"); 

?>


staybright's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux, Apache version 1.3.31 (Unix), PHP version 4.3.8, MySQL version 4.0.18-standard, Dragonfly 9.03
Back to top
View user's profile Visit poster's website
Trevor
Developer
Developer

Offline Offline
Joined: Apr 19, 2004
Posts: 2170
Location: New York
PostPosted: Thu Sep 16, 2004 11:34 am
Post subject: Re: Quick opinion from security guru

PHP:
<?php

if (!defined('CPG_NUKE')) { die('You do not have permission to access this file'); }

/* You can change this: */
/* $index = 0; (right side off) */
$index = 1;

require(
'header.php');

OpenTable();
include(
'myfile.html'); /* This is where you include HTML file */
CloseTable();

require(
'footer.php');

?>

Just to give you a general idea of how to keep your modules and other addons secure, check out our FAQ


Trevor's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 1.3.34 / 4.1.18 / 4.4.2 / CVS
Back to top
View user's profile Photo Gallery
staybright
Supporter
Supporter

Offline Offline
Joined: Apr 20, 2004
Posts: 91

PostPosted: Thu Sep 16, 2004 2:55 pm
Post subject: Re: Quick opinion from security guru's on this module coding

Thanks Trevor, I appreciate the help.


staybright's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux, Apache version 1.3.31 (Unix), PHP version 4.3.8, MySQL version 4.0.18-standard, Dragonfly 9.03
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic    Revive this topic    Printer Friendly Page    Forum Index ⇒  Security
Page 1 of 1
All times are GMT

Archive Revive
Username:
This is an archived topic - your reply will not be appended here.
Instead, a new topic will be generated in the active forum.
The new topic will provide a reference link to this archived topic.
 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

read more...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy