Skip to content

Commit b37df69

Browse files
T3pp31devin-ai-integration[bot]joseluisq
authored
docs: information about bcrypt 72-byte limit for basic auth (#7)
* docs: warn about bcrypt 72-byte limit for basic auth Add a warning to the Basic Authentication page explaining that SWS uses non-truncating bcrypt verification, so hashes created for passwords longer than 72 bytes with standard bcrypt tools (e.g. Apache htpasswd) will not match. Recommend ASCII-only passwords of 72 characters or fewer. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * docs: clarify bcrypt password length handling --------- Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Jose Quintana <1700322+joseluisq@users.noreply.github.com>
1 parent 568911a commit b37df69

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎src/v2/features/basic-authentication.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ Both are separated by a `:` (punctuation mark) character.
1414
>
1515
> Only the password must be encoded using the [`BCrypt`](https://en.wikipedia.org/wiki/Bcrypt) password-hashing function.
1616
17+
> [!WARNING] Bcrypt Password Length Limit
18+
>
19+
> SWS rejects passwords longer than **72 bytes** before bcrypt verification. Hashes generated with standard `bcrypt` utilities or the [Apache `htpasswd`](https://httpd.apache.org/docs/2.4/programs/htpasswd.html) tool are compatible with SWS for passwords of 72 bytes or fewer.
20+
>
21+
> Passwords longer than 72 bytes will **not** match in SWS, even if the hash was generated by a tool that truncates the password.
22+
>
23+
> Make sure your password is **at most 72 bytes** long. We recommend using **ASCII-only passwords of 72 characters or fewer** to avoid encoding issues.
24+
1725
As an example, we will use the [Apache `htpasswd`](https://httpd.apache.org/docs/2.4/programs/htpasswd.html) tool to generate the `username:encrypted_password` pair.
1826

1927
```sh

0 commit comments

Comments
 (0)