Marios Andreopoulos před 10 roky
rodič
revize
cd0ddcfa01
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      routers/user/setting.go

+ 1 - 1
routers/user/setting.go

@@ -172,7 +172,7 @@ func SettingsSSHKeysPost(ctx *middleware.Context, form auth.AddSSHKeyForm) {
 		}
 
 		// Remove newline characters from form.KeyContent
-		cleanContent := strings.Replace(form.Content, "\n", "", -1)
+		cleanContent := string.Replace(form.Content, "\n", "", -1)
 
 		if ok, err := models.CheckPublicKeyString(cleanContent); !ok {
 			ctx.Flash.Error(ctx.Tr("form.invalid_ssh_key", err.Error()))