Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6191977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:51:54+00:00 2026-05-24T02:51:54+00:00

I’m improving security of user sessions in my web application, but I got into

  • 0

I’m improving security of user sessions in my web application, but I got into trouble. Some of items from my list of security improvements causes user to relogin from time to time. Here’s my list, which of then are widely accepted and used? Which are used by you?

  • checking users ip address (it changes for mobile internet connection) edit: there’s no reasonable way to gain access to user ip
  • checking HTTP_USER_AGENT(some browsers like IE and mobile devices browsers changes it from time to time during single session)
  • allowing only one session per one user id (when user log in from two locations, he’s signed out in the first one)
  • regenerating session id after each request

Are there any other? My application doesn’t process too sensitive data, but should be protected at certain level.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:51:54+00:00Added an answer on May 24, 2026 at 2:51 am

    checking HTTP_USER_AGENT(some browsers like IE and mobile devices browsers changes it from time to time during single session)

    Given that the HTTP_USER_AGENT is controlled by an attacker, you can’t trust it, but you can use it as a signal to detect when a user is legitimately logged in and an impersonator is logged in. The IP address is a similar signal. You may want to look at such signals and choose to weight them so that you get a tolerable level of false negatives.

    allowing only one session per one user id

    Depending on what you mean by it, it may not be strictly necessary, but if you are going to do

    regenerating session id after each request

    then you do need to invalidate the old ID when you assign the new to avoid the class 1 session fixation vulns : “A web application authenticates a user without first invalidating the existing session ID, thereby continuing to use the session ID already associated with the user.”

    When generating IDs, make sure you don’t allow untrusted inputs to limit the session IDs that you might generate and make sure your session IDs aren’t predictable. Otherwise you are susceptible to the type 2 session fixation attacks : “An attacker is able to force a known session ID on a user so that, once the user authenticates, the attacker has access to the authenticated session.”

    See https://www.owasp.org/index.php/Session_Management for other security tips on dealing with sessions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a French site that I want to parse, but am running into
I need to clean up various Word 'smart' characters in user input, including but
Seemingly simple, but I cannot find anything relevant on the web. What is the
I am currently running into a problem where an element is coming back from
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.