Skip to content

fix(web-pkg): enforce the maximum password length of the password policy - #3599

Merged
AlexAndBear merged 1 commit into
mainfrom
fix/link-password-max-length
Oct 12, 2026
Merged

AlexAndBear merged 1 commit into
mainfrom
fix/link-password-max-length

Conversation

@AlexAndBear

Copy link
Copy Markdown
Member

Description

  • Maximum length: the password policy now uses max_characters from the capability ("At most 72 characters"). It counts UTF-8 bytes, because the server hashes with bcrypt, which is limited to 72 bytes. Before, an 80-character link password passed the check, the request failed with 500 and the dialog closed.
  • Generated passwords never exceed the maximum.

Related Issue

  • No issue, found in the functional bug sweep of the web client

How Has This Been Tested?

  • test environment: local dev server, Playwright (Chromium)
  • create link with password: 80 characters and 40 × "ä" (80 bytes) show the failed hint and disable "Copy link"; 72 characters work
  • unit tests added

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@JammingBen JammingBen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code LGTM. Just raising the question if we want to enforce the 72 char limit on e2ee vaults, since it's not limited by the server's bcrypt? Probably fine for passwords, but can be limiting if one sees it more as a secret key.

@AlexAndBear

AlexAndBear commented Oct 12, 2026 •

Copy link
Copy Markdown
Member Author

Code LGTM. Just raising the question if we want to enforce the 72 char limit on e2ee vaults, since it's not limited by the server's bcrypt? Probably fine for passwords, but can be limiting if one sees it more as a secret key.

Thats a good question tho!, lets talk an I will take care in a follow up

@AlexAndBear
AlexAndBear merged commit 8e48951 into main Oct 12, 2026
32 checks passed
@AlexAndBear
AlexAndBear deleted the fix/link-password-max-length branch October 12, 2026 07:21
@openclouders openclouders mentioned this pull request Oct 12, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants