It is recommended to never trust the user and filter all input before storing them in the database, to avoid sql injections and such.

What about user password ? Should I perform any kind of sanitization before storing them ? If I do so, user typing they password to log in might not match a sanitized version.

( Password are encrypted before being stored).

What's the best practice?