The CPG-Nuke security requirements
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexAnnouncements
Author Message
DJ Maze
Developer


Joined: Apr 19, 2004
Posts: 5668
Location: http://tinyurl.com/5z8dmv

PostPost subject: The CPG-Nuke security requirements
Posted: Mon Apr 19, 2004 7:24 pm
Reply with quote

When you have made any cool content for CPG-Nuke or PHP-Nuke for use in CPG-Nuke we need you to understand the following "security requirements" or we won't accept your add-on.
Although external Posting protection is blocking a lot, we still want you to develop secure code.
  1. Database
    1. The queries may not contain global variables or must be checked on their value for intvar(), stringlength and specialchars.
    2. If a variable may not contain HTML or PHP use our Fix_Quotes($var, 1) function to get rid of them.
    3. Only sql function calls using $db-> are accepted. The old sql functions like sql_num_rows won't be accepted and are a security breach.
  2. User & Admin
    1. Although the old function still exists to be compatible with old modules, we won't accept files that use the cookiedecode($user) function or decode the $user themselves. Use the global $userinfo instead which already contains all data of the visitor, member or not.
    2. Never decode $admin but check if the "admin" realy is a admin thru is_admin(). is_admin() returns the admin 'aid' (name) if the 'visitor' is administrator. As of 8.3 and up you can check if the admin is allowed to administer a module by using can_admin('module_name').
  3. File Access
    1. Protect your files against outside calls like /yourfile.php or a other script that runs a include/require from another host.
    2. Only calls to cms files may be made using require_once() or require() because include() and include_once() don't report absence of the file properly


DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Fedora 12 / 2.2.15 / 5.1.47 / 5.3.3 / CVS


Last edited by DJ Maze on Sun Oct 03, 2004 2:58 am; edited 6 times in total
Back to top
View user's profile Visit poster's website Yahoo Messenger
nomaed
Newbie


Joined: Apr 20, 2004
Posts: 10

PostPost subject: Re: The CPG-Nuke security requirements
Posted: Wed Apr 21, 2004 11:14 am
Reply with quote

What about making it work with register_globals=off, and without exporting the $_COOKIE, $_POST, $_GET and other superglobals to variables?

nomaed's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
winXP
Back to top
View user's profile Visit poster's website
DJ Maze
Developer


Joined: Apr 19, 2004
Posts: 5668
Location: http://tinyurl.com/5z8dmv

PostPost subject: Re: The CPG-Nuke security requirements
Posted: Wed Apr 21, 2004 12:48 pm
Reply with quote

That's a massive work which will break our new GoogleTap,
but we are heading that way more and more already.

I know GoogleTap is silly and a webpage is already shown correctly by search engines, but people think googletap works to index their pages better Confused


DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Fedora 12 / 2.2.15 / 5.1.47 / 5.3.3 / CVS
Back to top
View user's profile Visit poster's website Yahoo Messenger
TRANCEBUDHA
Newbie


Joined: Apr 21, 2004
Posts: 40

PostPost subject: Re: The CPG-Nuke security requirements
Posted: Thu Apr 22, 2004 6:47 pm
Reply with quote

Quote:

I know GoogleTap is silly and a webpage is already shown correctly by search engines, but people think googletap works to index their pages better

So i dont need to activate the google tap? heres my situation my host (prodigy.mx) didnt install for me the mod_rewrite for apache nor the isapi_rewrite for iis so i was thinking of chaning my host for correct index of my site, but i read this and is a different thing now.

can i be peacefull for my indexing issue?

thanks in advance

_________________
FEEL FREE TO VISIT ME AT

WWW.DISHLATINO.NET

TRANCEBUDHA's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
XP/IIS/MYSQL/PHP 4
Back to top
View user's profile Visit poster's website
DJ Maze
Developer


Joined: Apr 19, 2004
Posts: 5668
Location: http://tinyurl.com/5z8dmv

PostPost subject: Re: The CPG-Nuke security requirements
Posted: Thu Apr 22, 2004 7:12 pm
Reply with quote

www.google.com/search?...tnG=Search
_________________
There are two paths, the short one and the long one.
When you choose the short path you will notice it takes longer then the long path.
So READ the FAQ and Wiki first Razz

DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Fedora 12 / 2.2.15 / 5.1.47 / 5.3.3 / CVS
Back to top
View user's profile Visit poster's website Yahoo Messenger
anor
Newbie


Joined: Apr 22, 2004
Posts: 4

PostPost subject: Re: The CPG-Nuke security requirements
Posted: Thu Apr 22, 2004 7:31 pm
Reply with quote

Erm the correct way too see how many pages google has spiderd and accepted is by doing the following:

www.google.com/search?...pgnuke.com

For those who want too see there own site, do the following in google.

Type in the search field the following:
allinurl:yourdomain.com site:www.yourdomain.com (Offcourse change yourdomain.com too your domain Smile ).

Btw Djmaze why isn't that when Googletap, gt-nextgen, spiders index it better? I think it does, but probally only because the file names are shorter. (Instead of modules.php?name=Forums or index.php?name=Forums you will probally have forums.html)


anor's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/1.3.29/4.0.18-standard/4.3.4
Back to top
View user's profile Visit poster's website
TRANCEBUDHA
Newbie


Joined: Apr 21, 2004
Posts: 40

PostPost subject: Re: The CPG-Nuke security requirements
Posted: Thu Apr 22, 2004 7:48 pm
Reply with quote

