mirror of
https://github.com/gogs/gogs.git
synced 2026-02-28 09:10:57 +01:00
Compare commits
4 Commits
latest-com
...
v0.14.1-rc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5c8030c1f | ||
|
|
8c5c0125c4 | ||
|
|
3f03530042 | ||
|
|
36c26c4ccc |
@@ -4,6 +4,10 @@ All notable changes to Gogs are documented in this file.
|
||||
|
||||
## 0.15.0+dev (`main`)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Git clone via the built-in SSH server hangs. [#8132](https://github.com/gogs/gogs/issues/8132)
|
||||
|
||||
## 0.14.0
|
||||
|
||||
### Added
|
||||
|
||||
2
gogs.go
2
gogs.go
@@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
conf.App.Version = "0.14.0+dev"
|
||||
conf.App.Version = "0.14.1"
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -70,7 +70,7 @@ func Init(customConf string) error {
|
||||
if err = File.Append(customConf); err != nil {
|
||||
return errors.Wrapf(err, "append %q", customConf)
|
||||
}
|
||||
} else {
|
||||
} else if !HookMode {
|
||||
log.Warn("Custom config %q not found. Ignore this warning if you're running for the first time", customConf)
|
||||
}
|
||||
|
||||
@@ -142,9 +142,11 @@ func Init(customConf string) error {
|
||||
}
|
||||
|
||||
if IsWindowsRuntime() || semverutil.Compare(sshVersion, "<", "5.1") {
|
||||
log.Warn(`SSH minimum key size check is forced to be disabled because server is not eligible:
|
||||
if !HookMode {
|
||||
log.Warn(`SSH minimum key size check is forced to be disabled because server is not eligible:
|
||||
1. Windows server
|
||||
2. OpenSSH version is lower than 5.1`)
|
||||
}
|
||||
} else {
|
||||
SSH.MinimumKeySizes = map[string]int{}
|
||||
for _, key := range File.Section("ssh.minimum_key_sizes").Keys() {
|
||||
@@ -346,8 +348,10 @@ func Init(customConf string) error {
|
||||
LFS.ObjectsPath = ensureAbs(LFS.ObjectsPath)
|
||||
|
||||
handleDeprecated()
|
||||
for _, warning := range checkInvalidOptions(File) {
|
||||
log.Warn("%s", warning)
|
||||
if !HookMode {
|
||||
for _, warning := range checkInvalidOptions(File) {
|
||||
log.Warn("%s", warning)
|
||||
}
|
||||
}
|
||||
|
||||
if err = File.Section("cache").MapTo(&Cache); err != nil {
|
||||
|
||||
@@ -444,7 +444,7 @@ func checkInvalidOptions(config *ini.File) (warnings []string) {
|
||||
"service": "auth",
|
||||
}
|
||||
for oldSection, newSection := range renamedSections {
|
||||
if config.Section(oldSection).KeyStrings() != nil {
|
||||
if len(config.Section(oldSection).KeyStrings()) > 0 {
|
||||
warnings = append(warnings, fmt.Sprintf("section [%s] is invalid, use [%s] instead", oldSection, newSection))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,6 @@ func TestCheckInvalidOptions(t *testing.T) {
|
||||
"section [service] is invalid, use [auth] instead",
|
||||
"option [server] ROOT_URL is invalid, use [server] EXTERNAL_URL instead",
|
||||
"option [server] LANDING_PAGE is invalid, use [server] LANDING_URL instead",
|
||||
|
||||
"option [server] NONEXISTENT_OPTION is invalid",
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@ func handleServerConn(keyID string, chans <-chan ssh.NewChannel) {
|
||||
_ = req.Reply(true, nil)
|
||||
go func() {
|
||||
_, _ = io.Copy(input, ch)
|
||||
input.Close()
|
||||
}()
|
||||
_, _ = io.Copy(ch, stdout)
|
||||
_, _ = io.Copy(ch.Stderr(), stderr)
|
||||
@@ -187,7 +188,6 @@ func setupHostKeys(appDataPath string, algorithms []string) ([]ssh.Signer, error
|
||||
conf.SSH.KeygenPath,
|
||||
"-t", algo,
|
||||
"-f", keyPath,
|
||||
"-m", "PEM",
|
||||
"-N", run.Arg(""),
|
||||
}
|
||||
err = run.Cmd(context.Background(), args...).Run().Wait()
|
||||
|
||||
Reference in New Issue
Block a user