snikket-im / snikket-web-portal

This is the web portal for Snikket Chat services. To learn more about what Snikket Chat services are, check the website.
https://snikket.org
GNU Affero General Public License v3.0
32 stars 12 forks source link

Fix password validation #174

Closed mwild1 closed 8 months ago

mwild1 commented 8 months ago

An issue was discovered by @Zash where changing the password might fail, but give the user no feedback that it had failed. This could lead to a user thinking their password has been changed, when in fact it has not.

The first commit adds error handling. It's not the best (it throws an XMPP error condition at the user with no explanation), but hopefully we can improve it in the future.

The main reason a password change might fail is because it doesn't meet the policies enforce by the server. For example, if it is too short. The second commit adds some pre-validation before we send it to the server to catch the most common policy violations.