openedx / edx-platform

The Open edX LMS & Studio, powering education sites around the world!
https://openedx.org
GNU Affero General Public License v3.0
7.1k stars 3.79k forks source link

fix: update autogenerated username functionality #35052

Closed attiyaIshaque closed 3 days ago

attiyaIshaque commented 1 week ago

Description

"When entering special characters like '=', '@', or any other, it raised a server error when the autogenerated username was enabled. I have fixed it in the backend, and now users are allowed to create accounts with special characters." Useful information to include:

JIRA:

https://2u-internal.atlassian.net/browse/VAN-1988

How Has This Been Tested?

Updated unit tests

Video :

https://github.com/openedx/edx-platform/assets/7627421/abdeded3-f029-481d-8ed5-2fcf015d3726

attiyaIshaque commented 6 days ago

From where was the exception being raised? What will be the generated username if someone passes = as a name?

The username will be as expected

f"{current_year}{current_month}_{random_string}"

edx-pipeline-bot commented 3 days ago

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

edx-pipeline-bot commented 2 hours ago

2U Release Notice: This PR has been deployed to the edX production environment.