We’re rewarding the question askers & reputations are being recalculated! Read more.

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
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. ...
14
votes
3answers
10k views

PHP Login System with persistent login

I'm writing my first CMS (for personal use) and I'm trying to make it the most secure I can. This is my project structure: ...
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
383 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 ...
9
votes
2answers
468 views

Making a simple session class more secured

I just wrote the session class below. I humbly request for a review on how to make this even more secured/ how sessions are normally written. The code below works, but I would love to make it even ...
8
votes
3answers
34k views

First PHP login system

This is my first attempt at a login system! I've only had roughly 2 days of experience with MySQL and PHP so far and this is what I came up with: ...
8
votes
5answers
739 views

Securely handling a password protected application

I have some small applications that I want to secure. I've been using the following setup that I think is fairly safe, but I've never been able to set my mind at ease that it really is. Could you ...
8
votes
2answers
14k 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 ...
7
votes
1answer
1k views

Go cookie authentication system

I'm working on a login system in Go (Golang). Previously, I was using Gorilla Sessions for this, but I wanted to see if I could reinvent the wheel and make it simpler. Also, I don't need to store ...
6
votes
2answers
434 views

Browser-based Mafia game in PHP

Because I'm rather new to PHP and Object Oriented Programming, I'm often looking for some practice. Thus I decided to focus on making a browser-based Mafia game that should work like a Dutch variant: ...
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 ...
6
votes
2answers
956 views

Login with facebook, store data in MySQL, render profile and admin panel

I have an online catalog on which I need the customers to save their favorite products and shipping addresses. I want to manage the access with Facebook for security of all. I also need a section for ...
5
votes
3answers
21k views

PHP Session handling class

I've written a custom PHP session class for handling sessions across the web app. Please review the code and point out mistakes and suggest better handling techniques. ...
5
votes
1answer
233 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 ...
5
votes
1answer
158 views

PHP - First Login System

I am quite new to PHP, and with the help of a few tutorials have made this login system. However I know its not as efficient and compact as it could be, also I am looking for ways to improve the ...
5
votes
2answers
38k views

Login system with session using CodeIgniter

I implemented a login system, with session, using CodeIgniter. If the session doesn't exist, redirect to login page. Please review, and let me know what can be done to make it better. view (login.php)...
5
votes
1answer
5k views

Session handling using Python Requests client

I'm using this code to login to an experiment login system created by me for this purpose. ...
5
votes
1answer
744 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 ...
5
votes
1answer
210 views

Very basic PHP session handling

I’ve got my first real PHP web application up and running. It is working as expected, but being my first time, I’m sure there is plenty of room for improvement. Right now, there is one particular ...
5
votes
1answer
483 views

Database Session Class

I have made the decision to move the storing of session data from the filesystem to the database. Our application is growing at pace and we are having issues with the load balancer breaking the ...
5
votes
3answers
1k views

“Remember me” automatic login

I've implemented a "remember me" automatic login if no session has been set, but a remember me cookie is on their computer. I'm concerned about security and I'm not the best. I'm relatively new to OOP ...
5
votes
1answer
1k views

PHP login script security check

I made an admin login script for my own CMS website that I'm making in Code Igniter 2.2.1 and I'd like to know what are the potential threats or some holes that I might have left open. This is how it ...
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 ...
4
votes
2answers
522 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 ...
4
votes
2answers
2k 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), ...
4
votes
3answers
93 views

User management OOP php class

I found a class that i coded for an old project about a year ago and i haven't really touched php in a while. Now i need to use similar functionality again i thought it would be the perfect time to ...
4
votes
1answer
4k views

Persistent login (“remember me” cookie) using PHP

The code below is a attempt to create a persistent login cookie. I am an amateur and not professional so this is the first attempt to have secure remember me cookie. Now I want you guys to review two ...
4
votes
2answers
741 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
1answer
3k views

Simple PHP session handler class (using MySQL for session data storage)

I have tried to write a small light weighted php session handling class that use PHP's session_set_save_handler() function to overwrite the default session handling ...
4
votes
2answers
464 views

Custom session class

...
4
votes
1answer
191 views

Cookie, Session, and Flash middleware for Iron framework

Iron's cookie and session middleware projects seem to be abandoned. I've put together implementations for them, along with a ...
4
votes
1answer
722 views

Preventing session hijacking

I'm implementing a login script and I want it to be more secure: ...
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 ...
4
votes
2answers
78 views

Assigning several variables from request URL using regexes

I refactored some of my code: Summary: This implementation works with PSGI/Plack. It gets the URL from $env->{PATH_INFO} and assigns a different variable ...
4
votes
1answer
510 views

Restart Citrix session using locally stored application

I have a Windows forms application which we deployed in my firm for use on thin clients. The app lives locally on each user's machine, but pretty much all of the work the users do is over a Citrix ...
4
votes
1answer
327 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
5k views

Session Wrapper

I have two types of session wrappers: Type 1 ...
4
votes
1answer
405 views

Secure session handling in PHP

I tried to search and read for 10-12 hours on how to have a secure session, and this is the (simplified version of the) code that I came up with. (found no good book or article with complete guide ...
4
votes
1answer
2k views

login_required decorator in Flask

I have 2 Flask apps (different projects) that work together . One implements some API which uses tokens for auth. The second one consumes the API and makes a web interface for it. Now I have a login ...
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 ...
4
votes
1answer
78 views

Session manager for logged in users

I wrote this code to handle logged in users. The session IDs will be stored in cookies. I would like to know if it's usable or if there are security problems. It uses a 64bit id and another 64bit ...
4
votes
1answer
247 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
1answer
234 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....
4
votes
1answer
55 views

Account automation through Python (with Flask) and javascript

This is my first time doing a code review so I expect a ton of criticism on this from all you professionals. What am I doing? I'm using python with flask to create a service for my web server. My ...
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 ...
4
votes
2answers
313 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? ...
4
votes
0answers
56 views

Evaluating a previously calculated gradient function

I am trying to perform optimization using a surrogate model instead of the real function and for that, I need the gradient of my LSTM model with respect to the input. In this case, I have 3 features ...
4
votes
0answers
186 views

SQL-Alchemy session management

I have written a couple of scripts for accessing Twitter REST API, and storing data in a Postgres DB for data extraction purposes. I know how to use django ORM, or plain SQL, but this was my first ...
3
votes
3answers
100 views

httprequest to php login system

I'm trying to make a login system for my website which I'll be releasing in public later on. I have inserted some main samples of my code in here and I would like some useful advise or suggestions. ...
3
votes
2answers
83 views

Find existing session

I have this method in my rails app: ...