S
S
Sergey Topolov2017-07-30 15:15:44
ASCII
Sergey Topolov, 2017-07-30 15:15:44

How to correctly add special characters during authorization?

I'm trying to normally add the ability to log in with a password consisting of special characters using a regular expression. At first it was like a login. Added "..._-" with other characters. But here's the problem - some are not supported. The point is this. Inside the application, I create a new user with special characters. He is recording. There is in the base. I'm leaving. I'm trying to log in under the created one, but it won't let me. Trims the request from an unsupported character (in this case, it's just # for now). And it gives an error of the backend.

PASSWORD: [email protected]%-_^*#

At the bottom it says UNABLE TO DECODE VALUE. what to do to support these characters? Can replace unsupported characters with equivalents in another encoding (such as cut # and paste )? or how...

LINK to PICTURE

c11ee72e23c143c4bcb09f10bb5a4109.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2017-07-30
@topus009

1. Pass parameters using the POST method.
2. It is not necessary to store the obtained values ​​in the database. If logins with special characters are allowed, hash them and store these hashes in the database. If these are passwords, then all the more you should not store them in the database in clear text, they must be hashed.
3. Get authorization data, immediately hash it and compare it with what is in the database. If there is a match, then the authorization was successful.

Similar questions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question