Skip to content

Commit

Permalink
Add java.util.UUID to trusted classes in Jackson serializer
Browse files Browse the repository at this point in the history
This class is safe to deserialize according to Jackson:
https://github.com/FasterXML/jackson-databind/blob/master/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java

This also has been checked against Jackson 2.11 to confirm
the backport of this enhancement to 4.3.x.

Resolves #4110
  • Loading branch information
fmbenhassine committed May 17, 2022
1 parent 72d9177 commit c0b8211
Showing 1 changed file with 2 additions and 1 deletion.
@@ -1,5 +1,5 @@
/*
* Copyright 2008-2021 the original author or authors.
* Copyright 2008-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -257,6 +257,7 @@ protected TypeIdResolver idResolver(MapperConfig<?> config,
*/
static class TrustedTypeIdResolver implements TypeIdResolver {
private static final Set<String> TRUSTED_CLASS_NAMES = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
"java.util.UUID",
"java.util.ArrayList",
"java.util.Arrays$ArrayList",
"java.util.LinkedList",
Expand Down

1 comment on commit c0b8211

@junyongz
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @fmbenhassine !

Please sign in to comment.