mirror of
https://github.com/moparisthebest/discourse-migratepassword
synced 2024-11-14 04:55:01 -05:00
SMF actually concatenates the lowercase username and password...
This commit is contained in:
parent
d42a2a32fd
commit
55bec5e5ea
@ -42,13 +42,13 @@ after_initialize do
|
||||
|
||||
def self.check_smf(password, user, hash)
|
||||
sha1 = Digest::SHA1.new
|
||||
sha1.update user + password
|
||||
sha1.update user.downcase + password
|
||||
hash == sha1.hexdigest
|
||||
end
|
||||
|
||||
#def self.check_smf_scrypt(password, user, hash)
|
||||
# sha1 = Digest::SHA1.new
|
||||
# sha1.update user + password
|
||||
# sha1.update user.downcase + password
|
||||
# begin
|
||||
# SCrypt::Password.new(hash) == sha1.hexdigest
|
||||
# rescue
|
||||
|
Loading…
Reference in New Issue
Block a user