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

[change] Adds check for valid prefix in batch creation #365 #371

Merged
merged 2 commits into from
Feb 8, 2022

Conversation

bsande6
Copy link
Contributor

@bsande6 bsande6 commented Jan 28, 2022

@atb00ker This commit adds a check such that the prefix in a batch user creation only accepts letters, numbers and the special characters @/./+/-/_

@devkapilbansal
Copy link
Member

@bsande6 Can you please explain why this change is necessary? If it is, add some test cases too

Copy link
Member

@atb00ker atb00ker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devkapilbansal It's required because currently any character is allowed in the radius batch user creation form, but users can have only limited characters.

@bsande6 please:

  1. Link the following the pr description and commit: [bug] invalid username allowed #365
  2. Add a test to ensure that if an illegal character is entered, the form rejects the input, please checkout the existing tests for help: https://github.com/openwisp/openwisp-radius/blob/master/openwisp_radius/tests/test_batch_add_users.py
  3. Tests are failing, please check them as well!

If you need further information, please reach out on the gitter development channel!

@bsande6 bsande6 changed the title [Fix] Prevents invalid username entries in batch add via prefix #365 [change] Adds check for valid prefix in batch creation #365 Feb 2, 2022
@bsande6 bsande6 requested a review from atb00ker February 4, 2022 16:54
Copy link
Member

@atb00ker atb00ker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the tests! 👍🏻

…nwisp#365

Adds a check such that the prefix in a batch user creation only accepts letters, numbers and the special characters @/./+/-/_
Related to openwisp#365
@coveralls
Copy link

coveralls commented Feb 8, 2022

Coverage Status

Coverage increased (+0.002%) to 99.107% when pulling d718641 on bsande6:invalid-username-fix into 81cefaf on openwisp:master.

@atb00ker atb00ker merged commit e23afdc into openwisp:master Feb 8, 2022
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

Successfully merging this pull request may close these issues.

None yet

4 participants