Closed (fixed)
Project:
Protected Node
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2014 at 16:02 UTC
Updated:
24 Feb 2015 at 14:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
izus commentedi don't think there is a one shot and general way to do this.
http://stackoverflow.com/questions/6971316/want-to-convert-a-website-pas...
Comment #2
damienmckennaMaybe include support for both, check sha-256 first and if it fails check sha-1?
This patch needs further work, but it's a step towards it.
Comment #3
damienmckennaComment #4
grimreaperHello,
Thanks for the patch. there was just a variable which name has changed.
But Warning: the automated tests failed and point that in the database schema, the field that store the password hashed has a length of 40 (which is good for sha1 but not for sha256).
I wonder if the use of db_change_field is a good thing because of I understand the function, it will delete the current passwords.
So, I think we need to use a second field in the database for the sha256 passwords.
Comment #5
izus commentedhi,
for the length warning part we will need to change it directly in hook_schema so that it's ok for both types.
we then need a hook_update_n to update the schema for sites that already installed the module and here db_change_field may be helpful :)
++
Comment #6
grimreaperHi,
Ok thanks for the response. I test db_change_field, the existing passwords ware not erased.
Comment #9
izus commentedOki
it seems good enough to be merged
Thank you all for your contributions
++