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

Fixed User registration request data validation #95

Conversation

isabelcosta
Copy link
Member

@isabelcosta isabelcosta commented Jul 17, 2018

Description

  • Added validation to the username, name, and password for max and min character limit.
  • Moved request data validation functions to separate file, to avoid cluttering the resources' files with validation checks
  • Added tests to check max and min limits of User registration request data fields

Fixes #94
Fixes #93

Type of Change:

  • Code

Code/Quality Assurance Only

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Added tests for character limits and used randomly generated test data.
  • Tested User registration API on Swagger UI and confirmed that the error messages were showing up.

Checklist:

  • My PR follows the style guidelines of this project
  • I have performed a self-review of my own code or materials
  • Update Swagger documentation and the exported file at /docs folder

Code/Quality Assurance Only

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@isabelcosta
Copy link
Member Author

I'm looking into the Codacy warning to see if I can dismiss this

@isabelcosta isabelcosta force-pushed the improve-user-registration-validation branch from 1ffd88b to aedba66 Compare July 17, 2018 21:44
@isabelcosta
Copy link
Member Author

isabelcosta commented Jul 17, 2018

Fixed Codacy warning of using random that brought up security concerns by using instead SystemRandom()
Solution found here: https://stackoverflow.com/a/20937265/6094482

@m-murad m-murad merged commit 2ba1675 into anitab-org:gsoc18-code Jul 18, 2018
@isabelcosta isabelcosta added the Program: GSOC Related to work completed during the Google Summer of Code Program. label Aug 9, 2018
@isabelcosta isabelcosta deleted the improve-user-registration-validation branch December 30, 2018 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Program: GSOC Related to work completed during the Google Summer of Code Program.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants