mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #2966] [MERGED] feat(db)!: hash passwords with bcrypt in database #5312
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#5312
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/2966
Author: @Columbiysky
Created: 5/2/2025
Status: ✅ Merged
Merged: 5/3/2025
Merged by: @sh1shd
Base:
main← Head:hash-user-passwords📝 Commits (4)
84dbcf7feat(db)!: crypting user password as SHA256049e0c4feat(db): migration, and seeder hash existing passwords579c73drefactor(db): a bit better codedaec80frefactor(crypto,db): using bcrypt and bcrypt.CompareHashAndPassword instead of SHA256📊 Changes
5 files changed (+101 additions, -10 deletions)
View changed files
📝
database/db.go(+54 -3)📝
database/model/model.go(+5 -0)➕
util/crypto/crypto.go(+15 -0)📝
web/controller/setting.go(+3 -2)📝
web/service/user.go(+24 -5)📄 Description
What is the pull request?
Storing users passwords as a plain text isn't good idea generally. This PR contains changes to hash passwords with SHA256 in DB.
This PR is just an idea, if maintainers will accept it, I'll write better code for this.
I've tested:
Which part of the application is affected by the change?
Type of Changes
Screenshots
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.