Tried to add user with 9 characters. The operation failed without any meaningful message.
Didn't see the problem bassed on the length of the USer ID, but I did see it when I attempted to create user with a login using invalid characters.
THe server returned a 500 Internal Server error, probably due to marshalling problems.
raise TypeError(repr(o) + " is not JSON serializable") [Mon Dec 20 14:36:55 2010] [error] TypeError: <bound method Str._rule_pattern of Str('uid', attribute=True, cli_name='login', default_from=DefaultFrom(<lambda>, 'givenname', 'sn'), doc=Gettext('User login', domain='ipa', localedir=None), label=Gettext('User login', domain='ipa', localedir=None), maxlength=255, multivalue=False, normalizer=<lambda>, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?$', pattern_errmsg='may only include letters, numbers, _, -, . and $', primary_key=True, required=True)> is not JSON serializable
This can be fixed, I think, by using the same mechanism we have for validating the form inputs in the details page: creating a regex based on the pattern. The UI can only report the problem if it gets back a valid error code.
So, three issues here: 1 reporting of a 500 from the server, 2 marshalling a pattern match failure and other errors via the JSON rpc, 3, checking parameters to 'add' before they get senbt in the RPC.
Still get back a 500.
There is a patch on the list for this, but it needs more work. Assigning to edewata as it is his patch.
fixed in add7d70
Metadata Update from @dpal: - Issue assigned to edewata - Issue set to the milestone: FreeIPA 2.0 - 2011/01 (cleanup)
Login to comment on this ticket.