Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit ed0d0c5

Browse files
authored
fix #288 (#289)
1 parent f48cc99 commit ed0d0c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/launchdarkly/sdk/server/integrations/FileDataSourceParsing.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
import com.launchdarkly.sdk.server.subsystems.DataStoreTypes.ItemDescriptor;
1111

1212
import org.yaml.snakeyaml.Yaml;
13+
import org.yaml.snakeyaml.constructor.SafeConstructor;
1314
import org.yaml.snakeyaml.error.YAMLException;
15+
import org.yaml.snakeyaml.representer.Representer;
1416

1517
import java.io.ByteArrayInputStream;
1618
import java.io.IOException;
@@ -149,7 +151,7 @@ public FlagFileRep parseJson(JsonElement tree) throws FileDataException, IOExcep
149151
* </ul>
150152
*/
151153
static final class YamlFlagFileParser extends FlagFileParser {
152-
private static final Yaml yaml = new Yaml();
154+
private static final Yaml yaml = new Yaml(new SafeConstructor(), new Representer());
153155
private static final Gson gson = new Gson();
154156
private static final JsonFlagFileParser jsonFileParser = new JsonFlagFileParser();
155157

0 commit comments

Comments
 (0)