Should I trim spaces in a password field

后端 未结 8 700
南旧
南旧 2021-01-01 12:17

Just wondering.

We usually trim a user name in various forms in our ASP.Net application, whats the best practices for password fields.

i.e. should we remove

8条回答
  •  爱一瞬间的悲伤
    2021-01-01 12:32

    Trim leading and trailing spaces and all other whitespace. It is actually a good practice for all common fields. Do not count these trailing and leading spaces towards minimum password length. Spaces in the middle of password are just fine. Please, never restrict what password can contain.

提交回复
热议问题