session-cookies

Reason to rename ASP.NET Session Cookie Name?

六月ゝ 毕业季﹏ 提交于 2019-12-01 14:34:11
问题 is there any reason (safety?) why someone should rename the ASP.NET Session Cookie Name or is it just a senseless option of ASP.NET? 回答1: If you have several applications running under the same domain on the same server, you may well want to have seperate session cookie names for each one, so that they aren't sharing the same session state or worse still overwriting each other. See also the notes for the Forms Auth cookie name: Specifies the HTTP cookie to use for authentication. If multiple

Using ExecuteURL as 404 handler in web.config will bypass URL Rewrite (ie.. outboundRules) while using other responseModes won't

混江龙づ霸主 提交于 2019-12-01 10:51:28
I have the following rule in web.config designed to identify and rewrite outbound session cookies with both the secure and httpOnly flags: <rewrite> <outboundRules> <preConditions> <preCondition name="MatchSessionCookies"> <add input="{RESPONSE_SET_COOKIE}" pattern="." /> </preCondition> </preConditions> <rule preCondition="MatchSessionCookies" name="SecureSessionCookies" enabled="true"> <match serverVariable="RESPONSE_SET_COOKIE" pattern="^(.*sess.*)=(.+)$" /> <action type="Rewrite" value="{R:1}={R:2}; httpOnly; secure" /> </rule> </outboundRules> </rewrite> This works as intended, up until

Implementing Spring Security with Java Client

╄→гoц情女王★ 提交于 2019-12-01 09:54:18
问题 Client Side I have a java application that connects to a remote server using basic POST or GET methods: URL url = new URL(urlStr); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setDoOutput(true); conn.setDoInput(true); conn.setAllowUserInteraction(false); conn.setRequestProperty("Content-type", "text/xml; charset=" + ENCODING); conn.connect(); conn.getOutputStream().write(data.getBytes(ENCODING)); conn.getOutputStream().close(); (I

Implementing Spring Security with Java Client

吃可爱长大的小学妹 提交于 2019-12-01 09:31:09
Client Side I have a java application that connects to a remote server using basic POST or GET methods: URL url = new URL(urlStr); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setDoOutput(true); conn.setDoInput(true); conn.setAllowUserInteraction(false); conn.setRequestProperty("Content-type", "text/xml; charset=" + ENCODING); conn.connect(); conn.getOutputStream().write(data.getBytes(ENCODING)); conn.getOutputStream().close(); (I cannot change this code, the only things I can change is the urlStr and the data sent to the server when

Using same session ID within two PHP scripts at same time

可紊 提交于 2019-12-01 09:06:39
I have ocassionally detected a strange problem with PHP sessions. When I am running two PHP scripts using SAME session ID, second script is stuck until first one is completed. I guess it is because trying to open same session storage file twice. But possible I am not right. You will never catch this effect in normal site work, because user usually didn't open two or more pages simultaneously. However, if you try to get content of a page of the same site using file_get_contents() , you will catch this issue. Additionally, I have copying my cookies through context, so file_get_contents() trying

PHP multiple cookies not working on iPad / iPhone browser

梦想与她 提交于 2019-12-01 09:04:25
So my application is an iframe based ecommerce cart; cart session is stored on the accessing domain. When a user checks out the iframe deploys a pop up login to our SAAS (which clears our domain for cross domain cookies). After the pop up login is authenticated the popup closes and the iframe refresh and loads the user's check out with their stored information (all done correctly). The cart session is past over to the iframe via http queries, so it is correctly hitting the server. The problem area: My application deploys multiple cookies (cart session, referring site, etc), it seems that ONLY

PHP multiple cookies not working on iPad / iPhone browser

我只是一个虾纸丫 提交于 2019-12-01 07:13:58
问题 So my application is an iframe based ecommerce cart; cart session is stored on the accessing domain. When a user checks out the iframe deploys a pop up login to our SAAS (which clears our domain for cross domain cookies). After the pop up login is authenticated the popup closes and the iframe refresh and loads the user's check out with their stored information (all done correctly). The cart session is past over to the iframe via http queries, so it is correctly hitting the server. The problem

Using same session ID within two PHP scripts at same time

天涯浪子 提交于 2019-12-01 06:06:40
问题 I have ocassionally detected a strange problem with PHP sessions. When I am running two PHP scripts using SAME session ID, second script is stuck until first one is completed. I guess it is because trying to open same session storage file twice. But possible I am not right. You will never catch this effect in normal site work, because user usually didn't open two or more pages simultaneously. However, if you try to get content of a page of the same site using file_get_contents() , you will

Session Cookies expiration handling in ASP.NET MVC 3 while using WIF and jquery ajax requests

泄露秘密 提交于 2019-12-01 05:10:40
问题 I my project I'm using WIF (but this is not really important for the context of this question. You can use alternative framework which handles your authentication. Question is about dealing with authentication failures while performing ajax requests) . Nevertheless, in my case I've written custom server logic which inherits from ClaimsAuthenticationManager , and handles authentication: public override IClaimsPrincipal Authenticate(string resourceName, IClaimsPrincipal incomingPrincipal) { if

Starting a session within a ratchet websocket connection

落花浮王杯 提交于 2019-12-01 04:40:21
问题 We have built a Ratchet websocket server that serves a standalone client application. The server is running on port 8080, and our Symfony app is running on port 80. It's critical that we have sessions working within the websocket server so we can uniquely identify each client. The problem is that Ratchet does not send a set-cookie header over port 8080. Hoping to find a way to send the set-cookie header in response to the upgrade request on 8080, I tried to start a new session in onOpen():