Browse Source

Remove env user salt since no need to use (#1515)

* remove env user salt since no need to use

* remove unused variable from update.go
Lunny Xiao 2 years ago
parent
commit
930d1759ae
3 changed files with 0 additions and 4 deletions
  1. 0 2
      cmd/serv.go
  2. 0 1
      models/update.go
  3. 0 1
      routers/repo/http.go

+ 0 - 2
cmd/serv.go

@@ -164,8 +164,6 @@ func runServ(c *cli.Context) error {
164 164
 		fail("Internal error", "Failed to get repository owner (%s): %v", username, err)
165 165
 	}
166 166
 
167
-	os.Setenv(models.EnvRepoUserSalt, repoUser.Salt)
168
-
169 167
 	repo, err := models.GetRepositoryByName(repoUser.ID, reponame)
170 168
 	if err != nil {
171 169
 		if models.IsErrRepoNotExist(err) {

+ 0 - 1
models/update.go

@@ -19,7 +19,6 @@ import (
19 19
 const (
20 20
 	EnvRepoName     = "GITEA_REPO_NAME"
21 21
 	EnvRepoUsername = "GITEA_REPO_USER_NAME"
22
-	EnvRepoUserSalt = "GITEA_REPO_USER_SALT"
23 22
 	EnvRepoIsWiki   = "GITEA_REPO_IS_WIKI"
24 23
 	EnvPusherName   = "GITEA_PUSHER_NAME"
25 24
 	EnvPusherID     = "GITEA_PUSHER_ID"

+ 0 - 1
routers/repo/http.go

@@ -207,7 +207,6 @@ func HTTP(ctx *context.Context) {
207 207
 		environ = []string{
208 208
 			models.EnvRepoUsername + "=" + username,
209 209
 			models.EnvRepoName + "=" + reponame,
210
-			models.EnvRepoUserSalt + "=" + repoUser.Salt,
211 210
 			models.EnvPusherName + "=" + authUser.Name,
212 211
 			models.EnvPusherID + fmt.Sprintf("=%d", authUser.ID),
213 212
 			models.ProtectedBranchRepoID + fmt.Sprintf("=%d", repo.ID),