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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:13:34+00:00 2026-05-14T18:13:34+00:00

The normal flow for resetting a user’s password by mail is this: Generate a

  • 0

The normal flow for resetting a user’s password by mail is this:

  1. Generate a random string and store it in a database table
  2. Email string to user
  3. User clicks on link containing string
  4. String is validated against database; if it matches, user’s pw is reset

However, maintaining a table and expiring old strings etc seems like a bit of an unnecessary hassle. Are there any obvious flaws in this alternative approach?

  1. Generate a MD5 hash of the user’s existing password
  2. Email hash string to user
  3. User clicks on link containing string
  4. String is validated by hashing existing pw again; if it matches, user’s pw is reset

Note that the user’s password is already stored in a hashed and salted form, and I’m just hashing it once more to get a unique but repeatable string.

And yes, there is one obvious “flaw”: the reset link thus generated will not expire until the user changes their password (clicks the link). I don’t really see why this would be a problem though — if the mailbox is compromised, the user is screwed anyway. And there’s no risk of reuse, since once the user’s password is changed, the reset link will no longer match.

  • 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-14T18:13:35+00:00Added an answer on May 14, 2026 at 6:13 pm

    To remedy the obvious flaw, add the current date (and more time-related info representing current fraction of a day if even a day is too long) to what you’re hashing to generate the mystery string and check it — this makes the string “expire” (you may check the previous as well as current date or fraction if you want longer “expiry”). So it seems to me that your scheme is quite viable.

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

Sidebar

Related Questions

How can I prevent a user from neglecting the normal work flow of a
This is how my flow works. User clicks on a link - find ,
Is it possible to restore the normal execution flow of a C program, after
If absolutely positioned or fixed positioned elements are taken out of the normal flow,
Using exceptions for normal flow of code is bad - it's slow, it's bad
I read somewhere that one should never use error conditions as normal program flow.
What are the CSS properties that get elements out of the normal flow? Such
Firstly it is not an exception since it is part of the normal flow
The normal flow is to have JavaScript manipulate the DOM. For example, I have
I want to Show images using cover flow effect.I have done with Normal coverflow

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.