diff options
author | Unknwon <u@gogs.io> | 2017-06-11 02:28:08 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-06-11 02:28:08 -0400 |
commit | 23b83cb73669c98e66095aee2c37ac9d0cf97162 (patch) | |
tree | 43f6d6b60017b4a9893e51c8146d22d58d1c3a91 /models/ssh_key.go | |
parent | e16196124eff47924691b3e5c70c6f4d5dcca9b1 (diff) |
pkg/process: fix potential race condition
Following conditions were not protected:
1. Use and increase next pid
2. Append and remove process from the list
Diffstat (limited to 'models/ssh_key.go')
-rw-r--r-- | models/ssh_key.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/ssh_key.go b/models/ssh_key.go index 798c58f2..00dc1af7 100644 --- a/models/ssh_key.go +++ b/models/ssh_key.go @@ -289,7 +289,7 @@ func CheckPublicKeyString(content string) (_ string, err error) { return "", errors.New("only a single line with a single key please") } - // remove any unnecessary whitespace now + // Remove any unnecessary whitespace content = strings.TrimSpace(content) if !setting.SSH.MinimumKeySizeCheck { |