|
|
|
@ -1,7 +1,8 @@
|
|
|
|
|
Index: pkg/mod/github.com/go-openapi/validate@v0.20.2/fixtures/validation/fixture-additional-items
|
|
|
|
|
Index: src/github.com/go-gitea/gitea/models/repo.go
|
|
|
|
|
--- src/github.com/go-gitea/gitea/models/repo.go.orig 2020-10-02 20:32:25.000000000 +0200
|
|
|
|
|
+++ src/github.com/go-gitea/gitea/models/repo.go 2020-10-02 20:32:23.917980000 +0200
|
|
|
|
|
@@ -1032,11 +1032,23 @@
|
|
|
|
|
--- src/github.com/go-gitea/gitea/models/repo.go.orig 2021-08-05 19:43:23.000000000 +0200
|
|
|
|
|
+++ src/github.com/go-gitea/gitea/models/repo.go 2021-08-06 09:18:22.283172000 +0200
|
|
|
|
|
@@ -941,11 +941,23 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if setting.SSH.Port != 22 {
|
|
|
|
@ -28,24 +29,15 @@ Index: src/github.com/go-gitea/gitea/models/repo.go
|
|
|
|
|
}
|
|
|
|
|
cl.HTTPS = ComposeHTTPSCloneURL(repo.OwnerName, repoName)
|
|
|
|
|
return cl
|
|
|
|
|
Index: src/github.com/go-gitea/gitea/models/ssh_key.go
|
|
|
|
|
--- src/github.com/go-gitea/gitea/models/ssh_key.go.orig 2020-10-02 20:32:23.918268000 +0200
|
|
|
|
|
+++ src/github.com/go-gitea/gitea/models/ssh_key.go 2020-10-02 20:34:04.959822000 +0200
|
|
|
|
|
@@ -38,7 +38,7 @@
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
tplCommentPrefix = `# gitea public key`
|
|
|
|
|
- tplCommand = "%s --config=%s serv key-%d"
|
|
|
|
|
+ tplCommand = "%s --config=%s key-%d"
|
|
|
|
|
tplPublicKey = tplCommentPrefix + "\n" + `command=%s,no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty %s` + "\n"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -84,7 +84,7 @@
|
|
|
|
|
|
|
|
|
|
// AuthorizedString returns formatted public key string for authorized_keys file.
|
|
|
|
|
func (key *PublicKey) AuthorizedString() string {
|
|
|
|
|
- return fmt.Sprintf(tplPublicKey, util.ShellEscape(fmt.Sprintf(tplCommand, util.ShellEscape(setting.AppPath), util.ShellEscape(setting.CustomConf), key.ID)), key.Content)
|
|
|
|
|
+ return fmt.Sprintf(tplPublicKey, util.ShellEscape(fmt.Sprintf(tplCommand, util.ShellEscape("@l_prefix@/sbin/gitea-serv"), util.ShellEscape(setting.CustomConf), key.ID)), key.Content)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func extractTypeFromBase64Key(key string) (string, error) {
|
|
|
|
|
Index: src/github.com/go-gitea/gitea/models/ssh_key_authorized_keys.go
|
|
|
|
|
--- src/github.com/go-gitea/gitea/models/ssh_key_authorized_keys.go.orig 2021-08-05 19:43:23.000000000 +0200
|
|
|
|
|
+++ src/github.com/go-gitea/gitea/models/ssh_key_authorized_keys.go 2021-08-07 09:26:05.921313000 +0200
|
|
|
|
|
@@ -47,7 +47,7 @@
|
|
|
|
|
func AuthorizedStringForKey(key *PublicKey) string {
|
|
|
|
|
sb := &strings.Builder{}
|
|
|
|
|
_ = setting.SSH.AuthorizedKeysCommandTemplateTemplate.Execute(sb, map[string]interface{}{
|
|
|
|
|
- "AppPath": util.ShellEscape(setting.AppPath),
|
|
|
|
|
+ "AppPath": util.ShellEscape("@l_prefix@/sbin/gitea-serv"),
|
|
|
|
|
"AppWorkPath": util.ShellEscape(setting.AppWorkPath),
|
|
|
|
|
"CustomConf": util.ShellEscape(setting.CustomConf),
|
|
|
|
|
"CustomPath": util.ShellEscape(setting.CustomPath),
|
|
|
|
|