Skip to content

[PM-22523] PM-19476: Changed default passphrase word separator to empty string.#5334

Open
EranBoudjnah wants to merge 3 commits intobitwarden:mainfrom
EranBoudjnah:PM-19476-default-to-no-word-separator
Open

[PM-22523] PM-19476: Changed default passphrase word separator to empty string.#5334
EranBoudjnah wants to merge 3 commits intobitwarden:mainfrom
EranBoudjnah:PM-19476-default-to-no-word-separator

Conversation

@EranBoudjnah
Copy link

🎟️ Tracking

#4913

📔 Objective

Allow users to use no separator in passphrases.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@CLAassistant
Copy link

CLAassistant commented Jun 9, 2025

CLA assistant check
All committers have signed the CLA.

@EranBoudjnah
Copy link
Author

This should be updated too:

data class PassphraseGeneratorRequest (
    /**
     * Number of words in the generated passphrase.
     * This value must be between 3 and 20.
     */
    val `numWords`: kotlin.UByte, 
    /**
     * Character separator between words in the generated passphrase. The value cannot be empty.
     */
    val `wordSeparator`: kotlin.String, 
    /**
     * When set to true, capitalize the first letter of each word in the generated passphrase.
     */
    val `capitalize`: kotlin.Boolean, 
    /**
     * When set to true, include a number at the end of one of the words in the generated
     * passphrase.
     */
    val `includeNumber`: kotlin.Boolean
) {
    
    companion object
}

@EranBoudjnah EranBoudjnah force-pushed the PM-19476-default-to-no-word-separator branch from b33f24f to 4d04549 Compare June 9, 2025 16:28
@bitwarden-bot
Copy link

Thank you for your contribution! We've added this to our internal tracking system for review.
ID: PM-22523
Link: https://bitwarden.atlassian.net/browse/PM-22523

Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process.

@bitwarden-bot bitwarden-bot changed the title PM-19476: Changed default passphrase word separator to empty string. [PM-22523] PM-19476: Changed default passphrase word separator to empty string. Jun 9, 2025
@EranBoudjnah EranBoudjnah force-pushed the PM-19476-default-to-no-word-separator branch from 4d04549 to f55fa2b Compare June 9, 2025 21:54
@EranBoudjnah EranBoudjnah force-pushed the PM-19476-default-to-no-word-separator branch from f55fa2b to d1bbe59 Compare June 19, 2025 15:12
@djsmith85 djsmith85 linked an issue Jun 23, 2025 that may be closed by this pull request
1 task
@cheintz
Copy link

cheintz commented Nov 22, 2025

Any movement on this?

@cheintz
Copy link

cheintz commented Feb 1, 2026

Any movement on this? The bug in #4913 still exists and this is literally 2 lines and does not have conflicts with main.

@EranBoudjnah
Copy link
Author

@cheintz I don't think anyone's looking at any of these. I was motivated to contribute but lost interest since it's obviously a wasted effort...

@cheintz
Copy link

cheintz commented Feb 3, 2026

Indeed, thank you for your efforts, it's a shame they haven't been integrated. Perhaps enough similar efforts will accumulate to the point that a fork is worthwhile, though the security concerns with such a fork are very severe.

@SaintPatrck SaintPatrck added app:password-manager Bitwarden Password Manager app context t:bug Change Type - Bug labels Feb 4, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Logo
Checkmarx One – Scan Summary & Detailsaff31309-5808-40ef-9ad4-94069be917d6

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.30%. Comparing base (29648e0) to head (78534b9).

Files with missing lines Patch % Lines
...swordgenerator/MasterPasswordGeneratorViewModel.kt 0.00% 0 Missing and 1 partial ⚠️
...n/ui/tools/feature/generator/GeneratorViewModel.kt 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5334   +/-   ##
=======================================
  Coverage   86.30%   86.30%           
=======================================
  Files         780      783    +3     
  Lines       56351    56416   +65     
  Branches     8149     8149           
=======================================
+ Hits        48635    48692   +57     
- Misses       4876     4884    +8     
  Partials     2840     2840           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@SaintPatrck SaintPatrck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @EranBoudjnah

Thank you for this contribution.

The GeneratorViewModel change looks great.

I left a comment regarding the change to default behavior on MasterPasswordGeneratorViewModel. It should be reverted.

Additionally, I do not see any tests being updated/added. Please add tests to validate this change in behavior.

Since this ultimately results in UI behavior changes, please attach a screenshot and/or video of the new behavior.

And finally, since this change fixes empty word separator without modifying the initial default value, can you update the PR title?

return PassphraseGeneratorRequest(
numWords = max(optionsWordCount, DEFAULT_WORD_COUNT).toUByte(),
wordSeparator = options?.wordSeparator ?: DEFAULT_SEPARATOR,
wordSeparator = options?.wordSeparator.orEmpty(),
Copy link
Contributor

@SaintPatrck SaintPatrck Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This alters the default behavior for users who have never saved generator preferences. When options is null the DEFAULT_SEPARATOR must be used. Please revert this change.

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

Labels

app:password-manager Bitwarden Password Manager app context community-pr t:bug Change Type - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty word separator in passphrase generator still separates with space

6 participants