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

Fix random string generator #3953

Merged
merged 3 commits into from
Dec 21, 2016

Conversation

leonklingele
Copy link
Contributor

This PR fixes the following issues:

  • The random string generator was modulo-biased.
  • The random string generator silently ignored any errors returned by rand.Read. In the worst case, GetRandomString would simply return an empty string.

@unknwon unknwon merged commit d96f2a7 into gogs:develop Dec 21, 2016
@unknwon
Copy link
Member

unknwon commented Dec 21, 2016

Thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants