Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-10-2012, 11:41 AM   PM User | #1
nani_nisha06
Regular Coder

 
Join Date: Oct 2012
Location: mother land --india
Posts: 159
Thanks: 37
Thanked 2 Times in 2 Posts
nani_nisha06 is an unknown quantity at this point
Login enable using IP check

HI friends,

I have successfully created a login script for my webpage but now i need some help from you guys on security.

1) I want to enable MD5 for my password.
2) I want a script which allows a person to login from specific, If he is using out of raange from the specific he should be rejected.

so please help me getting this done.....also suggest me if cookie & sesstion ID generation is good thing???


Regards,

Nani
nani_nisha06 is offline   Reply With Quote
Old 10-10-2012, 02:52 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,738
Thanks: 4
Thanked 2,464 Times in 2,433 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
  1. md5 is insecure. It has a high percentage of conflict. Use hash with sha256 at minimum instead.
  2. Look into writing a CIDR calculator for this. CIDR will let you handle ranges and subnets for ip addresses and respond accordingly.

As for cookies and sessions, sessions are fine for security so long as the sessionid isn't compromised. Cookies are useless for anything more than basic preference settings.
Fou-Lu is offline   Reply With Quote
Old 10-10-2012, 06:45 PM   PM User | #3
nani_nisha06
Regular Coder

 
Join Date: Oct 2012
Location: mother land --india
Posts: 159
Thanks: 37
Thanked 2 Times in 2 Posts
nani_nisha06 is an unknown quantity at this point
Quote:
Originally Posted by Fou-Lu View Post
  1. md5 is insecure. It has a high percentage of conflict. Use hash with sha256 at minimum instead.
  2. Look into writing a CIDR calculator for this. CIDR will let you handle ranges and subnets for ip addresses and respond accordingly.

As for cookies and sessions, sessions are fine for security so long as the sessionid isn't compromised. Cookies are useless for anything more than basic preference settings.
Hi Fou-LU,

I have another basic Idea is as this application will be run over in my own company I want to arrange a access to the user whos is specificaly available in the IP range specified in the DB....

so any suggestions around this ??

Regards,
Nani
nani_nisha06 is offline   Reply With Quote
Old 10-10-2012, 07:02 PM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,738
Thanks: 4
Thanked 2,464 Times in 2,433 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
If I understand your question properly, that is what CIDR could be used for.
You give a CIDR an IP and a subnetmask or CIDR netmask/mask bits, then you ask it if a provided IP is considered valid within that block. This works perfectly for office domains.

I believe CIDR is directly implemented into Apache as well, so you can also use allow/deny overrides and CIDR notation.
Fou-Lu is offline   Reply With Quote
Old 10-10-2012, 07:09 PM   PM User | #5
nani_nisha06
Regular Coder

 
Join Date: Oct 2012
Location: mother land --india
Posts: 159
Thanks: 37
Thanked 2 Times in 2 Posts
nani_nisha06 is an unknown quantity at this point
Quote:
Originally Posted by Fou-Lu View Post
If I understand your question properly, that is what CIDR could be used for.
You give a CIDR an IP and a subnetmask or CIDR netmask/mask bits, then you ask it if a provided IP is considered valid within that block. This works perfectly for office domains.

I believe CIDR is directly implemented into Apache as well, so you can also use allow/deny overrides and CIDR notation.
Sure, will work on post my updates here....
nani_nisha06 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:00 AM.


Advertisement
Log in to turn off these ads.