Closed shirshak55 closed 3 years ago
Thanks, this looks great! I've made two small changes:
replace('http://', '')
code. That was a good catch and a reasonable fix - it neatly solves problems with users that paste in complete URLs that pass the .*
regex - but actually you're not allowed to use /
(or various other characters, see https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.1 - unusual characters have be added specially with %-encoding) in the userinfo section, so we can just block that case entirely in the regex instead and then we don't have to worry about it.Does that make sense? We could probably improve the UX for special characters in passwords if it comes up, but I don't think it'll matter very often, and we can wait for somebody to complain before we try to do that.
Thanks for this anyway, I'll merge and deploy it now :tada:
I have checked and it is working for my use case.
I have updated the format message to be a bit clear.
Regarding . regex as password can contain any character so I am using here.
Thanks.