Questions tagged [session]

A session refers to the communication between a single client and a server. A session is specific to the user and for each user a new session is created to track all the requests from that user.

From Wikipedia:

A session is a semi-permanent interactive information interchange, also known as a dialogue, a conversation or a meeting, between two or more communicating devices, or between a computer and user (see Login session). A session is set up or established at a certain point in time, and torn down at a later point in time. An established communication session may involve more than one message in each direction. A session is typically, but not always, stateful, meaning that at least one of the communicating parts needs to save information about the session history in order to be able to communicate, as opposed to stateless communication, where the communication consists of independent requests with responses.

An established session is the basic requirement to perform a connection-oriented communication. A session also is the basic step to transmit in connectionless communication modes. However any unidirectional transmission does not define a session.

References:

44567 questions
9
votes
3 answers

Rails ActiveRecord store and new session

I am new to Rails and experience a strange issue I don't understand. I use ActiveRecord as a session store and need to add session id as a property of JSON responses for all the requests. I use Devise as well if it have some impact on the situation.…
Bardt
  • 695
  • 1
  • 8
  • 17
9
votes
2 answers

Efficient session variable server-side caching with Python+Flask

Scenario: Major web app w. Python+Flask Flask login and Flask.session for basic session variables (user-id and session-id) Flask.session and limitations? (Cookies) Cookie based and basically persist only at the client side. For some session…
Passiday
  • 7,573
  • 8
  • 42
  • 61
9
votes
3 answers

How to store an array into a session variable in php

//Returns 10 question from questions table $result = mysqli_query($con,"SELECT question FROM questions ORDER BY rand() LIMIT 10' "); while($row = mysqli_fetch_row($result)) { $que[]=$row[0]; } Now I need to store this whole set of $que[] in a…
Aayush
  • 223
  • 1
  • 3
  • 13
9
votes
4 answers

Session Hijacking in practice

I have been reading up on session fixing/hijacking recently, and understand the theory. What I don't understand is how this would be exploited in practice. Would you have to tamper with your browser to make use of the stolen cookies? Append it to…
Joshxtothe4
  • 4,061
  • 10
  • 53
  • 83
9
votes
2 answers

Get User details from Session in Spring Security

I am new to Spring MVC and Spring Security. I have performed log-in and registration functionality using Spring security and MVC. I am not able to find any way for session management . I want to access some user details on all the pages like (email,…
Rao Pranav
  • 249
  • 1
  • 5
  • 12
9
votes
7 answers

Destroy a PHP session on clicking a link

Is this code valid? Logout
mpsbhat
  • 2,733
  • 12
  • 49
  • 105
9
votes
2 answers

Where to open and close the NHibernate ISession in a web app (specifically MVC)?

This is a pretty fundamental question when using NHibernate in a web application, but I don't see any agreed best practice when searching the web. I've seen it done in lots of different places: Created and disposed in the Repository method - This…
UpTheCreek
  • 31,444
  • 34
  • 152
  • 221
9
votes
1 answer

Symfony2: check whether session exists or not

Is there a method to check whether a session exists or not? I tried this method, but it always gives me a 'Bravo !' answer: $session = $this->getRequest()->hasPreviousSession(); if($session) { return new…
BaHar AyØub
  • 337
  • 2
  • 6
  • 15
9
votes
3 answers

Safe authentication with node.js and session.socket.io?

I'm using the latest versions of node.js and session.socket.io and this is how I set the session (please note that I'm not using a HTTPS connection so no secure: true): app.configure(function() { app.use(cookieParser); …
David
  • 560
  • 2
  • 10
  • 26
9
votes
3 answers

How session and cookie works?

When i create a session variable where is saved username and password, how does it works internally? Same question about regular cookies where information is saved. Which type of information are included in coookie and session? What is the…
yogesh patel
  • 111
  • 1
  • 2
9
votes
3 answers

Need help making a PHP login session last longer

I am working on a site for a small (read: <50 users) nonprofit organization that I work with and my PHP knowledge is fairly limited. Currently I have a login script that I found from a tutorial online. The problem I am running into is that each…
scott.j.lockhart
  • 173
  • 2
  • 3
  • 7
9
votes
6 answers

CakePHP Session variable use in view page?

I have a variable contaning "username" and want to get these values via session to any of the view pages. How can I get this session variable in the view ?
coderex
  • 27,225
  • 45
  • 116
  • 170
9
votes
3 answers

"Sessions" with Google Cloud Endpoints

This question is only to confirm that I'm clear about this concept. As far as I understand, Google Cloud Endpoints are kind of Google's implementation of REST services, so that they can't keep any "session" data in memory, therefore: Users must…
MikO
  • 18,243
  • 12
  • 77
  • 109
9
votes
2 answers

Meteor Session Replacement?

In the latest Meteor release (version 0.5.8), Session has been removed from the server-side code. Previously I've used Session to store client-specific variables for the server; what is the replacement for this functionality? Example case: User One…
Christian Stewart
  • 15,217
  • 20
  • 82
  • 139
9
votes
7 answers

Does CodeIgniter's ci_sessions need occasional emptying?

I am using CI's sessions in connection with a database. So all of our sessions are in this ci_sessions table on our database and it can get a lot of rows, considering that the session_id keep changing every 5 minutes. Do we need to empty the table,…
Nikolius Lau
  • 653
  • 2
  • 11
  • 21