-
Notifications
You must be signed in to change notification settings - Fork 34
-
Notifications
You must be signed in to change notification settings - Fork 34
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
App should return 409 when private key already exists #57
Comments
About which endpoint do you talk about? |
Ah, my bad. I overlooked that one. I realize now that perhaps the issue was with the Android app but I tried the following:
Hope this made sense. From the API point of view it makes sense that the behavior is this way. But the end-result is flawed. Im thinking the Android app should probably not upload the public key if the private key was rejected. |
UPDATE: Looking through the Android app code I see that it does in fact check the return value when posting the private key. That means that the server seemingly returned 200 OK even though a private key already existed. |
We first generate/use the public key and only if the public was stored correctly on server, we continue with private key. |
Yes, though in my testing the server returned 200 OK even though a private key already existed. I will do some more testing and see if I can reproduce the issue. |
@ardevd Were you ever able to reproduce the issue? |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
Currently, the app will return 409 if a public key already exists. This is a very useful property, however it wont account for existing private keys. I think it should return 409 if a private key exists as well.
Also, how about returning a json field with a value indicating why 409 is returned?
The text was updated successfully, but these errors were encountered: