[Freeipa-devel] [PATCH] 062-065 Ticket 1466 Validate AAAA records as valid IPv6 prior to sending to server
Petr Vobornik
pvoborni at redhat.com
Tue Jan 3 09:06:38 UTC 2012
This ticket was divided into 4 small almost independent patches.
1) 62-Added-support-of-custom-field-validators
2) 63-Added-validation-logic-to-multivalued-text-field - depends on 1
3) 64-Added-client-side-validation-of-A-and-AAAA-DNS-recor - depends on 1
4) 65-Fixed-IPv6-validation-special-case-single-colon - minor fix
Patch descriptions:
1) Added support of custom field validators
Current validation logic supports only validation based on metadata. It
can be extended only by overriding field's validation method. This
approach requires creating subclasses of field for each different format
of desired value. It's inconvenient for cases like adding the same
validation logic to two different subclasses of field.
This patch is adding support for creating custom validators.
Validator is an object which contains validation logic. Validation is
executed in a validate(value, context) method. This method checks if the
value is valid and returns a validation result. Validation result is a
simple object which contains valid property and an error message if
valid is false.
Field is extended by validators property. It can be set in spec object
or later. It should contain instances of validators for the field.
Validators are run in field's validation method.
2) Added validation logic to multivalued text field
3) Added client-side validation of A and AAAA DNS records
4) Fixed IPv6 validation special case: single colon
IPv6 parsing was incorrectly evaluating ':' as a valid IPv6 address.
All: https://fedorahosted.org/freeipa/ticket/1466
--
Petr Vobornik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pvoborni-0062-Added-support-of-custom-field-validators.patch
Type: text/x-patch
Size: 7074 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120103/c4637dbe/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pvoborni-0063-Added-validation-logic-to-multivalued-text-field.patch
Type: text/x-patch
Size: 2938 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120103/c4637dbe/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pvoborni-0064-Added-client-side-validation-of-A-and-AAAA-DNS-recor.patch
Type: text/x-patch
Size: 5862 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120103/c4637dbe/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pvoborni-0065-Fixed-IPv6-validation-special-case-single-colon.patch
Type: text/x-patch
Size: 1587 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120103/c4637dbe/attachment-0003.bin>
More information about the Freeipa-devel
mailing list