Thread: CMS Security
View Single Post
  #2 (permalink)  
Old Sep 25th, 2007, 16:10
alexgeek's Avatar
alexgeek alexgeek is offline
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,772
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: CMS Security

Quote:
Originally Posted by ChrisTheSoul View Post
Hi peeps.

I've just built my first custom CMS using PHP and MySQL.

I've put all the admin pages in the directory mydomain.com/cms

I'm new to web security issues, so could I get people's opinions on the best way of securing these pages:

1. From being edited by people naughty enough to want to do so?

2. From Google and other search engines indexing the pages to assist those mentioned in 1.?

Thanks in advance for any suggestions.

Chris
Use sessions,
on login, the user get's two session like so:
$_SESSION['user'] = $username (from $_POST and will be queried to log in)
$_SESSION['seskey'] = $md5(rand(1000, 9999));

and the mysql table with have at least three columns (username, password, session)

when the user logs in the random session will be put in their session and mysql table.

hope you follow
Reply With Quote