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
-1 votes
1 answer
84 views

logging in using cookie authentication/authorization in asp.net C#

How safe is Cookie based Authentication/Authorization in ASP.NET C#? Take a look at the example below, don't worry about password hashing, All this code does is that it takes a username and a password ...
Newbie's user avatar
  • 13
1 vote
0 answers
167 views

How to implement robust and secure session management (in general, and in Next.js)

I am using Next.js and want to properly implement session management into this serverless architecture. I checked out nextauth but I am not really a fan and it doesn't implement some things I think I ...
Lance's user avatar
  • 351
0 votes
1 answer
87 views

Submitting highscore in PHP

So, I am interested, what is the proper way to submit a highsocre (such as of a Pacman game) in PHP? Here is what I tried: ...
FlatAssembler's user avatar
2 votes
0 answers
37 views

Javascript client storage with the same persistence as a session cookie

I want to implement a client storage mechanism that is as persistent as a session cookie but with more storage capacity. I am doing this by encrypting the data before storing it and saving the keys in ...
Gamer2015's user avatar
  • 121
0 votes
2 answers
1k views

Getting a username from a database and displaying it in HTML

I'm using Flask on Python and I'm displaying the username at the top of the site (and it's working) as follows: ...
ARNON's user avatar
  • 401
2 votes
1 answer
880 views

MySQL database custom session handler using PHP with MySQLi extension

I have made the decision to move the storing of session data to the database. Any new ideas, suggestions are welcome. Please also give security suggestions. Like SQL injection is possible here, etc... ...
Puneet Gopinath's user avatar
4 votes
1 answer
81 views

Security of the login code on the website

I wrote the code to log in php to the admin panel. Everything works as it should. But I am not sure if it is well written code and if it is safe. I care about security. I have read a lot about it but ...
test's user avatar
  • 41
1 vote
0 answers
225 views

Handling sessions in SignalR core

I am using .Net 5, and I am making game server using SignalR core. Ther're 2 ways to inject service to my classes. 1- Constructor injection: where I must separate functions and data, even if it's ...
Adam Q's user avatar
  • 11
2 votes
1 answer
110 views

Performance and login security for NodeJS using Express with Express-sessions

I am new to this part of backend development using JS and the truth being a new programming language (for me) it is worrying that it suddenly does not meet the structuring and / or security standards. ...
jecorrales's user avatar
4 votes
0 answers
70 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 ...
Giselle's user avatar
  • 41
4 votes
3 answers
232 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 ...
Rajbir's user avatar
  • 143
4 votes
1 answer
96 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 web ...
Drake Rose's user avatar
4 votes
1 answer
3k 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 ...
J. Doe's user avatar
  • 183
3 votes
3 answers
128 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. ...
aman's user avatar
  • 155
3 votes
1 answer
102 views

Language switch based on parameters and session state

I use this to set language session for navigation. Someone said that this switch is too cumbersome. Why? Is there an easier way? ...
Ogum's user avatar
  • 133
3 votes
1 answer
503 views

Is it enough for PHP secure session class?

I need you help with my php session class. I can not understand, the class implements adequate work with sessions. By adequate work, I understand the security and correctness of the methods. ...
mepihindeveloper's user avatar
2 votes
1 answer
201 views

Implementation of login and registration functions in servlet filter

I'm a newbie in servlet API. I have a test task to create a very simple web app with one home page and an authorization form. The requirement is to use filter somewhere in my app. Given that it's a ...
LexSav's user avatar
  • 123
3 votes
2 answers
312 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 ...
John's user avatar
  • 131
4 votes
0 answers
122 views

Wrapper for Google_Service_Calendar as a Symfony service

My app interacts with Google Calendar. This Service wraps Google_Service_Calendar: ...
Chrisissorry's user avatar
3 votes
2 answers
2k 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 ...
Natalie's user avatar
  • 85
2 votes
1 answer
1k 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 ...
Natalie's user avatar
  • 85
2 votes
1 answer
100 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 ...
user9741470's user avatar
2 votes
1 answer
264 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 ...
eniac314's user avatar
3 votes
2 answers
2k views

Login System using PHP and PDO Prepared Statement

vir.php ...
mind set's user avatar
4 votes
2 answers
100 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 ...
The nothing's user avatar
1 vote
1 answer
963 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 ...
user9741470's user avatar
3 votes
1 answer
3k 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 ...
Phillip Weber's user avatar
4 votes
3 answers
343 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 ...
Abed Shatila's user avatar
5 votes
1 answer
191 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 ...
TessRay97's user avatar
1 vote
1 answer
169 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? ...
John's user avatar
  • 11
3 votes
1 answer
2k 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 ...
kofhearts's user avatar
  • 131
2 votes
2 answers
3k 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 ...
user4221591's user avatar
0 votes
2 answers
3k 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 <...
Zinc's user avatar
  • 103
3 votes
2 answers
241 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 ...
pidari's user avatar
  • 133
2 votes
3 answers
4k 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. ...
nick's user avatar
  • 335
0 votes
1 answer
56 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 ...
user3628807's user avatar
14 votes
3 answers
14k 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: ...
nick's user avatar
  • 335
1 vote
2 answers
156 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 ...
Daniel Oliveira's user avatar
1 vote
1 answer
414 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 ...
Rohith's user avatar
  • 71
6 votes
2 answers
1k 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 ...
GePraxa's user avatar
  • 61
3 votes
0 answers
1k 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 ...
Busturdust's user avatar
3 votes
1 answer
498 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 ...
Vadim Cool's user avatar
3 votes
2 answers
163 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 ...
Arvid Ingemarsson's user avatar
4 votes
0 answers
288 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 ...
latusaki's user avatar
  • 251
6 votes
2 answers
805 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: ...
Stefan van Lingen's user avatar
0 votes
1 answer
2k 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 ...
Yoav's user avatar
  • 319
1 vote
1 answer
1k 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 ...
beppe9000's user avatar
  • 191
2 votes
2 answers
1k 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 ...
Isuru's user avatar
  • 331
2 votes
0 answers
487 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 ...
digEmAll's user avatar
  • 121
0 votes
1 answer
4k 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? ...
Ayan's user avatar
  • 231