fix security problem of some RESTful apps
fix security problem of some RESTful apps

It is not safe to use eval function because input data(request body)
is not checked For example, someone can send this data to remove all
files in the directory "import('os').system('rm -rf .')"

I suggest to use json.loads to parse the request body if the data is
json format or disable builtin functions like: eval(req.body,
{"__builtins__":None})

In this patch, ast.literal_eval() is used to evaluate REST body,
because ofctl_rest needs to be compatible with hexadecimal value
or ascii byte array (e.g. "\x00\x00\x00\x01" in Experimenter)
in order to keep usability.

Signed-off-by: Takeshi <769b085a2a82a4408df352b5e3ec66ebe856cd00@gmail.com>
Signed-off-by: IWASE Yusuke <bb80e84cc9f5a8f01385872ee89032beb5d4eba7@gmail.com>
Signed-off-by: FUJITA Tomonori <93dac1fe9c4b2a3957982200319981492ad4976e@lab.ntt.co.jp>

Tesi-Luca-Davide/ryu,umkcdcrg01/ryu_openflow,StephenKing/ryu,diogommartins/ryu,Zouyiran/ryu,iwaseyusuke/ryu,sivaramakrishnansr/ryu,lagopus/ryu-lagopus-ext,zangree/ryu,jalilm/ryu,haniehrajabi/ryu,fkakuma/ryu,hisaharu/ryu,haniehrajabi/ryu,John-Lin/ryu,lsqtongxin/ryu,castroflavio/ryu,ynkjm/ryu,lagopus/ryu-lagopus-ext,hisaharu/ryu,ttsubo/ryu,Tejas-Subramanya/RYU_MEC,fujita/ryu,habibiefaried/ryu,jkoelker/ryu,darjus-amzn/ryu,openvapour/ryu,John-Lin/ryu,umkcdcrg01/ryu_openflow,ysywh/ryu,diogommartins/ryu,jalilm/ryu,ysywh/ryu,umkcdcrg01/ryu_openflow,StephenKing/ryu,jazzmes/ryu,TakeshiTseng/ryu,StephenKing/ryu,fkakuma/ryu,sivaramakrishnansr/ryu,takahashiminoru/ryu,darjus-amzn/ryu,alyosha1879/ryu,jalilm/ryu,openvapour/ryu,iwaseyusuke/ryu,osrg/ryu,fujita/ryu,TakeshiTseng/ryu,evanscottgray/ryu,shinpeimuraoka/ryu,Tejas-Subramanya/RYU_MEC,openvapour/ryu,openvapour/ryu,darjus-amzn/ryu,haniehrajabi/ryu,jkoelker/ryu,haniehrajabi/ryu,alyosha1879/ryu,ttsubo/ryu,gareging/SDN_Framework,zangree/ryu,shinpeimuraoka/ryu,ysywh/ryu,alanquillin/ryu,alanquillin/ryu,pichuang/ryu,zyq001/ryu,OpenState-SDN/ryu,Tejas-Subramanya/RYU_MEC,lsqtongxin/ryu,lagopus/ryu-lagopus-ext,Zouyiran/ryu,evanscottgray/ryu,fujita/ryu,alanquillin/ryu,pichuang/ryu,alanquillin/ryu,OpenState-SDN/ryu,ttsubo/ryu,iwaseyusuke/ryu,diogommartins/ryu,zangree/ryu,TakeshiTseng/ryu,Tejas-Subramanya/RYU_MEC,pichuang/ryu,elahejalalpour/ELRyu,StephenKing/summerschool-2015-ryu,iwaseyusuke/ryu,alyosha1879/ryu,fkakuma/ryu,TakeshiTseng/ryu,shinpeimuraoka/ryu,fujita/ryu,alanquillin/ryu,lagopus/ryu-lagopus-ext,yamt/ryu,takahashiminoru/ryu,gopchandani/ryu,zangree/ryu,alyosha1879/ryu,John-Lin/ryu,gopchandani/ryu,shinpeimuraoka/ryu,yamt/ryu,elahejalalpour/ELRyu,ynkjm/ryu,zyq001/ryu,TakeshiTseng/ryu,yamt/ryu,elahejalalpour/ELRyu,jalilm/ryu,hisaharu/ryu,evanscottgray/ryu,zyq001/ryu,ysywh/ryu,sivaramakrishnansr/ryu,jalilm/ryu,StephenKing/summerschool-2015-ryu,John-Lin/ryu,Zouyiran/ryu,StephenKing/summerschool-2015-ryu,diogommartins/ryu,darjus-amzn/ryu,yamt/ryu,osrg/ryu,takahashiminoru/ryu,StephenKing/ryu,gareging/SDN_Framework,habibiefaried/ryu,lsqtongxin/ryu,yamt/ryu,Tesi-Luca-Davide/ryu,Zouyiran/ryu,elahejalalpour/ELRyu,habibiefaried/ryu,fujita/ryu,Tesi-Luca-Davide/ryu,jkoelker/ryu,ynkjm/ryu,openvapour/ryu,jazzmes/ryu,John-Lin/ryu,gopchandani/ryu,pichuang/ryu,fkakuma/ryu,hisaharu/ryu,StephenKing/summerschool-2015-ryu,Tesi-Luca-Davide/ryu,iwaseyusuke/ryu,OpenState-SDN/ryu,takahashiminoru/ryu,darjus-amzn/ryu,gareging/SDN_Framework,Zouyiran/ryu,zyq001/ryu,diogommartins/ryu,gopchandani/ryu,sivaramakrishnansr/ryu,zangree/ryu,gareging/SDN_Framework,ynkjm/ryu,lsqtongxin/ryu,Tesi-Luca-Davide/ryu,hisaharu/ryu,ynkjm/ryu,takahashiminoru/ryu,zyq001/ryu,ttsubo/ryu,osrg/ryu,ttsubo/ryu,sivaramakrishnansr/ryu,StephenKing/summerschool-2015-ryu,osrg/ryu,ysywh/ryu,lsqtongxin/ryu,umkcdcrg01/ryu_openflow,elahejalalpour/ELRyu,castroflavio/ryu,OpenState-SDN/ryu,castroflavio/ryu,jazzmes/ryu,habibiefaried/ryu,StephenKing/ryu,Tejas-Subramanya/RYU_MEC,shinpeimuraoka/ryu,lagopus/ryu-lagopus-ext,pichuang/ryu,haniehrajabi/ryu,fkakuma/ryu,gareging/SDN_Framework,osrg/ryu,umkcdcrg01/ryu_openflow,habibiefaried/ryu,OpenState-SDN/ryu,gopchandani/ryu