Fix code scanning alert no. 8: Database query built from user-controlled sources

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
Denis Gukov 2024-09-28 17:06:16 +05:00 committed by GitHub
parent 8f25e35b89
commit 172a7536e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -498,7 +498,7 @@ func (d *SqlDb) getObjectsByReferrer(referrerID int, referringObjectProps db.Obj
}
if orderColumn != "" {
q = q.OrderBy("pe." + orderColumn + " " + orderDirection)
q = q.OrderBy(squirrel.Expr("pe." + orderColumn + " " + orderDirection))
}
query, args, err := q.ToSql()