Replace yaml.load with yaml.safe_load;And replace yaml.dump with yaml.safe_load

Bug #1673294 reported by WangBinbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Fix Released
Medium
WangBinbin

Bug Description

yaml.load is a security risk, should use yaml.safe_load.

yaml.safe_load is more safer than yaml.load.
The input data of yaml.load is not always to be trusted. Replace the yaml.load If we have a better one.

replace yaml.dump with yaml.safe_dump

WangBinbin (bbwang5827)
Changed in tacker:
assignee: nobody → WangBinbin (bbwang5827)
Changed in tacker:
status: New → In Progress
Revision history for this message
WangBinbin (bbwang5827) wrote :
Changed in tacker:
milestone: none → pike-1
importance: Undecided → Medium
WangBinbin (bbwang5827)
summary: - Replace yaml.load with yaml.safe_load
+ Replace yaml.load with yaml.safe_load;And replace yaml.dump with
+ yaml.safe_load
description: updated
Changed in tacker:
assignee: WangBinbin (bbwang5827) → yong sheng gong (gongysh)
WangBinbin (bbwang5827)
Changed in tacker:
assignee: yong sheng gong (gongysh) → WangBinbin (bbwang5827)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker (master)

Reviewed: https://review.openstack.org/445784
Committed: https://git.openstack.org/cgit/openstack/tacker/commit/?id=4889515fcf1a684a159dfb5add111c5bd16c947f
Submitter: Jenkins
Branch: master

commit 4889515fcf1a684a159dfb5add111c5bd16c947f
Author: WangBinbin <email address hidden>
Date: Wed Mar 15 07:11:04 2017 +0800

    Replace yaml.load with yaml.safe_load;
    Replace yaml.dump with yaml.safe_dump;

    In the file
     /vnfm/infra_drivers/openstack/translate_template.py#L453
     /vnfm/tosca/utils.py#L267

    The default yaml.safe_dump does not support OrderedDict,
    So Add one function for the yaml.safe_dump in the files above

    yaml.safe_load is more safer than yaml.load, that's the patch meaning

    Change-Id: Iab0e976b1163220bd78c2ceda83243c2da4c6624
    Closes-Bug: #1673294

Changed in tacker:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tacker 0.8.0

This issue was fixed in the openstack/tacker 0.8.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.