HerrMotz / Competency-Question-Manager-Backend

Student Project for the DLR (Institute for Datascience)
MIT License
0 stars 0 forks source link

[BUG] When registering new users with insufficiently complex passwords, the account cannot be created anymore, even with a sufficient password #1

Closed HerrMotz closed 1 week ago

HerrMotz commented 1 week ago

Steps to reproduce the error:

curl -X 'POST' \
  'http://backend:8000/users/register' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3Mjk5Nzc5MzQsInN1YiI6ImE4NjkzNzY4MjQ0YjRiODc5OTcyNTQ4MDM0ZGYxY2MzIiwiaWF0IjoxNzI5ODkxNTM0LCJleHRyYXMiOnsiZW1haWwiOiJhZG1pbkB1bmktamVuYS5kZSJ9fQ.9Upu_3DPKLDdqtUTaUOivEH6N8TOJlv9c_jn7circz4' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "max.mustermann@uni-jena.de",
  "name": "Max Mustermann",
  "password": "forexampleapasswordwithoutnumbers"
}'

And then when one tries to register with a sufficiently complex password, there is a 500 internal server error, probably, because the user was partially created.

HerrMotz commented 1 week ago

Actually this was not the issue, just a faulty DTO.