From ae800aa8330e60a6c7792cee1e434851208afdde Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov Date: Sun, 11 Sep 2011 23:44:46 +0400 Subject: [PATCH] SONAR-2656 Do not validate password twice --- sonar-server/src/main/webapp/WEB-INF/app/models/user.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb index 7635670b6b0..ac04601fe30 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb @@ -41,8 +41,9 @@ class User < ActiveRecord::Base validates_length_of :name, :maximum => 200, :allow_blank => true, :allow_nil => true validates_length_of :email, :maximum => 100, :allow_blank => true, :allow_nil => true - validates_length_of :password, :within => 4..40, :if => :password_required? - validates_confirmation_of :password, :if => :password_required? + # The following two validations not needed, because they come with Authentication::ByPassword - see SONAR-2656 + #validates_length_of :password, :within => 4..40, :if => :password_required? + #validates_confirmation_of :password, :if => :password_required? validates_presence_of :login validates_length_of :login, :within => 2..40 -- 2.39.5