From 55bec5e5ea7db74e771b7086e781be2331bb3320 Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Fri, 12 Aug 2016 02:18:10 -0400 Subject: [PATCH] SMF actually concatenates the lowercase username and password... --- plugin.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.rb b/plugin.rb index 09f696b..80af140 100644 --- a/plugin.rb +++ b/plugin.rb @@ -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