From fe48c0f4f2e05df15c9f05aa93efde24e080eb37 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Fri, 15 Nov 2019 00:30:30 +0100 Subject: [PATCH] Revert the taggedCount and postCount We need the order input types for our admin features. This is a potential DOS vulnerability: Ordering the tags by taggedCount might lead to very expensive cypher statements. --- backend/src/schema/types/type/Category.gql | 2 ++ backend/src/schema/types/type/Tag.gql | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/backend/src/schema/types/type/Category.gql b/backend/src/schema/types/type/Category.gql index 9805344d1..39efeff9d 100644 --- a/backend/src/schema/types/type/Category.gql +++ b/backend/src/schema/types/type/Category.gql @@ -11,6 +11,8 @@ enum _CategoryOrdering { createdAt_desc updatedAt_asc updatedAt_desc + postCount_asc + postCount_desc } type Category { diff --git a/backend/src/schema/types/type/Tag.gql b/backend/src/schema/types/type/Tag.gql index 8da899027..41a772e4d 100644 --- a/backend/src/schema/types/type/Tag.gql +++ b/backend/src/schema/types/type/Tag.gql @@ -27,6 +27,10 @@ type Tag { enum _TagOrdering { id_asc id_desc + taggedCount_asc + taggedCount_desc + taggedCountUnique_asc + taggedCountUnique_desc } type Query {