]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
Validate passwords properly when creating an account. Fixes #419.
[rails.git] / app / controllers / user_controller.rb
index 0c10980efa7059886f73550309d0934f2b509acd..f12cb1051dfded38933a49e5fc6d95edc3c2b5ce 100644 (file)
@@ -74,6 +74,7 @@ class UserController < ApplicationController
       if user
         pass = User.make_token(8)
         user.pass_crypt = pass
       if user
         pass = User.make_token(8)
         user.pass_crypt = pass
+        user.pass_crypt_confirmation = pass
         user.save
         Notifier::deliver_reset_password(user, pass)
         flash[:notice] = "Your password has been changed and is on its way to your mailbox :-)"
         user.save
         Notifier::deliver_reset_password(user, pass)
         flash[:notice] = "Your password has been changed and is on its way to your mailbox :-)"