[Freeipa-devel] [PATCH] jderose 028 Lossless datetime round-trip
John Dennis
jdennis at redhat.com
Fri Dec 4 15:12:10 UTC 2009
On 12/04/2009 09:49 AM, Rob Crittenden wrote:
> John Dennis wrote:
>> On 12/03/2009 11:56 AM, Rob Crittenden wrote:
>>
>>> What should this do it if the incoming DateTime value is not parsed
>>> correctly by datetime.datetime()?
>>
>> Well in theory this should never happen if the parameter value
>> complies with the specification which demands it be in iso8601 format.
>> I would imagine it would raise a ValueError just like any other ill
>> formed parameter.
>>
>
> That's not the case I'm concerned with. I'm wondering about Joe hacker
> who wants to see what happens when bad data is sent to IPA. I don't
> think we'll catastrophically blow up but I also don't think we'd return
> a useful error message.
I agree we should test with bad input and make sure we gracefully handle
it. Just pointing out its no different than any other data type, you
could declare the parameter type to be an integer and send junk too, or
a completely malformed xml document. A graceful response to all these
cases would be a good thing to ensure.
--
John Dennis <jdennis at redhat.com>
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
More information about the Freeipa-devel
mailing list