Questions tagged [session]

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

Filter by
Sorted by
Tagged with
4
votes
1answer
1k views

PHP login system security using a database, cookies and sessions

I created a simple login system using just sessions but having to login every time gets annoying. That is why I'm no trying to save the sessions to my database linked to the user's account. I will ...
5
votes
1answer
812 views

For a login portal, what security measures are needed to prevent unauthorized access?

I'm designing a login portal that has one angularjs page that displays/processes data queried from a database. I'm relying on a few php pages (a loginpage.php [verifies credentials/loads session ...
3
votes
1answer
1k views

Adding new sockets and sessions

I am currently writing a TcpListener class where it begins a new socket and adds a new Session. I have classes called ...
3
votes
0answers
3k views

Authorization token from servlet filter stores user name

I'm having some difficulty with servlet and filter lifecycles. The intention here is to use the front controller pattern with a simple login; authentication is accomplished with the filter. Am I ...
8
votes
2answers
16k views

Protect from people bruteforcing the PHPSESSID

The PHPSESSID is stored in the clients cookie so I don't consider it as secure. Someone might bruteforce it and perform some action (like a Facebook status post) whenever a session was successfully ...
3
votes
2answers
518 views

Session in database

I'm posting my PHP code for sessions using MySQL. Please tell me if there are any errors, if it can be optimized, or if security can be enhanced. Host: localhost User: root Password: "" Database: pro ...
3
votes
1answer
265 views

Making user login system secure with $_SESSION [closed]

I am hoping that someone can help me out here. I am creating a PHP web app that requires a user to login to view their data in the MySQL database. I just want to know if this is a good approach and ...
4
votes
2answers
64 views

Formatting checks against a session

This is the current code that gets put into a option box, is there a way to make this code more efficient and use less code ...
2
votes
1answer
302 views

Is my Node/Express-based authentication implementation with session properly done?

I know that Passport.js exists, however, I wanted to code my own implementation using express-session module. I'm using: Express Mongoose express-session So I basically have 2 routes for handling ...
4
votes
2answers
793 views

PHP Session Wrapper Class

I recently worked on a system for the company I work for and would love some feedback on the following class for managing sessions. I don't claim to be a PHP guru but I like to think I gave it a try! ...
4
votes
2answers
3k views

Performance of hashmap-based session object

Unfortunately, I can't use the Tomcat session for storing the key/value pairs for each user (restricted because it's an IVR domain-based project). But I need the same functionality like a ...
3
votes
2answers
1k views

Abstract session value manager

I've been working in C# for a while, but I'm just recently starting to force myself to use better abstracted and generic code. I recently encountered a situation where I was juggling a lot of session ...
6
votes
1answer
70 views

Creating a server for user Internet orders

I've been learning the basics of node over the last couple of days and finally hooked up what I needed. I'm just after someone to comment on if I have gone the right way around this task. It creates ...
3
votes
1answer
119 views

HttpSession Wrapper Class

Are there any aspects I could improve of my HttpSession wrapper class? Other suggestions are also welcome. ...
2
votes
1answer
14k views

NHibernate session and transaction implementation

In order to create loose coupling architecture on my web applications, I have created my own implementation for ORM, in this case, NHibernate. I want you please to review the code and tell me if you ...
4
votes
1answer
2k views

How to regenerate my session ID often when using this class?

I have created a class that will manage my session. I am hoping to acomplish a class that will secure my site from all known attacks (ie. fixation, precedent, and capture.) The idea is to Change the ...
12
votes
1answer
1k views

PHP form with bot deterrent

I saw somewhere on here that it helps reduce spam by adding a dummy input field that you hide with display: none, and like if it's filled out, then it's obviously a ...
12
votes
2answers
386 views

Sessions and Authentication

I've a feeling I'm overdoing my Auth class, and that it could be done in a simpler and more understandable way. Could you give me advice on this, please? This is ...
4
votes
1answer
762 views

Preventing session hijacking

I'm implementing a login script and I want it to be more secure: ...
4
votes
1answer
7k views

Subclassing AFNetworking to handle POST / GET requests

I am pretty new to iOS development - I'm writing an app the uses web services, pretty extensively. With that in mind, I decided to use AFNetworking 2.0 and subclass ...
2
votes
1answer
5k views

Using AJAX to secure sessions and save messages

I have been working with PHP sessions and login protected pages for some time, but I want to start using some AJAX for managing some actions inside login protected pages (easy way with jQuery). Here ...
4
votes
2answers
469 views
4
votes
2answers
528 views

Display data based on read configuration file from ssh sessions

I started playing with Python last week. This is a section of code from an application which reads a configuration file and launches ssh sessions and continuously ...
1
vote
1answer
3k views

Secure logout: session termination

I've been reading the security issue on logging out from a website system written in PHP, using sessions. My current code is: ...
4
votes
1answer
255 views

Security - Login system

For a school project I have been asked to create a login system for a website. The language I have to use is PHP with no database as of yet (for a later assignment). I'm just wondering if this code ...
4
votes
2answers
3k views

Language-detection PHP script

I'm working on a webpage with language detection and I have the following script so far (it's simple). I still haven't done the user detection, so it's not available to find the user language (yet), ...
2
votes
1answer
330 views

