Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

fixed Arbitrary Code Execution #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions tensorflow/python/keras/saving/model_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ def model_from_yaml(yaml_string, custom_objects=None):
raise ImportError('Requires yaml module installed (`pip install pyyaml`).')
# The method unsafe_load only exists in PyYAML 5.x+, so which branch of the
# try block is covered by tests depends on the installed version of PyYAML.
try:
#try:
# PyYAML 5.x+
config = yaml.unsafe_load(yaml_string)
except AttributeError:
config = yaml.load(yaml_string)
# config = yaml.safe_load(yaml_string)
#except AttributeError:
# config = yaml.safe_load(yaml_string)
config = yaml.safe_load(yaml_string)
from tensorflow.python.keras.layers import deserialize # pylint: disable=g-import-not-at-top
return deserialize(config, custom_objects=custom_objects)

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/tools/ci_build/Dockerfile.micro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Use a prebuilt Python image instead of base Ubuntu to speed up the build process,
# since it has all the build dependencies we need for Micro and downloads much faster
# than the install process.
FROM python:3.9.0-buster
FROM python:3.9-buster

LABEL maintainer="Pete Warden <[email protected]>"

Expand Down