From 697d912475bc32a0d1922563fef692d827091a69082a7549c59119d865a5672b Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 21 Mar 2024 08:39:20 +0000 Subject: [PATCH] Accepting request 1159820 from home:urbic:branches:Java:packages - Update to v21.4 * This is a special release to help control introspection queries. This release adds a default check for introspection queries, to check that they are sensible. This feature is a backport of #3526 and #3527. This release also adds an optional maximum result nodes limit, which is a backport of #3525. * What's Changed + 21.x Backport PR 3526 and PR 3527 by @dondonz in #3529 + 21.x backport 3525 max result nodes by @dondonz in #3528 - Modify patch: * java8.patch + add some new occurrences OBS-URL: https://build.opensuse.org/request/show/1159820 OBS-URL: https://build.opensuse.org/package/show/Java:packages/graphql-java?expand=0&rev=8 --- graphql-java-21.3.tar.gz | 3 -- ...hql-java-21.3.pom => graphql-java-21.4.pom | 2 +- graphql-java-21.4.tar.gz | 3 ++ graphql-java.changes | 16 +++++++ graphql-java.spec | 4 +- java8.patch | 46 +++++++++++++++++++ 6 files changed, 68 insertions(+), 6 deletions(-) delete mode 100644 graphql-java-21.3.tar.gz rename graphql-java-21.3.pom => graphql-java-21.4.pom (98%) create mode 100644 graphql-java-21.4.tar.gz diff --git a/graphql-java-21.3.tar.gz b/graphql-java-21.3.tar.gz deleted file mode 100644 index d12e6f9..0000000 --- a/graphql-java-21.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3e8c74ecabbc211d968ef5a0fb86cecfbbd327d71bb2064908bd6973ad90341f -size 2127921 diff --git a/graphql-java-21.3.pom b/graphql-java-21.4.pom similarity index 98% rename from graphql-java-21.3.pom rename to graphql-java-21.4.pom index e60dbb2..4fac30a 100644 --- a/graphql-java-21.3.pom +++ b/graphql-java-21.4.pom @@ -3,7 +3,7 @@ 4.0.0 com.graphql-java graphql-java - 21.3 + 21.4 com.graphql-java diff --git a/graphql-java-21.4.tar.gz b/graphql-java-21.4.tar.gz new file mode 100644 index 0000000..97ab53e --- /dev/null +++ b/graphql-java-21.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b421986e0a357e951c1f4e4a5eb95e1875450ba605655f799d0265185642e4c8 +size 2131840 diff --git a/graphql-java.changes b/graphql-java.changes index 2cae014..5861799 100644 --- a/graphql-java.changes +++ b/graphql-java.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Wed Mar 20 11:41:11 UTC 2024 - Anton Shvetz + +- Update to v21.4 + * This is a special release to help control introspection + queries. This release adds a default check for introspection + queries, to check that they are sensible. This feature is a + backport of #3526 and #3527. This release also adds an optional + maximum result nodes limit, which is a backport of #3525. + * What's Changed + + 21.x Backport PR 3526 and PR 3527 by @dondonz in #3529 + + 21.x backport 3525 max result nodes by @dondonz in #3528 +- Modify patch: + * java8.patch + + add some new occurrences + ------------------------------------------------------------------- Wed Feb 21 10:44:23 UTC 2024 - Gus Kenion diff --git a/graphql-java.spec b/graphql-java.spec index 843385e..08cb297 100644 --- a/graphql-java.spec +++ b/graphql-java.spec @@ -1,7 +1,7 @@ # # spec file for package graphql-java # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: graphql-java -Version: 21.3 +Version: 21.4 Release: 0 Summary: GraphQL Java implementation License: MIT diff --git a/java8.patch b/java8.patch index 9bc360d..ac0dc4e 100644 --- a/java8.patch +++ b/java8.patch @@ -131,3 +131,49 @@ diff -up graphql-java-21.3/src/main/java/graphql/normalized/ExecutableNormalized } /** +diff -up graphql-java-21.4/src/main/java/graphql/introspection/GoodFaithIntrospection.java.p01 graphql-java-21.4/src/main/java/graphql/introspection/GoodFaithIntrospection.java +--- graphql-java-21.4/src/main/java/graphql/introspection/GoodFaithIntrospection.java.p01 2024-03-20 14:28:06.287481694 +0300 ++++ graphql-java-21.4/src/main/java/graphql/introspection/GoodFaithIntrospection.java 2024-03-20 14:38:54.767615425 +0300 +@@ -63,15 +63,17 @@ public class GoodFaithIntrospection { + return ENABLED_STATE.getAndSet(flag); + } + +- private static final Map ALLOWED_FIELD_INSTANCES = Map.of( +- coordinates("Query", "__schema"), 1 +- , coordinates("Query", "__type"), 1 +- +- , coordinates("__Type", "fields"), 1 +- , coordinates("__Type", "inputFields"), 1 +- , coordinates("__Type", "interfaces"), 1 +- , coordinates("__Type", "possibleTypes"), 1 +- ); ++ private static final Map ALLOWED_FIELD_INSTANCES; ++ static ++ { ++ ALLOWED_FIELD_INSTANCES=new java.util.HashMap<>(); ++ ALLOWED_FIELD_INSTANCES.put(coordinates("Query", "__schema"), 1); ++ ALLOWED_FIELD_INSTANCES.put(coordinates("Query", "__type"), 1); ++ ALLOWED_FIELD_INSTANCES.put(coordinates("__Type", "fields"), 1); ++ ALLOWED_FIELD_INSTANCES.put(coordinates("__Type", "inputFields"), 1); ++ ALLOWED_FIELD_INSTANCES.put(coordinates("__Type", "interfaces"), 1); ++ ALLOWED_FIELD_INSTANCES.put(coordinates("__Type", "possibleTypes"), 1); ++ } + + public static Optional checkIntrospection(ExecutionContext executionContext) { + if (isIntrospectionEnabled(executionContext.getGraphQLContext())) { +diff -up graphql-java-21.4/src/main/java/graphql/schema/visibility/NoIntrospectionGraphqlFieldVisibility.java.p01 graphql-java-21.4/src/main/java/graphql/schema/visibility/NoIntrospectionGraphqlFieldVisibility.java +--- graphql-java-21.4/src/main/java/graphql/schema/visibility/NoIntrospectionGraphqlFieldVisibility.java.p01 2024-03-20 14:34:17.100132704 +0300 ++++ graphql-java-21.4/src/main/java/graphql/schema/visibility/NoIntrospectionGraphqlFieldVisibility.java 2024-03-20 14:34:37.740391591 +0300 +@@ -17,10 +17,10 @@ import static graphql.schema.visibility. + * can be used instead + */ + @PublicApi +-@Deprecated(since = "2024-03-16") ++@Deprecated + public class NoIntrospectionGraphqlFieldVisibility implements GraphqlFieldVisibility { + +- @Deprecated(since = "2024-03-16") ++ @Deprecated + public static NoIntrospectionGraphqlFieldVisibility NO_INTROSPECTION_FIELD_VISIBILITY = new NoIntrospectionGraphqlFieldVisibility(); + +