cyberjunk / meridian59-dotnet

New 3D client and tools for Meridian 59
GNU General Public License v3.0
34 stars 36 forks source link

Switch updater from MD5 to SHA256, hashing/finishing transition pause, translations. #271

Closed skittles1 closed 6 years ago

skittles1 commented 6 years ago

Added a pause in-between hashing and downloading in a way that would keep ticking the UI to prevent unresponsiveness, set to 40 ticks by default.

Earlier I mentioned the issue Judere was having with FIPS (see here for info). Two solutions are possible for this:

  1. Catch the exception and tell the user to disable FIPS (and hopefully convince them it is safe to do so)
  2. Switch to a hashing algo which won't trigger this exception

I prefer the second solution since it's way easier for users and means less support needed from us. I've included both solutions in this PR for now, also useful if you wanted to test the FIPS issue locally.

EDIT: Switched it to SHA256 but left in an exception handler for rare cases where Win XP might be outdated/bugged and not be able to create the SHA256 hasher. Rare, but better we catch it than crash.

Removed the 'client updated' messagebox and instead put that info in the status label and keep the form open ~1.5sec.

Compressed the splash image for the picturebox, halves exe size.

cyberjunk commented 6 years ago

Earlier I mentioned the issue Judere was having with FIPS (see here for info).

Interesting, I wasn't aware of this FIPS thing so far. Is it a Windows XP only thing or does it also affect Windows 7 and above?

Because OgreClient uses the MD5 class to hash the password for login and if I understand you correctly this could cause a crash for some players on login?

skittles1 commented 6 years ago

Judere specifically turned it on, from what I've read it will almost always be off though we've had a few players with unexplained crashes on startup (can't recall any recently). This was also on his XP machine so he hasn't tried Ogre there. I think we should probably switch the password hashing too, but that's a bit more involved than switching the file hashing algorithm.