Skip to content

Bug: Missing 'N' and 'n' in Token Generator Alphabet #1686

@pharmacist-sabot

Description

@pharmacist-sabot

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

  1. Generate multiple tokens using the current implementation.

  2. 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)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriage

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions