-
Notifications
You must be signed in to change notification settings - Fork 499
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
exp/services/recoverysigner: validate request parameters on POST/PUT endpoints #2388
Comments
#2390 adds validations of identities, role, auth methods and auth method type. Still need to add validation of auth method values to ensure the stellar address, phone number, or email address provided in the field are valid for each. |
leighmcculloch
added a commit
that referenced
this issue
Mar 17, 2020
…t role, identities and auth methods (#2390) ### What Add some validations to the account post endpoint request body: - Require at least one identity. - Require a value for the `role` field. - Require at least one authentication method for each identity. The change also updates the authentication method type validation that already exists to use the same format. ### Why There's no validation on most fields. It would be good to make sure that a client is at least passing the fields required for some success. For #2388 ### Known limitations This doesn't do all the validation we could do. It doesn't validate the more complex fields like the authentication method values, but it does lay the ground work for where that validation can live.
7 tasks
Closing all recoverysigner issues |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The recoverysigner has a couple endpoints that accept fields for storing alongside a registered account but does very little validation on the contents of those fields.
Validation should be implemented for the following endpoints:
POST /accounts/<address-id>
PUT /accounts/<address-id>
(this endpoint isn't implemented yet, but will be in exp/services/recoverysigner: add PUT /accounts/<address> endpoint #2340)Some ideas for what type of validation should be added:
identities[].role
,identities[].auth_methods[].value
.identities[].auth_methods[].value
should have its contents validated as either a valid address, phone number, or email based on the adjacenttype
field.identities
andidentities[].auth_methods
.The text was updated successfully, but these errors were encountered: