Serialize Xenforo hash before put it into table.

- Fix #417
This commit is contained in:
DNx5
2016-01-09 06:13:47 +07:00
parent 642a40724b
commit b380893847
2 changed files with 13 additions and 5 deletions
@@ -4,6 +4,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class XFBCRYPT extends BCRYPT {
public static final String SCHEME_CLASS = "XenForo_Authentication_Core12";
private static final Pattern HASH_PATTERN = Pattern.compile("\"hash\";s.*\"(.*)?\"");
@Override
@@ -19,4 +20,8 @@ public class XFBCRYPT extends BCRYPT {
}
return "*"; // what?
}
public static String serializeHash(String hash) {
return "a:1:{s:4:\"hash\";s:" + hash.length() + ":\""+hash+"\";}";
}
}