From 6e52f48dbad2d39ebe124e6926e78fd0bca29adb Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Fri, 9 Sep 2016 16:50:48 +0800 Subject: 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 --- result_collection_api/opnfv_testapi/tests/unit/test_result.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'result_collection_api/opnfv_testapi/tests/unit/test_result.py') diff --git a/result_collection_api/opnfv_testapi/tests/unit/test_result.py b/result_collection_api/opnfv_testapi/tests/unit/test_result.py index eee06c6..8479b35 100644 --- a/result_collection_api/opnfv_testapi/tests/unit/test_result.py +++ b/result_collection_api/opnfv_testapi/tests/unit/test_result.py @@ -305,7 +305,7 @@ class TestResultGet(TestResultBase): def _set_query(self, *args): def get_value(arg): - return eval('self.' + arg) \ + return self.__getattribute__(arg) \ if arg != 'trust_indicator' else self.trust_indicator.current uri = '' for arg in args: -- cgit 1.2.3-korg