Closed holenet closed 6 years ago
Describe the bug 사인업 시, 너무 간단한 비밀번호나 유저네임과 비슷한 비밀번호는 사용할 수 없어야 합니다. 하지만 현재 사인업 구현에서는 이에 대한 제한이 전혀 없는 것으로 보입니다.
To Reproduce
대표적으로 위의 두가지 경우로 유저를 새로 만들었을 때 문제없이 생성이 가능한 것을 확인하였습니다.
Expected behavior
HTTP 400 Bad Request { "password": [ "This password is too short. It must contain at least 8 characters.", "This password is too common." ] }
HTTP 400 Bad Request { "password": [ "This password is too similar to the username." ] }
사인업 뷰에서 비밀번호에 대한 적절한 validation이 이루어져야 한다고 봅니다. 그 결과로 위와 같은(비슷한) 에러 메시지가 response로 나오도록 하면 좋을 듯 합니다.(에러 메시지를 그대로 클라이언트에서도 사용할 수 있습니다.)
https://github.com/SWPP/ttrs-backend/blob/863e3a331a0fbc487801f6eb5112691752a24aa6/backend/ttrs/serializers.py#L57-L64 여기서 쓰인 로직을 확인하셔서 적용시켜 주시면 좋겠습니다.
Screenshots 생략
Desktop (please complete the following information): 생략
Smartphone (please complete the following information): 생략
Additional context 생략
Describe the bug 사인업 시, 너무 간단한 비밀번호나 유저네임과 비슷한 비밀번호는 사용할 수 없어야 합니다. 하지만 현재 사인업 구현에서는 이에 대한 제한이 전혀 없는 것으로 보입니다.
To Reproduce
대표적으로 위의 두가지 경우로 유저를 새로 만들었을 때 문제없이 생성이 가능한 것을 확인하였습니다.
Expected behavior
사인업 뷰에서 비밀번호에 대한 적절한 validation이 이루어져야 한다고 봅니다. 그 결과로 위와 같은(비슷한) 에러 메시지가 response로 나오도록 하면 좋을 듯 합니다.(에러 메시지를 그대로 클라이언트에서도 사용할 수 있습니다.)
https://github.com/SWPP/ttrs-backend/blob/863e3a331a0fbc487801f6eb5112691752a24aa6/backend/ttrs/serializers.py#L57-L64 여기서 쓰인 로직을 확인하셔서 적용시켜 주시면 좋겠습니다.
Screenshots 생략
Desktop (please complete the following information): 생략
Smartphone (please complete the following information): 생략
Additional context 생략