mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Make sure that a mirror can't be written to by http or ssh
This commit is contained in:
@@ -158,6 +158,11 @@ func Http(ctx *middleware.Context) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if !isPull && repo.IsMirror {
|
||||
ctx.Handle(401, "can't push to mirror", nil)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user