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 586473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:06:39+00:00 2026-05-13T15:06:39+00:00

I have a website (the basic gist of which is described in this question

  • 0

I have a website (the basic gist of which is described in this question), and I want to have some way to store the username and some information about the user consistently while they use the site (ie, upload and download data).

Right now, given a successful login, I was returning the hash of the password as well as any associated information. Anytime a user tries something, their username, hash, and so forth must match what’s in the database. If the user logs out, their local Sinatra session has all information flushed.

I realize that this is a very naive approach. Is there a better way to handle user session information? The wikipedia entry on cookies mentions that a session uid is used instead of this other information; what is the advantage of that approach? I suspect that this approach is also vulnerable to other attacks, but since I verify everything that’s done as it’s done, I’m not sure what attacks I’m leaving myself open to.

Also, if/when I implement ssl, will these transactions be ‘automagically’ encrypted, or will I need to do something else to make sure that the strings are protected, if they need to be?

  • 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-13T15:06:39+00:00Added an answer on May 13, 2026 at 3:06 pm

    This is actually a very complicated issue. Just to illustrate, you have the problem of account lock-out: If you lock out based on failed attempts, how easy is it for an attacker to DOS your website?

    I’ll list a few best-practices to get you started:

    1. Store Passwords Salted and Hashed alongside the Username and UserId. (You should also store the salt next to the hash.)

    2. Disallow frequent bad-password attempts. (More frequent than once every few seconds).

    3. If attempts are failing for any given user or any given IP address (more than 3 times a minute) require some form of human-validation, like a CAPTCHA. This allows you to prevent total DOS attacks.

    4. If implementing an auto-login system, use a token authentication system.

    5. For token authentication systems, use a Secure random number generator, send the plain token to the users, but Salt and Hash the token at the database.

    6. Use TLS/SSL if possible, but don’t rely on their security once the data is off-the-wire.

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

Sidebar

Related Questions

I have some website which requires a logon and shows sensitive information. The person
I have a Rails app with some basic models. The website displays data retrieved
I have a website running a basic ASP.NET application that is mostly used from
I have created a pretty basic Flash website for a client and am having
We have a website that uses #include file command to roll info into some
I have a website that plays mp3s in a flash player. If a user
I have a website that I've just uploaded onto the Internet. When I browse
I have a website that is perfectely centered aligned. The CSS code works fine.
I have a Website that is really slow and feels really bad when using
I have a website where we use Javascript to submit the login form. On

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.