Should I trim spaces in a password field

后端 未结 8 710
南旧
南旧 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:27

    Don't trim spaces, since some users do include spaces in their passwords. If you don't want a space then just make it invalid to put spaces in a password.

提交回复
热议问题