[Freeipa-devel] [PATCH] 255 Improve error message in zonemgr validator

Rob Crittenden rcritten at redhat.com
Mon Apr 30 16:50:44 UTC 2012


Martin Kosek wrote:
> On Mon, 2012-04-30 at 16:29 +0200, Martin Kosek wrote:
>> On Mon, 2012-04-30 at 14:02 +0200, Martin Kosek wrote:
>>> This patch consolidates zonemgr function to move the most of the
>>> checks to common functions in order to provide consistent output.
>>> The error messages produced by the validator should now be more
>>> helpful when identifying the source of error.
>>>
>>> https://fedorahosted.org/freeipa/ticket/1966
>>
>> Rob found a corner case with "foo..bar" where the error message was not
>> as helpful as it could be. Now, the empty parts are handled better:
>>
>> # ipa dnszone-mod example.com --admin-email=.foo
>> ipa: ERROR: invalid 'admin_email': missing mail account
>> # ipa dnszone-mod example.com --admin-email=foo.
>> ipa: ERROR: invalid 'admin_email': missing address domain
>> # ipa dnszone-mod example.com --admin-email=foo..bar
>> ipa: ERROR: invalid 'admin_email': empty DNS label
>>
>> Martin
>
> Rob found one more issue with the error message (this one is actually
> quite old). DNS label starting with a hyphen is also not allowed, but we
> state that we forbid just a label ending with it. The attached patch
> fixes the error message.
>
> # ipa dnszone-mod example.com --admin-email=foo.-baz
> ipa: ERROR: invalid 'admin_email': only letters, numbers, and - are
> allowed. DNS label may not start or end with -
>
> Martin

ACK, pushed to master and ipa-2-2

rob




More information about the Freeipa-devel mailing list