[PR #309] [MERGED] feat: set min/max lengths and autocomplete for password #864

Closed
opened 2026-02-26 19:30:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/309
Author: @nsylke
Created: 8/26/2023
Status: Merged
Merged: 8/28/2023
Merged by: @Mythie

Base: feat/refreshHead: nsylke-patch-7


📝 Commits (2)

  • f8bf4fe feat: set min/max lengths for password
  • 7ad3365 feat: add autocomplete for password managers

📊 Changes

3 files changed (+16 additions, -4 deletions)

View changed files

📝 apps/web/src/components/forms/password.tsx (+8 -2)
📝 apps/web/src/components/forms/signin.tsx (+4 -1)
📝 apps/web/src/components/forms/signup.tsx (+4 -1)

📄 Description

I adjusted the minLength to 6 characters since the password change already had it at 6 characters but the signup/signin had it at 1 character. Lets make it consistent across the platform!

Additionally, I added the maxLength to 72 characters since bcrypt supports up 72 bytes. We're currently doing a silent truncation which isn't ideal. In the future, if people request longer passwords, we could look into prehashing the password using bcrypt(hmac-sha256(salt, password)) to avoid hash shucking and allow passwords longer than 72 characters. Alternatively, we could look at other algorithms like scrypt, pbkdf2 or even argon2id.

Edit: Added autoComplete based on @adithyaakrishna suggestion. This configures password managers to either autofill with the current password or generate a new password.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/309 **Author:** [@nsylke](https://github.com/nsylke) **Created:** 8/26/2023 **Status:** ✅ Merged **Merged:** 8/28/2023 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `feat/refresh` ← **Head:** `nsylke-patch-7` --- ### 📝 Commits (2) - [`f8bf4fe`](https://github.com/documenso/documenso/commit/f8bf4fea36dc51e11021e802bd55f7cd1ba66282) feat: set min/max lengths for password - [`7ad3365`](https://github.com/documenso/documenso/commit/7ad3365b0ef554b761320026475220426358a1b8) feat: add autocomplete for password managers ### 📊 Changes **3 files changed** (+16 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/components/forms/password.tsx` (+8 -2) 📝 `apps/web/src/components/forms/signin.tsx` (+4 -1) 📝 `apps/web/src/components/forms/signup.tsx` (+4 -1) </details> ### 📄 Description I adjusted the `minLength` to 6 characters since the password change already had it at 6 characters but the signup/signin had it at 1 character. Lets make it consistent across the platform! Additionally, I added the `maxLength` to 72 characters since bcrypt supports up 72 bytes. We're currently doing a silent truncation which isn't ideal. In the future, if people request longer passwords, we could look into prehashing the password using `bcrypt(hmac-sha256(salt, password))` to avoid hash shucking and allow passwords longer than 72 characters. Alternatively, we could look at other algorithms like `scrypt`, `pbkdf2` or even `argon2id`. **Edit:** Added `autoComplete` based on @adithyaakrishna suggestion. This configures password managers to either autofill with the current password or generate a new password. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:30:48 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#864
No description provided.