How can I refactor Api::SessionsController?

I have session controller for mobile devices. I would like to refactor it a little, for example because my session controller is sub class of ...
1
vote
2answers
165 views

Is this session handler secure?

Are there any security vulnerabilities in this code? ...
5
votes
1answer
235 views

Safety issues in PHP log-in system

This is a user login (some session wrapper I managed to put together after a lot of web searching). It's for a simple CMS I'm trying to build. It only needs one user and there is no need for ...
3
votes
1answer
1k views

Session state wrapper, extending an existing application

I'm adding additional functionality to an existing MVC .net application, and to help prevent or at least reduce repeated reads to the dB I'm dumping a few custom entities in session. I'm limiting what ...
26
votes
2answers
7k views

Custom session handler class - is it robust enough?

I've been working on this class for a while now and would appreciate some feedback, even if it's just nitpicking. I've added basic instructions on how to use the class below along with some questions. ...
2
votes
1answer
236 views

Update SQL query using UNIX time

I would like to test the following garbage collector code on a database of sessions. It should be following the conditions below: if 'remember me' is enabled by the user, then it should delete all ...
2
votes
1answer
227 views

PHP session fixation

I'm trying to implement a system of restricted access. Right now I'm focusing on the "session fixation". I am concerned about the following aspects: Control of a "fingerprint" of the user created by ...
4
votes
1answer
365 views

Possible improvements on admin login area?

I've created an admin login area for an application I am planning to code, and I've used the following login.html page to let the user type in his data (I left out parts like "id", "placeholder" etc. ...
4
votes
1answer
329 views

Is this a safe Login?

I've been doing a lot of searching on PHP, logins, forms, cookies, sessions, etc. And so, I've tried to gather all the info that I got from all over the place. But, I didn't find a place with all ...
4
votes
2answers
316 views

My Session Handler

I'm yet to add garbage cleanup, ID regeneration and the ability to unset sessions, but this is what I have so far. Does this help prevent session hijacking/fixation? Can you see any vulnerabilities? ...
0
votes
1answer
87 views

Is this a good way to track current site being reported on?

I'm trying to find an elegant and secure way to track the currently reported site. I originally just used a cookie but realized this was not very secure. I have since switched to combine the session ...
-1
votes
1answer
75 views

Can this code be improved upon?

My code already works 100%, just trying to figure out if there is an easier, better or speedier way to do this. Outputs to an HTML table to display results. Something that took me a while to figure ...
4
votes
1answer
238 views

How to properly make a user class with a session

So I am working on a LMS project and I have a User class that will handle everything about the user such as registration, login, showing list of courses that they are subscribed to, etc. User.class....
1
vote
0answers
109 views

Few concerns about specific session class

I am having a few issues about a session class that I found after reading it a lots of times, Here is the class : ...
0
votes
2answers
12k views

ASP.net proper login - logout classes - control login status

Would you have any suggestions improvements for the below functions classes ? Ok here how do i make a registered member login ...

1 2
3