#5803 IPA sync status is odd in staging
Closed: Fixed Opened by ralph.

In staging FAS, this user...

https://admin.stg.fedoraproject.org/accounts/user/view/mjia

...has an odd value for IPA Sync Status: error:invalid 'login': may only include letters, numbers, _, -, . and $

When I try to run fas2ipa.py, I get the following traceback:

❯ python fas2ipa.py --staging sync-user mjia
FAS Password: 
Traceback (most recent call last):
  File "fas2ipa.py", line 370, in <module>
    args.func(args)
  File "fas2ipa.py", line 303, in user_sync
    args.syncer.sync_user(username)
  File "fas2ipa.py", line 261, in sync_user
    self.ipa_request('user_add', **fasinfo)
  File "fas2ipa.py", line 90, in ipa_request
    raise RuntimeError('Call error: %s' % resp['error'])
RuntimeError: Call error: {u'message': u"invalid 'last': Leading and trailing spaces are not allowed", u'code': 3009, u'data': {u'name': u'last', u'error': u'Leading and trailing spaces are not allowed'}, u'name': u'ValidationError'}

/cc @mjia

Metadata Update from @kevin:
- Issue tagged with: authentication

@ralph Well, as the fas2ipa script reports, they have an additional space after their name.
Please ask them to update their account to remove that.

Anyway, fas2ipa now deals with the extra spaces and strips them.

Metadata Update from @puiterwijk:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

Confirmed, python fas2ipa.py --staging sync-user mjia ran without error.

Metadata