B billzhan Active Member Licensed User Longtime User Aug 30, 2014 #1 Hi Erel, Set cookie (jsessionid) HttpOnly will prevent XSS attack.See http://en.wikipedia.org/wiki/HTTP_cookie#Secure_and_HttpOnly I hope this feature can be added. Thanks, bz
Hi Erel, Set cookie (jsessionid) HttpOnly will prevent XSS attack.See http://en.wikipedia.org/wiki/HTTP_cookie#Secure_and_HttpOnly I hope this feature can be added. Thanks, bz
Erel B4X founder Staff member Licensed User Longtime User Aug 31, 2014 #2 You can set HttpOnly with this code: B4X: Dim jo As JavaObject = srvr Dim sessionmanager As JavaObject = _ jo.GetFieldJO("context").RunMethodJO("getSessionHandler", Null).RunMethod("getSessionManager", Null) sessionmanager.RunMethod("setHttpOnly", Array(True)) Run it after you call Server.Start. I tested this code with FireBug:
You can set HttpOnly with this code: B4X: Dim jo As JavaObject = srvr Dim sessionmanager As JavaObject = _ jo.GetFieldJO("context").RunMethodJO("getSessionHandler", Null).RunMethod("getSessionManager", Null) sessionmanager.RunMethod("setHttpOnly", Array(True)) Run it after you call Server.Start. I tested this code with FireBug: