diff --git a/plugin.rb b/plugin.rb index eca6e3d..be422c2 100644 --- a/plugin.rb +++ b/plugin.rb @@ -103,6 +103,7 @@ after_initialize do def self.check_all(password, crypted_pass) AlternativePassword::check_vbulletin(password, crypted_pass) || + AlternativePassword::check_ipb(password, crypted_pass) || AlternativePassword::check_md5(password, crypted_pass) || AlternativePassword::check_wordpress(password, crypted_pass) || AlternativePassword::check_bcrypt(password, crypted_pass) || @@ -126,6 +127,11 @@ after_initialize do crypted_pass == Digest::MD5.hexdigest(password) end + def self.check_ipb(password, crypted_pass) + salt, hash = crypted_pass.split(':', 2) + !salt.nil? && hash == Digest::MD5.hexdigest(Digest::MD5.hexdigest(salt) + Digest::MD5.hexdigest(password)) + end + def self.check_wordpress(password, crypted_pass) hasher = WordpressHash.new(8) hasher.check(password, crypted_pass)