Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Safer sort

Chocobozzz00917fb8f1f3
diff --git a/server/core/models/shared/abstract-run-query.ts b/server/core/models/shared/abstract-run-query.ts
index 12187f851c..34d357fa1a 100644
--- a/server/core/models/shared/abstract-run-query.ts
+++ b/server/core/models/shared/abstract-run-query.ts
@@ -55,6 +55,8 @@ export class AbstractRunQuery {
const direction = o[1]
+ if (columnName.includes(' ')) throw new Error('Invalid column name: ' + columnName)
+
// Prefix with the table name if the column name isn't a full path
// ("id", "displayName", etc. VS "ActorModel.id", "Server.redundancyAllowed", etc.)
const prefix = calculatedAttributes.includes(columnName) || columnName.includes('.')