Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
2answers
74 views

PHP login system with prevention for session hijacking, fixation, injection, etc

I'm creating a login system and I have been reading a lot about the security measures needed to prevent session hijacking, fixation, and injection attacks, etc. These two Stack Overflow posts were ...
3
votes
0answers
19 views

Wrapper for Google_Service_Calendar as a Symfony service

My app interacts with Google Calendar. This Service wraps Google_Service_Calendar: ...
2
votes
2answers
59 views

User profile system with PHP and PDO - Conditional links for admin

I recently asked for a code review to my login system. This login system was fully directed to the user. Now I have added some code lines to print out some links related to the admin. Basically I ...
2
votes
1answer
66 views

Login system with password reset sent to e-mail using PHP and PDO

I really like to use PDO because it's simple and easy to make a safe query, i prepared all queries and used placeholders, i think it's safe but i'm not sure at all, and I'm thinking if i used ...
2
votes
1answer
69 views

PHP User management class

Here is my code for a class that is responsible for managing some common users task like registration, login and logout. It implements also a sub class that can be used to check the session of a ...
2
votes
1answer
86 views

Basic PHP user authentication system for an Elm app

I made a simple authentication system with php for an elm webapp that will have a small number (1 - 5) of users able to log in. I am planning to send the users their php session-id at login, and ...
2
votes
2answers
213 views
1
vote
0answers
18 views

Angular2 “Logged In State Watcher”

I have a small website I'm working on as a hobby and I created a login page/home page so far. I wanted to get the basic login/logout functionality going before filling out the main part of my site. ...
4
votes
2answers
75 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 ...
1
vote
1answer
169 views

User session helper class

I write this session helper class to use it inside my projects for managing the $_SESSION variables setup after an user login or logout. It's very simple and after ...
2
votes
1answer
711 views

PHP > 7.1 - MySQL Session Handler Class with some built-in time-management/security

I've created a class that implements the native SessionHandlerInterface (with added PHP v7+ functionality) while adding some minor security features. My main goal was to maintain native methods for ...
1
vote
0answers
40 views

Login/Register/Welcomepage/Updateuserprofile security improvements

I have created a Login, Register ,welcomepage(userprofile with updatefunction). I have done that without thinking about security. Now I would like to improve the security on these pages. Note: This ...
3
votes
3answers
253 views

PHP Signup & Login

I want everything to be well and secure with my authentication code. I've done many signup and login systems before but just for testing purposes, and didn't take into consideration all the security ...
5
votes
1answer
133 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 ...
1
vote
1answer
118 views

PHP member login system

I have php cookie based login system on my website using below given code. I want to know that whether this login system is secure or not, Whether it can be hacked in any way? ...
3
votes
1answer
484 views

Shopping cart in Rails for karaoke items

This is my first cart implementation in Rails so I wanted to get some feedback on the correct method to implement it. First of all, I am storing the data directly in the session because the items in ...
2
votes
2answers
2k views

Simple login user authentication

I've created a simple User Login page. Here User is authenticated [username, password] and if it is a valid user, values like username, name and role of the user is ...
0
votes
2answers
1k views

Codeigniter 3 - Set Flashdata Array issue

I need help about CodeIgniter $this->session->set_flashdata array. I think my code is so long, is there any way to simplify my code? Script at my views <...
3
votes
2answers
187 views

Login methods with cookie options

I have a class that has a couple methods - a standard login (when the HTML login form is sent) and login via cookie (for automatic login of returning users). Let's now focus on the ...
2
votes
3answers
649 views

PHP function to check whether a user is logged in

So, I have a function which checks if a user is logged in, but it's a long chain of if/else statements. ...
0
votes
1answer
52 views

Checking if a cookie is set

Upon visiting my website, I check if a cookie is set into the user's browser and proceed to logging him into his account. Currently, I do the cookie check in my init.php file and I am asking where I ...
14
votes
3answers
7k 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: ...
1
vote
2answers
111 views

Session Control

I am implementing my first app using MVC. I would like to know if the approach I thought for the session system is a good and scalable one. Well, basically a session is stored in my MySQL database ...
1
vote
1answer
177 views

