google-code-export / ruby-activeldap

Automatically exported from code.google.com/p/ruby-activeldap
Other
1 stars 1 forks source link

validation_skip_attributes not working #56

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a user model with a userPassword attribute with a stored value like:
"{SSHA}Ni4sJ7kNRuOPErlXX9CQ/o+H0iRBnQtAje5Bwg=2"
2. Try to set any attribute on the user i.e. sn, @user.sn = 'LastName'
3. Set @user.validate_skip_attributes << "userPassword"
4. @user.update_attributes
5. Exception is thrown
userPassword has invalid format: 
"{SSHA}Ni4sJ7kNRuOPErlXX9CQ/o+H0iRBnQtAje5Bwg==": required syntax: Printable 
String: "{SSHA}Ni4sJ7kNRuOPErlXX9CQ/o+H0iRBnQtAje5Bwg=2" has unprintable 
character: '{'

What is the expected output? What do you see instead?
I would expect an ldap query that only modifies the sn attribute and not all of 
them.  ActiveLdap doesn't even execute a query against the server, it just 
blows up saying the validation failed.  It shouldn't validate the attribute 
because it didn't change anyways.  To get around this I put userPassword in 
validation_skip_attributes and it didn't change the behavior either.

What version of the product are you using? On what operating system?
1.3.7 on Mac OSx

Original issue reported on code.google.com by matt.top...@gmail.com on 21 Oct 2010 at 4:54

GoogleCodeExporter commented 9 years ago
Sorry its ruby 1.8.7 with rails 2.3.8 with activeldap 1.2.2

Original comment by matt.top...@gmail.com on 21 Oct 2010 at 5:01