Closed (duplicate)
Project:
Drupal core
Version:
6.x-dev
Component:
user system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Sep 2006 at 06:08 UTC
Updated:
19 Sep 2008 at 11:09 UTC
Drupal should have a salting variable set in its configuration that it prepends or appends to passwords prior to computing the MD5 hash for the database. This would increase security by rendering pre-computed dictionary attacks useless without the salt, which could/should be stored as a server variable outside the database so that even if someone compromises the RDBMS then the passwords are safe.
I have a great deal of experience writing modules and classes for Drupal for work in-house and would be willing to tackle this if I have some agreement in principle that this is a good idea.
Thank you.
Comments
Comment #1
erdemkose commentedI aggree that salting is important. But I have a question. How can we replace old passwords?
I think a helper module must be written. It will replace user password hash with a salted hash while signing in and keep track of which password hashes are salted. And when all the password hashes are salted, it must create a watchdog entry to be removed.
Any better solution?
*Since this is a feature request I have moved it to cvs. New features will be included in cvs version only.
Comment #2
shultzc commentedI agree, that's probably the safest way to do it.
Comment #3
Egon Bianchet commentedComment #4
selmanj commentedDuplicate of http://drupal.org/node/29706
Comment #5
gravisrs commentedI think I've found best solution.
For user table add field called salt which is null by default. This field will be generated automatically as a random bytes during user register and password recovery, and will be concatenated with password before creating & saving hash to database.
This will preserve old accounts (null added to password won't change hash) and will implement anti-rainbow security.