X Tutup
Skip to content

App crash when generating passwords with a large list of excluded characters #1663

@gabrielpastori1

Description

@gabrielpastori1

Current behavior

The application exhibits two distinct issues depending on the "Exclude characters" input:

Total Crash: When providing a long list of specific characters to exclude (e.g., @, :, /, %, &, ?, #, +, !, $, ^, *), the application crashes immediately upon clicking "Generate password(s)".

Incorrect Output: When using a shorter exclusion filter such as ^, *, the generator fails to produce a random string and instead returns only strings of asterisks (*) regardless of the configured password length.

How to reproduce it (as minimally and precisely as possible)

Scenario 1: App Crash

  1. Open the Password Generator tool.
    
  2. Set Password Length to 36.
    
  3. Enable all character toggles (Lowercase, Uppercase, Digits, Special Characters).
    
  4. In the "Exclude the following characters..." field, paste: @, :, /, %, &, ?, #, +, !, $, ^, *
    
  5. Click "Generate password(s)".
    
  6. The app closes/crashes instantly.
    

Scenario 2: Logic Failure (Asterisk Loop)

  1. Use the same settings as above.
  2. Change the exclusion field to: ^, *
  3. Click "Generate password(s)".
  4. The output field fills with lines containing only ************************************.

Expected behavior

The app should handle excluded characters without crashing, even if the list is long.

If the exclusion list is valid, the generator should return a random string of characters that are not in the exclusion list, while still respecting the requested password length.

If an exclusion list makes it impossible to generate a password (e.g., excluding all possible characters), the app should show a validation error instead of crashing or returning a broken string.

Screenshots

Image Image

Workaround

No response

Affected platforms

Windows

Affected DevToys kind

DevToys (app with GUI)

DevToys Version

Versão 1.0.14.0 | X64 | RELEASE | 3ad0ff2 | 3ad0ff2

Relevant Assets/Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup