GiPHouse / Website

GiPHouse website based on Django Framework
https://giphouse.nl
GNU Affero General Public License v3.0
5 stars 2 forks source link

Registering users crashes if a superuser account exists with empty GitHub id #562

Open JobDoesburg opened 2 years ago

JobDoesburg commented 2 years ago

One-sentence description

Registering users crashes if a superuser account exists with empty GitHub id

How to reproduce the bug

  1. Have a (super) user with empty GitHub id
  2. Register a new user
  3. The registration form crashes on a failed UNIQUENESS constraint

Expected behaviour

  1. Not crash (even if a superuser with empty GitHub id exists, still, the Django form shouldn't even create a user with empty GitHub id). I think the problem here is that first, an normal user object is created and only then the form details written to it (after form validation)
  2. It should not be possible to have users with empty GitHub id (even if they are created by code, such as in entrypoint.sh)
JobDoesburg commented 2 years ago
image image

weird, a value is actually being inserted