Pushing an update in a few min to fix this issue. This is an application breaking issue, if you have a new line in your clear text word it will be hashed WITH the new line causing incorrect hashes to be generated. Once the fix is pushed this will not be an issue any longer.
To fix current installs:
Back up your DB
go to the whitechapel-ng dir
rails c
copy and paste the code below (note: you might have to hit enter again at the end to have it fireoff the last codeblock. This step is KEY if skipped your database will be empty)
restart your application and let delay jobs rehash the DB
pass = Passwords.all
@passfix = []
pass.each do |p|
@passfix << p.cleartext.gsub("\n", "") + ":" + p.source
end
Pwhashes.destroy_all
Passwords.destroy_all
@passfix.each do |passwd|
passwd = passwd.split(":")
Passwords.add_cleartext_one(passwd[0], passwd[1])
end
Pushing an update in a few min to fix this issue. This is an application breaking issue, if you have a new line in your clear text word it will be hashed WITH the new line causing incorrect hashes to be generated. Once the fix is pushed this will not be an issue any longer.
To fix current installs:
rails c