server icon indicating copy to clipboard operation
server copied to clipboard

Can't make first time login

Open Yuri2b opened this issue 8 years ago • 13 comments

Hashtopolis 0.6.0 Windows 7 x64 Bitnami WAMP Stack 7.1.20

Just want try hashtopolis on my Windows machine. Can't make fist time login to hashtopolis just after successfully installation. Admin user was created on last step of installation, corresponding row with loginname, email and password hash appeared in db.users, but I can't login with these credentials, server tell me "Wrong username/password/OTP!" What am i doing wrong? except of using Windows of course)

Yuri2b avatar Jul 31 '18 12:07 Yuri2b

Are you sure that you try with the same password like the one you created on the installation step?

To make sure that there is not a problem with some requirements, please check the apache2 error log if there is any warning/error during login.

If you want to reset the password to try again, there is a script at src/install/updates/reset.php which can be used to reset a users password without using email. Just edit the script and fill in the appropriate values (new password and userId) and then call it with php -f src/install/updates/reset.php password.

s3inlc avatar Jul 31 '18 12:07 s3inlc

Of course, i tried couple of times with recreated databases, and result was the same. Script helped me, thank you. I tried to figure out myself where is the problem, but unsuccessfully.. Is it depends on OS or maybe MySQL version?

Yuri2b avatar Aug 01 '18 13:08 Yuri2b

Hmm strange. Have you checked the apache error log? Because the only reason I could imagine is that there is a dependency missing and then there should be an error in the log.

s3inlc avatar Aug 01 '18 13:08 s3inlc

There is no errors during installation and first trying to log in error.log

Yuri2b avatar Aug 01 '18 14:08 Yuri2b

Can you check in your php.ini of WAMP if the openssl extension is loaded. Because the only thing I can imagine to get problems with the login from the dependencies is openssl. The MySQL version definitely should not affect the login, unless you have configured some strange collation.

I just checked with XAMPP on Windows 10 and the 0.6.0 release and there was no problem with login after installation.

s3inlc avatar Aug 01 '18 15:08 s3inlc

I think I found the solution for your problem. Basically, WAMP is not a good solution for running Hashtopolis, it does some aggressive caching of PHP files. This causes that in case of the installation this is the reason that it takes some time until it doesn't forward you to the installation anymore (after the completion). Also it causes, that when your account is created, it still uses the pepper placeholders to hash instead of the ones generated during the installation and therefore your login does not work anymore.

There are two solutions:

  • Don't use WAMP
  • Disable the caching feature in the php.ini: opcache.enable=0

s3inlc avatar Aug 02 '18 07:08 s3inlc

I am having similar login problems. Sys is ubuntu 16.04, nginx, php7 Doesn't matter if opcache is enabled or not. As long as I do the login with the old 0.5.0 codebase I can carry over the session to the new version.

dropdeadfu avatar Aug 02 '18 20:08 dropdeadfu

@dropdeadfu in your case there is also nothing in the error log of nginx?

s3inlc avatar Aug 02 '18 21:08 s3inlc

@s3inlc nope, I also tried to debug Login.class.php with no success. Something is going wrong with line 114: else if (!Encryption::passwordVerify($password, $user->getPasswordSalt(), $user->getPasswordHash())) { But I couldn't trace any of your changes to this.

dropdeadfu avatar Aug 02 '18 21:08 dropdeadfu

There were not really changes to the login/hashing procedure, so it's really surprising that suddenly these problems appear. Did you check that the pepper values were not overwritten in the Encryption.class.php?

s3inlc avatar Aug 02 '18 21:08 s3inlc

if the pepper would be bad, wouldn't I be unable to login with the old version as well? debugging it, getting closer...

dropdeadfu avatar Aug 02 '18 21:08 dropdeadfu

oh yea, you were right, the pepper was fucked..still PEPPER123_

dropdeadfu avatar Aug 02 '18 21:08 dropdeadfu

I assume the both issues are solved, therefore I close this issue. Please reopen if this is not the case.

s3inlc avatar Aug 16 '18 09:08 s3inlc