mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 02:10:40 +00:00
remove extra comma
This commit is contained in:
parent
12639c577f
commit
b40922f4d4
1 changed files with 1 additions and 1 deletions
|
@ -172,7 +172,7 @@ func SettingsSSHKeysPost(ctx *middleware.Context, form auth.AddSSHKeyForm) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove newline characters from form.KeyContent
|
// Remove newline characters from form.KeyContent
|
||||||
cleanKeyContent := strings.Replace(form.KeyContent, "\n", "", -1),
|
cleanKeyContent := strings.Replace(form.KeyContent, "\n", "", -1)
|
||||||
|
|
||||||
if ok, err := models.CheckPublicKeyString(cleanKeyContent); !ok {
|
if ok, err := models.CheckPublicKeyString(cleanKeyContent); !ok {
|
||||||
ctx.Flash.Error(ctx.Tr("form.invalid_ssh_key", err.Error()))
|
ctx.Flash.Error(ctx.Tr("form.invalid_ssh_key", err.Error()))
|
||||||
|
|
Loading…
Reference in a new issue