thanks that help alot

extreme newbie

_________________
FEEL FREE TO VISIT ME AT

WWW.DISHLATINO.NET

TRANCEBUDHA's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
XP/IIS/MYSQL/PHP 4
Back to top
View user's profile Visit poster's website
Phoenix
Site Admin


Joined: Apr 19, 2004
Posts: 8729
Location: Netizen

PostPost subject: Re: The CPG-Nuke security requirements
Posted: Fri Apr 23, 2004 1:33 am
Reply with quote

I'm not sure that it's the length that bothers search engines (DJ already demonstrated this on previous forum), so much as the use of '?'.

The other area where it definitely helps is when you use GT to make multi level sub-directories seem to be root directory files - this means you have a better chance of getting 'deep indexed' a lot sooner.

GT is not just for 'phpnuke' sites - I also use it on non-nuke sites and it does make a big difference.

The other aspect is that it helps when you cross-reference sites - it's much easier to type site2.com/file.html as a link on site1.com than something that is 200 characters long e.g. when you want to submit your links to other sites. Cool

Having just done this, I'm not sure if this discussion should be attached here Question

_________________
DonationsPro for DragonflyCMS, SMF, MyBB, vBulletin

Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
DJ Maze
Developer


Joined: Apr 19, 2004
Posts: 5668
Location: http://tinyurl.com/5z8dmv

PostPost subject: Re: The CPG-Nuke security requirements
Posted: Fri Apr 23, 2004 1:41 am
Reply with quote

Ok i've opened a new forum in our second forum for googletap feature in cpgnuke cpgnuke.com/index.php?...um&f=9

DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Fedora 12 / 2.2.15 / 5.1.47 / 5.3.3 / CVS
Back to top
View user's profile Visit poster's website Yahoo Messenger
Dashe
Newbie


Joined: May 11, 2004
Posts: 8
Location: Ireland

PostPost subject: Re: The CPG-Nuke security requirements
Posted: Thu May 20, 2004 11:02 am
Reply with quote

Hi I am thinking of releasing some scripts for CPG-Nuke and was wondering if you could just clear up 3 things for me.
DJMaze wrote:
Before any try to decode $admin check if "admin" realy is a admin thru is_admin($user), and then decode the data to a other variable not $admin itself.
I didnt quite understand this, is is supposed to be is_admin($user) and not is_admin($admin), if this is correct could you explain why?
DJMaze wrote:
Beshure echoed variables are set internal and don't use global variables that could be set thru a POST or GET command to echo for example: $nukeuser[1]
I didnt understand that would you be able to explain possible with and example of what to do and what not to do.
DJMaze wrote:
Protect your files against outside calls like /yourfile.php or a other script that runs a include from another host.
Again I didnt understand what you wanted done here would you be able to explain this as well, again with an example.

Thanks very much, just want to make sure that I am coding it the way you want it done. Smile


Dashe's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Why is this not allowed to be blank?
Back to top
View user's profile Visit poster's website
DJ Maze
Developer


Joined: Apr 19, 2004
Posts: 5668
Location: http://tinyurl.com/5z8dmv

PostPost subject: Re: The CPG-Nuke security requirements
Posted: Thu May 20, 2004 11:36 am
Reply with quote

Yeah it should be is_admin($admin) i typed it wrong Confused

For example you have a $_POST[] and people use
PHP:
echo $_POST[];
before you do that run a proper check of what the $_POST should contain.
For example: htmlspecialchar($_POST[]) or intval($_POST[]) this will prevent people inserting malicious code into the database or output.

About XSS:
say you have a variable $file and then you run include($file) be shure $file can't be set thru $_GET or $_POST or if it must then check the variable
ereg('\.\.', $file)
ereg(':', $file)

_________________
There are two paths, the short one and the long one.
When you choose the short path you will notice it takes longer then the long path.
So READ the FAQ and Wiki first Razz

DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Fedora 12 / 2.2.15 / 5.1.47 / 5.3.3 / CVS
Back to top
View user's profile Visit poster's website Yahoo Messenger
Dashe
Newbie


Joined: May 11, 2004
Posts: 8
Location: Ireland

PostPost subject: Re: The CPG-Nuke security requirements
Posted: Thu May 20, 2004 12:37 pm
Reply with quote

Thanks

Dashe's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Why is this not allowed to be blank?
Back to top
View user's profile Visit poster's website
grebo
Nice poster


Joined: Apr 21, 2004
Posts: 116
Location: Vancouver, Canada

PostPost subject: Re: The CPG-Nuke security requirements
Posted: Thu May 20, 2004 2:52 pm
Reply with quote

Dashe, If you are rewriting your scripts JAG_Online and JAG_virus, let me know and I can remove my download of the versions I released for cpg.
_________________
Mommy What's a Grebo???

grebo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
?
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexAnnouncements All times are GMT
Page 1 of 1


Jump to:  
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 vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Dedicated Server & Bandwidth Sponsored by DedicatedNOW
User Info [x]

Welcome Anonymous

Nickname
Password
(Register)

Last CVS commits [x]

Languages [x]

Community [x]

Support for DragonflyCMS in a other languages:

Deutsch
Español

X-links [x]
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

Preview theme [x]
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.


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
This page generated in 1.6512 seconds with 19 DB Queries in 0.2433 seconds
Memory Usage: 3.02 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy