[PR #3334] [MERGED] Cleanup models.User.HashPassword #16892

Closed
opened 2025-11-02 12:21:30 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/3334
Author: @bkcsoft
Created: 1/8/2018
Status: Merged
Merged: 1/11/2018
Merged by: @lafriks

Base: masterHead: cleanup-user-hashpassword


📝 Commits (3)

  • 3435bf7 Cleanup models.User.HashPassword
  • a998961 Remove unneeded variable
  • 7de35ca Merge branch 'master' into cleanup-user-hashpassword

📊 Changes

7 files changed (+18 additions, -23 deletions)

View changed files

📝 cmd/admin.go (+1 -2)
📝 models/user.go (+10 -7)
📝 models/user_test.go (+3 -6)
📝 routers/admin/users.go (+1 -2)
📝 routers/api/v1/admin/user.go (+1 -2)
📝 routers/user/auth.go (+1 -2)
📝 routers/user/setting.go (+1 -2)

📄 Description

Makes it deterministic even if ran twice.

Something like this would previously break the users password:

u.Passwd = "foobar"
u.HashPassword()
u.HashPassword()

🔄 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/go-gitea/gitea/pull/3334 **Author:** [@bkcsoft](https://github.com/bkcsoft) **Created:** 1/8/2018 **Status:** ✅ Merged **Merged:** 1/11/2018 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `cleanup-user-hashpassword` --- ### 📝 Commits (3) - [`3435bf7`](https://github.com/go-gitea/gitea/commit/3435bf72bf224362fd8c57ee2251ab97d53c6068) Cleanup models.User.HashPassword - [`a998961`](https://github.com/go-gitea/gitea/commit/a99896175d4ed1b7fe31e1e0bfc38efbac46c92a) Remove unneeded variable - [`7de35ca`](https://github.com/go-gitea/gitea/commit/7de35ca58e03b02dcb8a244c71ffd4961b3d5c27) Merge branch 'master' into cleanup-user-hashpassword ### 📊 Changes **7 files changed** (+18 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `cmd/admin.go` (+1 -2) 📝 `models/user.go` (+10 -7) 📝 `models/user_test.go` (+3 -6) 📝 `routers/admin/users.go` (+1 -2) 📝 `routers/api/v1/admin/user.go` (+1 -2) 📝 `routers/user/auth.go` (+1 -2) 📝 `routers/user/setting.go` (+1 -2) </details> ### 📄 Description Makes it deterministic even if ran twice. Something like this would previously break the users password: ``` u.Passwd = "foobar" u.HashPassword() u.HashPassword() ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:21:30 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16892