K
K
Konstantin Khairov2017-07-25 13:29:27
DLE
Konstantin Khairov, 2017-07-25 13:29:27

DLE 11.3 has a new password system. But it replaces them in the database so that the passwords do not work, what should I do?

Hello everyone, site on DLE 11.3 UTF-8. Previously, the site was on 10.3 Win-1251 made a backup from the old one using the DLE admin panel. And I installed them in a new one, like the encoding has changed and everything is displayed as it should, but since the new DLE has a new password system, when authorizing, the system will change the password to a new, more secure one, the problem is that it changes the password, which then does not work. That is, the password was, for example
, qwerty123 in double MD5, this password will be (0b04beb06f3e0bdc6f99e91070fb987a) and in the database it is with the user from after installing the backup from the old database, I wrote about this above. Accordingly, after authorization, the password will be different according to the new system, it becomes like this
$2y$10$6xyK05lFF7bVoHLie.5TtOgq3
The problem is that after that the password qwerty123 is no longer suitable and, accordingly, an error occurs that the password is incorrect. How to solve this problem? I think that the problem is due to the fact that the backup from WIn-1251 is set to UTF-8 DLE, but the rest of the data is displayed and you can see that everything is fine with them and the system has recoded them.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Esin, 2017-07-25
@Exomode

You need to make sure that the data coming from the authorization form is in the old Win-1251 encoding, then the passwords must match when checking. the same sets of bytes should be hashed that used to come on the old version of the engine from the form in the Win-1251 encoding. In addition, when checking, the hash encoding must also match the one in which the md5 () result will be. You can use the method mb_convert_encoding(). If you need to remove the BOM, you can do something like this after converting to encoding:

$bom = pack("H*", "EFBBBF");
$string = preg_replace("/^$bom/", '', $string);

I hope my notes will help you solve the problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question