mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
#1681 some fixes for builtin SSH server on Windows
This commit is contained in:
@@ -222,6 +222,7 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
|
||||
}
|
||||
|
||||
// Test repository root path.
|
||||
form.RepoRootPath = strings.Replace(form.RepoRootPath, "\\", "/", -1)
|
||||
if err := os.MkdirAll(form.RepoRootPath, os.ModePerm); err != nil {
|
||||
ctx.Data["Err_RepoRootPath"] = true
|
||||
ctx.RenderWithErr(ctx.Tr("install.invalid_repo_path", err), INSTALL, &form)
|
||||
|
@@ -84,13 +84,13 @@ func HTTP(ctx *middleware.Context) {
|
||||
|
||||
// check access
|
||||
if askAuth {
|
||||
baHead := ctx.Req.Header.Get("Authorization")
|
||||
if baHead == "" {
|
||||
authHead := ctx.Req.Header.Get("Authorization")
|
||||
if len(authHead) == 0 {
|
||||
authRequired(ctx)
|
||||
return
|
||||
}
|
||||
|
||||
auths := strings.Fields(baHead)
|
||||
auths := strings.Fields(authHead)
|
||||
// currently check basic auth
|
||||
// TODO: support digit auth
|
||||
// FIXME: middlewares/context.go did basic auth check already,
|
||||
|
Reference in New Issue
Block a user