games647 / FlexibleLogin

A Sponge minecraft server plugin for second factor authentication
https://forums.spongepowered.org/t/8872
MIT License
87 stars 23 forks source link

Bug in 0.17.4 (a newest relelase): hashAlgo=totp ignored. #159

Open HeroBrine1st opened 5 years ago

HeroBrine1st commented 5 years ago

Code with bug located at com.github.games647.flexiblelogin.commands.RegisterCommand:68

if ("totp".equals(settings.getGeneral().getHashAlgo())) {

String "totp" is compared to HashingAlgoritm. Such a comparison always return false.

I tried to fix this with: if(HashingAlgorithm.TOTP == settings.getGeneral().getHashAlgo()) This fix should work, but i can't compilate plugin correctly (I using Intellij IDEA), so I here.

P.s. If it worked out, I'd send a Pull Request. Wasn't lucky

jaredallard commented 4 years ago

@games647 I'm running into this as well, any idea if we could get a fix? Thanks!

Happy to throw some money behind this if that helps!