Questions tagged [session-cookies]

Session cookies enable a server and a browser to establish an identified connection (through cookies) and communicate though it.

Session cookies are temporary files that exist for a particular user for a pre-defined duration. Once this duration is expired, the session cookies are erased.

Session cookies allow a website to keep a state or memory of the visitor as they navigate between pages of the website.

4816 questions
20
votes
2 answers

Reopening a session in PHP

How do I reopen a session in PHP without getting header already sent warnings? After setting all the session vars I like to set, I close the session with session_write_close(). I do this, because as long as the session is open, there may be only one…
JochenJung
  • 7,183
  • 12
  • 64
  • 113
19
votes
4 answers

Access session cookie in scrapy spiders

I am trying to access the session cookie within a spider. I first login to a social network using in a spider: def parse(self, response): return [FormRequest.from_response(response, formname='login_form', …
mikolune
  • 241
  • 1
  • 3
  • 5
18
votes
1 answer

Login to Google with PHP and Curl, Cookie turned off?

I have this code for logging into Google using Simple DOM Parser with curl. I've tried adding in the cookiejar file, but to no avail. I keep getting the message: Your browser's cookie functionality is turned off. Please turn it on. Any idea on how…
kazuo
  • 297
  • 1
  • 6
  • 15
18
votes
1 answer

PHP - why can't I get rid of this session id cookie?

I'm trying to troubleshoot a logout function for a web app. When you're logged in, the app has several cookies set for its domain. Here's the current logout procedure: You click a link, which sends you to a logout page The logout page runs a…
Nathan Long
  • 122,748
  • 97
  • 336
  • 451
18
votes
2 answers

Set cookies with NSURLSession

Hi I am developing one Iphone application In which I want to set cookies after server response and use that for another request. My network request looks like. NSURLSession *session = [NSURLSession sharedSession]; [[session dataTaskWithURL:url…
nilkash
  • 7,408
  • 32
  • 99
  • 176
18
votes
2 answers

How to change jsessionid cookie path to server root in Spring app on Jetty?

I have a Jetty server running a Spring app on the /app context. The app uses sessions, so it sets a session cookie, which responds like this: set-cookie:JSESSIONID=679b6291-d1cc-47be-bbf6-7ec75214f4e5; Path=/app; HttpOnly I need that cookie to have…
Tauren
  • 26,795
  • 42
  • 131
  • 167
17
votes
2 answers

Cross-Domain Session Cookie (Express API on Heroku + React App on Netlify)

I have a React App making calls to an API in node.js/Express. Frontend is deployed in Netlify (https), Backend deployed on Heroku (https). My problem: Everything working in dev environment (localhost) In production (Netlify/Heroku), the api calls…
ludovico
  • 2,103
  • 1
  • 13
  • 32
17
votes
2 answers

How to decrypt a Rails 5 session cookie manually?

I have access to config.action_dispatch.encrypted_cookie_salt config.action_dispatch.encrypted_signed_cookie_salt secrets.secret_key_base the full cookie string (including --) I see ways to do this in Rails 4 (Rails 4: How to decrypt rails 4…
Eli Rose
  • 6,788
  • 8
  • 35
  • 55
17
votes
0 answers

Internet Explorer/MS Edge set-cookie works for 127.0.0.1, but won't work for localhost

Using Chrome or Firefox, the set-cookie works correctly for both localhost and 127.0.0.1. However, IE and MS Edge both ignore the set-cookie for localhost, but accept the 127.0.0.1 cookie. Works: http://127.0.0.1 Set-Cookie:…
Kyle U
  • 181
  • 7
17
votes
3 answers

Rails 4 upgrade JSON::ParseError for old sessions

After upgrading to Rails 4.1.4 from Rails 3.2, accessing the application with an existing session (from the older Rails 3.2 version) causes an internal server error. backtrace: JSON::ParserError - 795: unexpected token at…
Yossi Shasho
  • 3,632
  • 31
  • 47
17
votes
6 answers

.Net MVC Partial View load login page when session expires

I am building a web application using .net MVC 4. I have ajax form to edit data. If the user is idle for 15 mins it will expire the session of the user. When that happens if user click edit button it loads the login page inside the partial content…
17
votes
2 answers

Does NSURLConnection automatically persist cookies sent from server?

I logged into my tornado backend from ios and sent back a secure_cookie and i noticed that i could also request other information as long as i validated the secure_cookie that i set. How long does NSURLConnection persist the cookie or will the…
RubyGladiator
  • 1,765
  • 3
  • 18
  • 27
16
votes
2 answers

Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:*.herokuapp.com, DNS:herokuapp.com

I have an api created and hosted on Heroku. I have my web app running on localhost. I am using NextJS for my app. I am able to access all my apis hosted on Heroku via my web app which is running on localhost. I have one api which checks whether a…
BraveEvidence
  • 53
  • 11
  • 45
  • 119
16
votes
2 answers

Sending cookie as request header in SOAP UI request for rest web service

I am testing a Rest API using SOAP UI tool. First, I hit another API which gave me the jSessionid and then in my actual request I added a parameter to the request header by the name "Cookie" and provide it the above extracted jsessionid value.…
Anand
  • 20,708
  • 48
  • 131
  • 198
16
votes
4 answers

How to store and reuse cookies in Postman?

I'm using Postman to test and play with an API. For the login url, the API requires sending a POST request with username and password as fields. I do this, and I get a 200 response with the message that I am logged in. I then try another request to…
CodyBugstein
  • 21,984
  • 61
  • 207
  • 363