diff options
author | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-09-09 16:50:48 +0800 |
---|---|---|
committer | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-09-14 10:53:33 +0800 |
commit | dd9e8643b72497eecdb4c80dc64f161b1562033b (patch) | |
tree | 29f8cd29a44ccac033bad571544df7aa3c487618 /utils/test/result_collection_api/opnfv_testapi/dashboard/bottlenecks2Dashboard.py | |
parent | 21f8156390bfaba48f8427f5cda8515becf675b3 (diff) |
Fix security issues of eval-s in testapi
results from security audit show risks and recommendations to fix them
JIRA: RELENG-144
Change-Id: If128cc3ae230150a912b581dfb1ded543d851eb5
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/result_collection_api/opnfv_testapi/dashboard/bottlenecks2Dashboard.py')
-rwxr-xr-x | utils/test/result_collection_api/opnfv_testapi/dashboard/bottlenecks2Dashboard.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/test/result_collection_api/opnfv_testapi/dashboard/bottlenecks2Dashboard.py b/utils/test/result_collection_api/opnfv_testapi/dashboard/bottlenecks2Dashboard.py index 2e106bec8..f5e3d9a6e 100755 --- a/utils/test/result_collection_api/opnfv_testapi/dashboard/bottlenecks2Dashboard.py +++ b/utils/test/result_collection_api/opnfv_testapi/dashboard/bottlenecks2Dashboard.py @@ -48,8 +48,8 @@ def format_bottlenecks_for_dashboard(case, results): then build the call to the specific method """ if check_bottlenecks_case_exist(case): - cmd = "format_" + case + "_for_dashboard(results)" - res = eval(cmd) + cmd = "format_" + case + "_for_dashboard" + res = globals()[cmd](results) else: res = [] print "Test cases not declared" |