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

[PM-7777] Enhanced password generation #8951

Closed
wants to merge 2 commits into from

Conversation

karma993892
Copy link

  • Added new option to add extra special characters

Type of change

- [ ] Bug fix
- [X] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Added 19 additional special characters (()[]{}?/\-_.:,;=+<>), which can be activated/deactivated without affecting the existing ones. The reason for putting a separate switch is because some web pages may not support certain characters or the user may not want such a complex password.

Code changes

  • apps/browser/src/tools/popup/generator/generator.component.html: Added an appBoxRow to enable/disable the extra special characters.
  • libs/common/src/tools/generator/password/password-generation-options.ts: Added boolean (false by default) for extra special characters
  • libs/common/src/tools/generator/password/password-generation.service.ts: Added logic to concatenate the extra special characters as required.

Screenshots

Disabled

Disabled

Enabled

Enabled

Deployment requirements

If this pull request is accepted, the name of the appBoxRow is written directly in the .html in English and a key would have to be assigned for its translation (I mention it here because I don't know if I should have done it myself, but after a while researching about the translation system and messing around on https://crowdin.com/project/bitwarden-browser, I haven't been able to do this myself).

- Added new option to add extra special characters
@karma993892 karma993892 requested a review from a team as a code owner April 27, 2024 17:06
@bitwarden-bot
Copy link

Thank you for your contribution! We've added this to our internal Community PR board for review.
ID: PM-7777

@bitwarden-bot bitwarden-bot changed the title Enhanced password generation [PM-7777] Enhanced password generation Apr 27, 2024
@holow29
Copy link

holow29 commented Apr 29, 2024

Seems like it might be better to put this as an option below !@#$%^&* as ()[]{}?/\-_.:,;=+<>

@karma993892
Copy link
Author

Seems like it might be better to put this as an option below !@#$%^&* as ()[]{}?/\-_.:,;=+<>

I was hesitating between both options and in the end I opted for the one I have published, because I think it may be less confusing for an ordinary user, since in the way you indicate, the special characters !@#$%^&* would have to be activated when only the option ()[]{}?/\-_.:,;=+<> is activated, or vice versa, if both options are activated and !@#$%^&* is unchecked, ()[]{}?/\-_.:,;=+<> would also have to be unchecked, otherwise the user would understand that the password should be generated with ()[]{}?/\-_.:,;=+<> without the need to activate !@#$%^&*. The way I have posted it, I think it is clearer that ()[]{}?/\-_.:,;=+<> will only be added if !@#$%^&* is enabled. (I don't know if I've made myself clear 😅)

@audrey-jensen
Copy link
Contributor

audrey-jensen commented May 1, 2024

Hi @karma993892!

Thank you for your interest in expanding the flexibility of the password generator. We're interested in expanding the character set, too!

We're presently in the middle of a significant refactoring that invalidates the logic you've edited, unfortunately. We're not able to accept PRs for it at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants