[Freeipa-devel] [PATCH] 808 don't allow leading/trailing whitespace in strings

Rob Crittenden rcritten at redhat.com
Fri Jun 24 18:41:02 UTC 2011


This started as a problem in allowing leading/trailing whitespaces on 
primary keys. In nearly every command other than add query is True so 
all rules were ignored on the primary key. This meant that to enforce 
whitespace we would need to define a validator for each one.

I decided instead to set self.all_rules to just the class rules if query 
== True. So the minimum set of validators will be executed against each 
type but param-specific validators will only run on add.

I talked to Martin about this a bit this morning. My original intention 
was to make some pretty invasive changes related to query and he talked 
me out of them. He felt that in anything other than an add the 
validators shouldn't be run. We compromised on letting Paramter-specific 
validators be run.

This has pretty big implications on primary keys so test carefully.

https://fedorahosted.org/freeipa/ticket/1285
https://fedorahosted.org/freeipa/ticket/1286
https://fedorahosted.org/freeipa/ticket/1287

rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-rcrit-808-whitespace.patch
Type: text/x-diff
Size: 2679 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110624/4e1b4b32/attachment.bin>


More information about the Freeipa-devel mailing list