summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-12-22 23:52:57 +0000
committerGitHub <noreply@github.com>2021-12-22 23:52:57 +0000
commitba6efb105abd2a64b53491952a96a0a7af4b5ab9 (patch)
tree2950ef5c25a8e9351f9e40eff6e98b6f815bb1e4 /modules
parentd097fd6be687e7f647e8679a0586d9a1a7bcf2bd (diff)
downloadgitea-ba6efb105abd2a64b53491952a96a0a7af4b5ab9.tar.gz
gitea-ba6efb105abd2a64b53491952a96a0a7af4b5ab9.zip
Quote references to the user table in consistency checks (#18072)
Although #17487 ensured that the table was quoted in the join it missed that the query part of the check also needed to be quoted. Fix #17485 Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules')
-rw-r--r--modules/doctor/dbconsistency.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/doctor/dbconsistency.go b/modules/doctor/dbconsistency.go
index e5f0c5678d..cd34994e1a 100644
--- a/modules/doctor/dbconsistency.go
+++ b/modules/doctor/dbconsistency.go
@@ -167,13 +167,13 @@ func checkDBConsistency(logger log.Logger, autofix bool) error {
"lfs_lock", "repository", "lfs_lock.repo_id=repository.id"),
// find collaborations without users
genericOrphanCheck("Collaborations without existing user",
- "collaboration", "user", "collaboration.user_id=user.id"),
+ "collaboration", "user", "collaboration.user_id=`user`.id"),
// find collaborations without repository
genericOrphanCheck("Collaborations without existing repository",
"collaboration", "repository", "collaboration.repo_id=repository.id"),
// find access without users
genericOrphanCheck("Access entries without existing user",
- "access", "user", "access.user_id=user.id"),
+ "access", "user", "access.user_id=`user`.id"),
// find access without repository
genericOrphanCheck("Access entries without existing repository",
"access", "repository", "access.repo_id=repository.id"),