Storing JWT in client side and putting tokens in all the future request

I have started using NodeJS with Express JS and PassportJS and JWT for User Authentication. I am able to authenticate the user and generate JWT Token. I am using Bootstrap for my front-end. By using ...
4
votes
2answers
696 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 ...
1
vote
0answers
516 views

Python - Flask Middleware - Request Session Management Strategy

I am trying to determine what the most appropriate strategy for session management and authentication is for a middleware application which acts to receive a request, send it over to a database, and ...
2
votes
1answer
195 views

Unique everlasting session with low collision rate and is set across sub-domains

The goal is to try and make an everlasting SESSION without too much or unnecessary scripting for updating of sessions. And at the same time to avoid session collision as session collisions could lead ...
3
votes
2answers
132 views

Making a “remember login” function

I'm trying to make a safe "remember me / auto login" function on my site and as I'm just a hobby programmer I would like someone professional to take a look at my code this far. This site will ...
4
votes
0answers
142 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 ...
6
votes
2answers
324 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: ...
0
votes
1answer
403 views

Redirection with params - No query string

I have a products page with a search box. When a search is submitted there's a redirection to a search results page. If another search is submitted then the ...
1
vote
1answer
526 views

Hardcoded PHP Login

I am reviewing previous undocumented php work from a predecessor on these two scripts to manage access to an administrative dashboard, but I'm not sure about vulnerabilities and other things that ...
2
votes
2answers
700 views

Property value from an asynchronous operation

I have an app which has a session mechanism. When a user creates an account in the app initially, the API returns an access token, the expiry date of that access token and a refresh token which can be ...
1
vote
0answers
64 views

Implementing internationalization functionality for online English lessons

My website purpose is to sell online English lessons to people in Europe. It is crucial that my site is multilingual. Overview I am using HMVC modules to organize my site and my website has four ...
1
vote
0answers
254 views

Concurrent SSH session pool

In my application I need to perform several SSH commands from Windows to a Linux machine. Since I need to reduce as much as possible the SSH calls overhead and also limit the number of concurrent ...
0
votes
1answer
1k views

Secure logout PHP code with cookies

I have the following PHP logout script and I would like to know the loopholes present in it. How can I improve it? ...
1
vote
1answer
63 views

Class for creating save sessions in PHP

Is the following class well-built and secure or am I missing something? Any improvement ideas welcome. ...
3
votes
1answer
166 views

Cookie wrapper made for fun

This was mostly made for fun, so I don't see it having any real world purpose any time soon. ...
1
vote
0answers
352 views

Alternative session token implementation in flask

Here is my implementation of an alternative session token. The idea is to reset session_token every time get_id is called, so (I ...
5
votes
1answer
3k 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. ...
4
votes
1answer
178 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 ...
2
votes
1answer
18k views

PHP PDO login with session

index.php,general message.php, logout.php, site ...
5
votes
1answer
179 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 ...
0
votes
0answers
77 views

Check if a user is authorised to visit a page

I'm creating a user portal for our customers but I'm yet to find the best way to check if a user is logged in or not. I used to check it by setting some session variables with my ...
1
vote
0answers
346 views

Session wrapper for PHP that supports alternative session handlers

I'm developing a session wrapper for the next version of a framework that I've been working on for the past few years. I want to support a variety of PHP session handlers. Laravel's session package ...
2
votes
0answers
77 views

FlowRouter auto-redirect on login page

The site should be accessible only to signed-in users. I'm making sure I publish and enable data manipulation to only those, but I wanna make sure even the app structure won't be visible. What I did ...
3
votes
1answer
3k views

Login system using a persistent cookie

I want to be sure that my code below properly secures the website based on all of the information provided. Login System Overview When a user logs in, the following user info is saved to a ...
3
votes
1answer
1k views

PHP login and session establishment

I would like to ask your advice on my simple code to login and registration sessions. In the User class, login function: ...
1
vote
2answers
377 views

Using session wrapper for accessing session data

When users log in to our website, we store some information in a session to retrieve it across the site. We created a few wrappers to help with data retrieval/storage to lessen duplication of code. I'...