rest_router: fix security problem

Signed-off-by: Takeshi <a86487817@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Takeshi 2014-10-26 21:21:47 +09:00 committed by FUJITA Tomonori
parent df2cf837ab
commit 16ea9e4701

View File

@ -410,7 +410,7 @@ class RouterController(ControllerBase):
def _access_router(self, switch_id, vlan_id, func, rest_param):
rest_message = []
routers = self._get_router(switch_id)
param = eval(rest_param) if rest_param else {}
param = json.loads(rest_param) if rest_param else {}
for router in routers.values():
function = getattr(router, func)
data = function(vlan_id, param, self.waiters)