kenhuuu commented on code in PR #3586:
URL: https://github.com/apache/tinkerpop/pull/3586#discussion_r3849845655


##########
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapper.java:
##########
@@ -288,6 +492,18 @@ public Builder typeInfo(final TypeInfo typeInfo) {
             return this;
         }
 
+        /**
+         * Adds a class-name prefix that GraphSON 1.0 embedded-type 
deserialization will accept in a {@code @class}
+         * property, in addition to the safe defaults ({@code java.lang.}, 
{@code java.util.}, {@code java.math.},
+         * {@code java.time.}, {@code org.apache.tinkerpop.} and array types). 
Use this to re-enable a provider or
+         * application type read from trusted input; a graph document from an 
untrusted source should not be granted
+         * additional prefixes. Has no effect on GraphSON 2.0 or 3.0, which 
resolve types through a fixed registry.
+         */
+        public Builder addAllowedTypeIdPrefix(final String... prefixes) {

Review Comment:
   Should this have a matching denyTypeIdPrefix() in case the current allowed 
list is too permissive?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to