With a multi-user site, how strict should I verify my users' passwords?
I've searched around a little bit, and I've only found questions about how to verify user passwords. But I know how to create salted hashes for passwords to store in a database (PHP's password_hash()
), and I know how to verify those passwords (PHP
s password_verify()
).
I'm asking what types of restrictions I should put on user passwords on my site. Because passwords are never shown on a webpage, should I put strict restrictions on them like the usernames?
I know that usernames are shown, and are vulnerable to XSS attacks (which I've prevented against for usernames), but passwords are different, and can't be hacked this way (I think this is how it works; correct me if I'm wrong).
I know that passwords are often personal and very unique. I don't know if I should restrict special characters that could make a password more secure, including special characters similar to those in an XSS attack.
I'm asking if any password should be allowed (within certain character limits); if not, then what is a recommended (secure) method?