[PR #283] [MERGED] feat: support hashed password #548

Closed
opened 2026-04-08 16:53:23 +03:00 by zhus · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sigoden/dufs/pull/283
Author: @sigoden
Created: 11/4/2023
Status: Merged
Merged: 11/4/2023
Merged by: @sigoden

Base: mainHead: feat-hashed-password


📝 Commits (1)

  • b02d747 feat: support hashed password

📊 Changes

6 files changed (+112 additions, -19 deletions)

View changed files

📝 Cargo.lock (+30 -5)
📝 Cargo.toml (+2 -1)
📝 README.md (+24 -1)
📝 src/auth.rs (+29 -11)
📝 src/server.rs (+1 -1)
📝 tests/auth.rs (+26 -0)

📄 Description

DUFS supports the use of sha-512 hashed password.

Create hashed password

$ mkpasswd  -m sha-512 -s
Password: 123456 
$6$qCAVUG7yn7t/hH4d$BWm8r5MoDywNmDP/J3V2S2a6flmKHC1IpblfoqZfuK.LtLBZ0KFXP9QIfJP8RqL8MCw4isdheoAMTuwOz.pAO/

Use hashed password

dufs -A -a 'admin:$6$qCAVUG7yn7t/hH4d$BWm8r5MoDywNmDP/J3V2S2a6flmKHC1IpblfoqZfuK.LtLBZ0KFXP9QIfJP8RqL8MCw4isdheoAMTuwOz.pAO/@/:rw'

Two important things for hashed passwords:

  1. Dufs only supports SHA-512 hashed passwords, so ensure that the password string always starts with $6$.
  2. Digest auth does not work with hashed passwords.

🔄 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/sigoden/dufs/pull/283 **Author:** [@sigoden](https://github.com/sigoden) **Created:** 11/4/2023 **Status:** ✅ Merged **Merged:** 11/4/2023 **Merged by:** [@sigoden](https://github.com/sigoden) **Base:** `main` ← **Head:** `feat-hashed-password` --- ### 📝 Commits (1) - [`b02d747`](https://github.com/sigoden/dufs/commit/b02d74778f218c77a396785694eb0ea98c4abc5c) feat: support hashed password ### 📊 Changes **6 files changed** (+112 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+30 -5) 📝 `Cargo.toml` (+2 -1) 📝 `README.md` (+24 -1) 📝 `src/auth.rs` (+29 -11) 📝 `src/server.rs` (+1 -1) 📝 `tests/auth.rs` (+26 -0) </details> ### 📄 Description DUFS supports the use of sha-512 hashed password. Create hashed password ``` $ mkpasswd -m sha-512 -s Password: 123456 $6$qCAVUG7yn7t/hH4d$BWm8r5MoDywNmDP/J3V2S2a6flmKHC1IpblfoqZfuK.LtLBZ0KFXP9QIfJP8RqL8MCw4isdheoAMTuwOz.pAO/ ``` Use hashed password ``` dufs -A -a 'admin:$6$qCAVUG7yn7t/hH4d$BWm8r5MoDywNmDP/J3V2S2a6flmKHC1IpblfoqZfuK.LtLBZ0KFXP9QIfJP8RqL8MCw4isdheoAMTuwOz.pAO/@/:rw' ``` Two important things for hashed passwords: 1. Dufs only supports SHA-512 hashed passwords, so ensure that the password string always starts with `$6$`. 2. Digest auth does not work with hashed passwords. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zhus added the pull-request label 2026-04-08 16:53:23 +03:00
zhus closed this issue 2026-04-08 16:53:23 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#548