#1279 Empty fullname craches pagure.io when creating a new project
Closed: Fixed 7 years ago Opened 7 years ago by cqi.

I run pagure.io locally (in a dev environment) with local authentication. Full name is optional and can be emtpy. This craches pagure.io when creating a new project, because

127.0.0.1 - - [08/Sep/2016 00:07:45] "POST /new HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/home/cqi/Virtualenvs/pagure/lib/python2.7/site-packages/flask/app.py", line 2000, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/cqi/code/pagure/pagure/proxy.py", line 71, in __call__
    return self.app(environ, start_response)
  File "/home/cqi/Virtualenvs/pagure/lib/python2.7/site-packages/flask/app.py", line 1991, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/home/cqi/Virtualenvs/pagure/lib/python2.7/site-packages/flask/app.py", line 1567, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/cqi/Virtualenvs/pagure/lib/python2.7/site-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/cqi/Virtualenvs/pagure/lib/python2.7/site-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/cqi/Virtualenvs/pagure/lib/python2.7/site-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/cqi/Virtualenvs/pagure/lib/python2.7/site-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/cqi/Virtualenvs/pagure/lib/python2.7/site-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/cqi/code/pagure/pagure/__init__.py", line 340, in decorated_function
    return function(*args, **kwargs)
  File "/home/cqi/code/pagure/pagure/ui/app.py", line 400, in new_project
    'OLD_VIEW_COMMIT_ENABLED', False),
  File "/home/cqi/code/pagure/pagure/lib/__init__.py", line 1070, in new_project
    if six.PY2 else userobj.fullname
ValueError: Failed to parse signature - Signature cannot have an empty name or email

This is because of this. @pingou should we make that field compulsory or default full name to username ?

@vivekanand1101 we should fall back to username if fullname is empty

Thanks for catching this @cqi

@pingou changed the status to Closed

7 years ago

Login to comment on this ticket.

Metadata