session-cookies

Session/Cookies are resetting to blank in Asp.Net MVC application in an iframe

放肆的年华 提交于 2021-01-28 19:23:46
问题 After updating the chrome to 80 (Version 80.0.3987.149 (64-bit)) recently and clearing cookies of the browser we are seeing below issue in our ASP.Net MVC application. Session/Cookies are resetting to blank when redirecting to other page. Application is embedded in a iFrame. I have tried setting Same site to "None" in web.config in below ways but none of them worked - <sessionState cookieSameSite="None" timeout="60" /> <httpCookies sameSite="None" /> Also installed URL rewrite to override set

Ajax call with withCredentials: true is not sending cookie in request

て烟熏妆下的殇ゞ 提交于 2021-01-28 18:20:35
问题 My scenario: example.com is a django page which is being visited by user. session is set by server. Now, I have frontend app on another domain called xyz.com , Now, I need to call APIs on example.com , so I am trying to make ajax call with withCredentials: true . but it does not seems to sending cookie 'sessionId' in request. I have already seen some stack overflow answers, but suggested answers are not working. link1 link2 link3 What I have been trying : My backend is written in Django, so I

How to configure JBoss 4.0.* to make session cookie HttpOnly and secure?

喜欢而已 提交于 2021-01-28 12:13:17
问题 i tried < Context cookies="true" crossContext="true"> < SessionCookie secure="true" httpOnly="true" /> in context.xml but it is not recognising in jboss4.0 and i tried in java program String sessionid = req.getSession().getId(); resp.setHeader("SET-COOKIE", "JSESSIONID=" + sessionid + ";Path="+req.getContextPath()+"; Secure; Domain="+req.getServerName()+"; HttpOnly"); for 2nd request it not allowing to get session validation object for session so it is showing session expired page and i tried

ASP.NET Core making SOAP API request with WCF client how to add a Cookie header to the request?

∥☆過路亽.° 提交于 2021-01-28 11:41:00
问题 So I am currently working on making SOAP API request to a service with WCF generated code "Client object", I am wondering how to set the Cookie header to the request? 回答1: In general, we add the custom HTTP header by using HttpRequestMessageProperty . Please refer to the below code. ServiceReference1.ServiceClient client = new ServiceReference1.ServiceClient(); try { using (OperationContextScope ocs=new OperationContextScope(client.InnerChannel)) { var requestProp = new

How to clear req.session on clearing browser cookies in node js?

匆匆过客 提交于 2021-01-27 18:53:42
问题 I am using "express": "~4.14.0" with express-session for saving username. Once the user is logged in, I will save the user name in req.session.authorizedUser = username to display it in the application header. When either the browser history is cleared or the browser is closed, I want to clear the session. Please suggest me if there is any way to clear the session when doing any of these two operations. I have tried setting the maxAge option for session cookies, as shown below, but it doesn't

Flask – multiple session cookies with the same name

青春壹個敷衍的年華 提交于 2021-01-21 04:23:43
问题 I have found a very strange problem in my Flask application. I discovered that in some circumstances multiple session cookies could be created with the same name. I attached a picture about it. It is not browser specific. It is strange itself, but the real problem comes when I try to validate a form with CSRF token. Unfortunately, Flask picks a wrong session cookie and the validation of the CSRF token cannot be successful. And even more strangely the problem persists even after multiple form

Flask – multiple session cookies with the same name

故事扮演 提交于 2021-01-21 04:22:04
问题 I have found a very strange problem in my Flask application. I discovered that in some circumstances multiple session cookies could be created with the same name. I attached a picture about it. It is not browser specific. It is strange itself, but the real problem comes when I try to validate a form with CSRF token. Unfortunately, Flask picks a wrong session cookie and the validation of the CSRF token cannot be successful. And even more strangely the problem persists even after multiple form

I need that the last 3 searches are saved in a cookie and displayed

本秂侑毒 提交于 2021-01-07 02:53:40
问题 I want the last 3 searches to be saved in a Cookie and displayed in a '< p>' tag. Here is my HTML code: <form class="Dform" method="POST" action="index.php"> <input type="text" name="search" value=""> <input type="submit" name="" value="Search"> </form> I only managed to display the previous search but I don't know how to do the 2 previous ones, here is my php code: <?php if (!empty($_POST['search'])) { setcookie('PreviousSearch', $_POST['search'], time()+60*60,'',localhost); } ?> <?php $r1 =

Login Session Data Not Persisting In Rails 6

眉间皱痕 提交于 2020-12-27 07:25:32
问题 I am implementing a user authentication system in Ruby on Rails following this tutorial Building a Simple Session Based Authentication using Ruby on Rails. I think I did everything as explained in the article, but I could not get the user_id to be persisted across page refresh after a successful login. This is the log_in method def log_in(user) session[:user_id] = user.id end After I successfully logged in, I checked if the user id was saved in the session by printing out p session[:user_id]

Login Session Data Not Persisting In Rails 6

泄露秘密 提交于 2020-12-27 07:25:29
问题 I am implementing a user authentication system in Ruby on Rails following this tutorial Building a Simple Session Based Authentication using Ruby on Rails. I think I did everything as explained in the article, but I could not get the user_id to be persisted across page refresh after a successful login. This is the log_in method def log_in(user) session[:user_id] = user.id end After I successfully logged in, I checked if the user id was saved in the session by printing out p session[:user_id]