✅ – _mercury – 05-25 May 9
what is wrong with that regex ?
65 Replies
always i get the error
although the password should be good
using mantine/form pkg
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
!val.match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,50}$/)
yes edited it and i works ... hope no underlying quirks
why not check the regex of password
to save a request to the server ?Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
for non-malicious user
what is the problem ?
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
for simplicity
but i will improve it
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
for me
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
i am wrong so
i will improve it
u r right
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
i did it 8-50 chars
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
why ?
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
what if somebody send 10k chars
of password ?
it will consume the server
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
my server would be consumed
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
to hash this long string
it will take long time
to hash 10 k text
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
argon2
ok good to know
but still not convinced
Sorry
why not giving stupid user the passeord should be like that ( upper -lower - ... etc ) ?
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
befofre sending invalid req
will remove it
also it is 250 varchar in postgres .. ithink enough ? right ?
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
will make it text for safety
instead of varchar
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
i just save invalid req to the server
this is the actual reqson
and to give a hint
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
so how the user know how the password should be ?
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
what if somebody think that
sara12345
is goodUnknown User•8mo ago
Message Not Public
Sign In & Join Server To View
but that will send a request
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
and the server validation will refuse
it is unsecure passsword and it will be rejected
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
i will add special chars
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
but how the user know that the server require Upper -lower- special char - digit ?
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
mmm
Ok
still do not understand why giving the user a hint
there is no cost for that on the frontend
saving an invalid req
why this is pointless
not all uses are aware of constraints
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
yes i am speaking about the constraints
i am not doing it to make password secure
I just prevent a req that the server for sure will refuse
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
i own it
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
Oh
why ?
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
somebody could add password like
aaaaaaaaaa
i see gmail and others do not accept thatUnknown User•8mo ago
Message Not Public
Sign In & Join Server To View
even it is a user fault
Aaaaaaaaaaa1$
i told you i will accept the special chars
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
first time to listen to something like that tbh --with respect
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
Solution
i will add my barriers to strengths the pass a bit
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
do you know the principle ( security in depth )?
as a paranoid , i will let it like that
even poitless
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
i respect your help
This question has an answer! Thank you for helping 😄
If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1237998786140442654