We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I am new to JustAuth, and when I was browsing the code I found in the file GlobalAuthUtils.java, Random is used to generate the nonce here.
GlobalAuthUtils.java
Random
public static String generateNonce(int len) { String s = "0123456789QWERTYUIOPLKJHGFDSAZXCVBNMqwertyuioplkjhgfdsazxcvbnm"; Random rng = new Random(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < len; i++) { int index = rng.nextInt(62); sb.append(s, index, index + 1); } return sb.toString(); }
However, it's not secure enough, so switching to SecureRandom can be a better choice.
SecureRandom
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, I am new to JustAuth, and when I was browsing the code I found in the file
GlobalAuthUtils.java
,Random
is used to generate the nonce here.However, it's not secure enough, so switching to
SecureRandom
can be a better choice.The text was updated successfully, but these errors were encountered: