httponly

Setting 'HttpOnly' and 'Secure' in web.xml

泪湿孤枕 提交于 2019-12-08 17:24:56
问题 I need to have the 'HttpOnly' and 'Secure' attributes set to 'true' to prevent the CWE-614: Sensitive Cookie in HTTPS Session Without 'Secure' Attribute and CWE-402: Transmission of Private Resources into a New Sphere flaws from showing in the Veracode report. After doing some online searching, it seems that the best thing to do is to simply set the attributes in the project's web.xml file as follows: <session-config> <cookie-config> <http-only>true</http-only> <secure>true</secure> </cookie

Making JSESSIONID cookie be httpOnly in Jetty 7

独自空忆成欢 提交于 2019-12-06 06:14:39
We're running grails 2.0 + jetty 7.6.6 and need to set JSESSIONID cookie to be httpOnly. All of the answers on stackoverflow seem to refer to either Servlet 3.0 (which requires jetty 8) or to tomcat. Can anyone provide me with a clear way of setting the JSESSIONID cookie be httpOnly for jetty 7.x? I have tried adding jetty-web.xml file with the following contents, but it still didn't work (i.e. the JSESSIONID wasn't marked as httpOnly): <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> <Configure class

HttpOnly cookies on google app engine java

青春壹個敷衍的年華 提交于 2019-12-06 06:00:55
问题 Anyone know how I can use httponly cookies for sessions and cookies on the app engine? In the javadoc for the Cookie class, http://java.sun.com/javaee/6/docs/api/javax/servlet/http/Cookie.html#setHttpOnly(boolean) , there is a setHttpOnly method. I get a compiler error when trying to use it when developing for app engine though. The method was introduced in the Servlet 3.0 spec, so its pretty new. 回答1: App Engine supports the Servlet API at version 2.5, so you cannot use the setHttpOnly

session cookie httponly false rails 3.1

只愿长相守 提交于 2019-12-06 05:09:16
问题 I'm trying to turn httponly off for use in phonegap. I'm useing rails 3.1 and devise, each of which have reported (but not documented) ways of doing this, none of which work: # application.rb config.session_options = { :httponly => false } # no effect config.session = { :httponly => false } # undefined method `session=' # devise.rb config.cookie_options = { :httponly => false } # also no effect to test I restarted the server, deleted the existing cookie, and reloaded the page. 'Http' column

Forcing HttpOnly cookies with JRun/ColdFusion

假如想象 提交于 2019-12-06 00:52:58
问题 We need to ensure that all cookies on a CF7 site are set as HttpOnly. We are using jsessionid to control our sessions, and JRun does not create this as HttpOnly. Whilst it is possible to modify an existing cookie to add this setting, we need to have it set to HttpOnly from the start. Any suggestions? Related Question: Setting Secure flag for HTTPS cookies. 回答1: From: http://www.petefreitag.com/item/764.cfm Running CF 8 or Lower and using Application.cfc <cfcomponent> <cfset this

how do I test httpOnly cookie flag

两盒软妹~` 提交于 2019-12-05 11:02:45
问题 I have set the following property in websphere for the jsession cookie com.ibm.ws.webcontainer.HTTPOnlyCookies . Any idea how best to test this using JavaScript in Firefox or IE? 回答1: It's a pain in IE. I have IE9 so your screens may be different. Press F12, go to the network tab, and then press Start Capturing. Back in IE then open the page you want to view. Back in the F12 window you show see all the individual HTTP requests, select the one that's the page or asset you're checking the

HttpOnly cookies on google app engine java

旧城冷巷雨未停 提交于 2019-12-04 13:40:18
Anyone know how I can use httponly cookies for sessions and cookies on the app engine? In the javadoc for the Cookie class, http://java.sun.com/javaee/6/docs/api/javax/servlet/http/Cookie.html#setHttpOnly(boolean) , there is a setHttpOnly method. I get a compiler error when trying to use it when developing for app engine though. The method was introduced in the Servlet 3.0 spec, so its pretty new. App Engine supports the Servlet API at version 2.5, so you cannot use the setHttpOnly method. You could try to output the cookie header yourself. resp.setHeader("Set-Cookie", "A=7; expires=Fri, 31

session cookie httponly false rails 3.1

自作多情 提交于 2019-12-04 10:10:32
I'm trying to turn httponly off for use in phonegap. I'm useing rails 3.1 and devise, each of which have reported (but not documented) ways of doing this, none of which work: # application.rb config.session_options = { :httponly => false } # no effect config.session = { :httponly => false } # undefined method `session=' # devise.rb config.cookie_options = { :httponly => false } # also no effect to test I restarted the server, deleted the existing cookie, and reloaded the page. 'Http' column was still checked in the chrome debugger. help! This little snippet seems to work : Testapp::Application

Forcing HttpOnly cookies with JRun/ColdFusion

♀尐吖头ヾ 提交于 2019-12-04 06:03:41
We need to ensure that all cookies on a CF7 site are set as HttpOnly. We are using jsessionid to control our sessions, and JRun does not create this as HttpOnly. Whilst it is possible to modify an existing cookie to add this setting, we need to have it set to HttpOnly from the start. Any suggestions? Related Question: Setting Secure flag for HTTPS cookies. Salazar Mubarak From: http://www.petefreitag.com/item/764.cfm Running CF 8 or Lower and using Application.cfc <cfcomponent> <cfset this.sessionmanagement = true> <cfset this.setclientcookies = false> <cffunction name="onSessionStart">

Using IIS Rewrite to add HttpOnly Flag To Cookies Not Working

时间秒杀一切 提交于 2019-12-03 13:27:57
问题 I found numerous examples of adding the HttpOnly to my cookies but it does not work for me and I am not sure why. All the examples I found were the same and I copied this one from one of the posts that I had found. I am using .NET 3.5 under IIS 7.0. Hopefully someone can tell me what I am doing wrong? Thanks <rewrite> <outboundRules> <rule name="Add HttpOnly" preCondition="No HttpOnly"> <match serverVariable="RESPONSE_Set_Cookie" pattern=".*" negate="false" /> <action type="Rewrite" value="{R