Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send back an exception or error code if user already exists. #199

Open
imaginator opened this issue Mar 5, 2015 · 1 comment
Open

Send back an exception or error code if user already exists. #199

imaginator opened this issue Mar 5, 2015 · 1 comment

Comments

@imaginator
Copy link
Member

Creating the same user twice always returns "OK"

curl https://tellmo.buddycloud.com/api/account -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d "{ \"username\": \"[email protected]\", \"password\": \"12345678\", \"email\": \"[email protected]\" }"        

If we try to use this command with an already used "username" it still returns OK. Should it not return any Error or Exception that username already exist?

@jamestait
Copy link
Member

An HTTP 409 response might be appropriate, but would enable a malicious user to enumerate the usernames on a given domain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants