Fix string split in upgrade check so that it works
This commit is contained in:
parent
37b5a52fdb
commit
08fae75c0c
1 changed files with 1 additions and 1 deletions
|
|
@ -392,7 +392,7 @@ namespace TShockAPI.DB
|
||||||
/// <param name="password">string password - the raw user password (unhashed) to upgrade</param>
|
/// <param name="password">string password - the raw user password (unhashed) to upgrade</param>
|
||||||
internal void upgradePasswordWorkFactor(string password) {
|
internal void upgradePasswordWorkFactor(string password) {
|
||||||
// If the destination work factor is not greater, we won't upgrade it or re-hash it
|
// If the destination work factor is not greater, we won't upgrade it or re-hash it
|
||||||
int currentWorkFactor = Convert.ToInt32(this.Password.Split(new Char[] {'$'})[1]);
|
int currentWorkFactor = Convert.ToInt32((this.Password.Split('$')[2]));
|
||||||
|
|
||||||
if (currentWorkFactor < TShock.Config.WorkFactor) {
|
if (currentWorkFactor < TShock.Config.WorkFactor) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue