Posts by artur9010

    When I try to search something I got an error

    https://bombsite.be/search-result/1002/?highlight=test


    Ok, so I created a new account named "test" with "test1234" password. I copied hash from database and tried to check password


    Code
    1. \wcf\util\PasswordUtil::checkPassword("test", "test1234", "$2a$08$0lctPZhL82nDwdvK5/7ynOuZOchAmQyWJC/4Dj9t7OXNjoBpteMi6")

    But it still throws that same error.


    • Error Type:

      wcf\system\exception\SystemException

    • Error Message:

      Unable to determine password encryption

    • File:

      */lib/util/PasswordUtil.class.php (125)


    • Stack Trace:
      • #0 */password-check.php (18):
      • wcf\util\PasswordUtil::checkPassword('test', 'test1234', '$2a$08$0lctPZhL82nDwdvK5/7ynOuZOchAmQyWJC/4Dj9t7OXNjoBpteMi6')


    detectEncryption still returns `unknown`


    WoltLab 3.1.9 pl 2


    Ok, I'm stupid.


    PHP
    1. <?php
    2. require_once('global.php');
    3. use wcf\system\user\authentication\UserAuthenticationFactory;
    4. $user = UserAuthenticationFactory::getInstance()->getUserAuthentication()->loginManually($_GET['user'], $_GET['password']);

    That works.

    I need to check that user password is correct.


    I written some code, but it throws that error: Unable to determine password encryption



    Third argument for checkPassword is hashed password from database,

    detectEncryption from PasswordUtil returns unknown, idk why.


    Sorry, I don;t have permissions to post in support category :c