-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Describe the bug
The token generator currently uses incomplete alphabet strings for both uppercase and lowercase characters.
'ABCDEFGHIJKLMOPQRSTUVWXYZ' // Missing "N"
'abcdefghijklmopqrstuvwxyz' // Missing "n"
As a result, generated tokens will never contain the letters N or n, which reduces entropy and creates a biased distribution of characters.
Impact
-
Lower security due to reduced randomness.
-
Non-uniform token generation.
-
Unexpected behavior when systems rely on full alphabet coverage.
Expected Behavior
- The generator should use the full alphabets:
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
'abcdefghijklmnopqrstuvwxyz'
Steps to Reproduce
-
Generate multiple tokens using the current implementation.
-
Observe that "N" and "n" never appear.
Suggested Fix
- Replace the incorrect alphabet strings with full alphabets.
Environment
-
Token generator service
-
File: token-generator.service.ts
What happened?
A bug happened
System information
Test in browser : https://it-tools.tech/token-generator
Where did you encounter the bug?
Public app (it-tools.tech)