From 16ea9e4701800982afb2c53e5f132b006429dbf6 Mon Sep 17 00:00:00 2001 From: Takeshi Date: Sun, 26 Oct 2014 21:21:47 +0900 Subject: [PATCH] rest_router: fix security problem Signed-off-by: Takeshi Signed-off-by: FUJITA Tomonori --- ryu/app/rest_router.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/app/rest_router.py b/ryu/app/rest_router.py index 3a3592367..c57e003fd 100644 --- a/ryu/app/rest_router.py +++ b/ryu/app/rest_router.py @@ -410,7 +410,7 @@ def delete_vlan_data(self, req, switch_id, vlan_id, **_kwargs): 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)