mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-04 14:46:57 -05:00
580e21dd2e
Gitea instance keeps reporting a lot of errors like "LFS SSH transfer connection denied, pure SSH protocol is disabled". When starting debugging the problem, there are more problems found. Try to address most of them: * avoid unnecessary server side error logs (change `fail()` to not log them) * figure out the broken tests/user2/lfs.git (added comments) * avoid `migratePushMirrors` failure when a repository doesn't exist (ignore them) * avoid "Authorization" (internal&lfs) header conflicts, remove the tricky "swapAuth" and use "X-Gitea-Internal-Auth" * make internal token comparing constant time (it wasn't a serous problem because in a real world it's nearly impossible to timing-attack the token, but good to fix and backport) * avoid duplicate routers (introduce AddOwnerRepoGitLFSRoutes) * avoid "internal (private)" routes using session/web context (they should use private context) * fix incorrect "path" usages (use "filepath") * fix incorrect mocked route point handling (need to check func nil correctly) * split some tests from "git general tests" to "git misc tests" (to keep "git_general_test.go" simple) Still no correct result for Git LFS SSH tests. So the code is kept there (`tests/integration/git_lfs_ssh_test.go`) and a FIXME explains the details.
49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
# These are the LFS objects in user2/lfs.git
|
|
# user2/lfs is an INVALID repository
|
|
#
|
|
# commit e9c32647bab825977942598c0efa415de300304b (HEAD -> master)
|
|
# Author: Rowan Bohde <rowan.bohde@gmail.com>
|
|
# Date: Thu Aug 1 14:38:23 2024 -0500
|
|
#
|
|
# add invalid lfs file
|
|
-
|
|
|
|
id: 1
|
|
oid: 0b8d8b5f15046343fd32f451df93acc2bdd9e6373be478b968e4cad6b6647351
|
|
size: 107
|
|
repository_id: 54
|
|
created_unix: 1671607299
|
|
|
|
-
|
|
|
|
id: 2
|
|
oid: 2eccdb43825d2a49d99d542daa20075cff1d97d9d2349a8977efe9c03661737c
|
|
size: 107 # real size is 2048
|
|
repository_id: 54
|
|
created_unix: 1671607299
|
|
|
|
-
|
|
|
|
id: 3
|
|
oid: 7b6b2c88dba9f760a1a58469b67fee2b698ef7e9399c4ca4f34a14ccbe39f623
|
|
size: 27
|
|
repository_id: 54
|
|
created_unix: 1671607299
|
|
|
|
-
|
|
|
|
id: 4
|
|
oid: 9d172e5c64b4f0024b9901ec6afe9ea052f3c9b6ff9f4b07956d8c48c86fca82
|
|
size: 25
|
|
repository_id: 54
|
|
created_unix: 1671607299
|
|
|
|
# this file is missing
|
|
# -
|
|
#
|
|
# id: 5
|
|
# oid: 9d178b5f15046343fd32f451df93acc2bdd9e6373be478b968e4cad6b6647351
|
|
# size: 25
|
|
# repository_id: 54
|
|
# created_unix: 1671607299
|