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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:25:23+00:00 2026-05-13T10:25:23+00:00

net website, i would like to implement forget password. I am using following steps

  • 0

net website, i would like to implement forget password. I am using following steps

  1. Form having input box for login Id and email Id and CAPTCHA
  2. when user enter details and submit, at backend after validation new password is generated and replaced old password at database.
  3. New passowrd is send to user at email.

Please help me whether i am doing right or not?

Is there any other secure mechanism for the same?

[EDIT]
Thanks, i got your reply. Really this is a secure mechanism. But here i have few doubt

  1. What message should i shown to user when he enter loginId and email address at forgotten password page?
  2. Whether message would be same for valid user and mallicious user?
  3. Advantage of using CSRF token? Any help / link
  4. When user click on link then what should i do; because as i guess user should automatically loggin into their account -then after that i have 2 choice (first) send new password automatically to user (second) new form will shown to user where user will enetr old password and new password twice?

Please help?

  • 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-13T10:25:24+00:00Added an answer on May 13, 2026 at 10:25 am

    I can see why you’d want a CAPTCHA, but I’d take a different approach.

    1. When a password reset is requested check that a reset has not already been requested for that account within the last X minutes. If a password has already been requested ignore the reset request.
    2. Check the IP requesting the password reset. If that IP has requested a password reset in the last Y minutes ignore the request.
    3. If the checks in 1 & 2 pass check the account exists. If it doesn’t ignore the request.
    4. If we’ve gotten this far generate a one time token, which expires in Z minutes and a password reset URL which encompasses this token. Email this to the registered email address. When the URL is loaded prompt for a new password and reset.

    For those who believe that you should tell the user where the email has gone I strongly disagree. This is “information leakage”, even if you do limit it to the domain name. For example say I’ve registered on JeffAtwoodEatsBabies.com as blowdart. If Jeff had requested a password reset for me and you showed the registration domain then he’d see idunno.org. This is my personal domain and thus Jeff would know the blowdart user is, in fact, me. This is a bad bad thing. I should not have to register using hotmail or gmail or whatever in order to protect myself from your code showing an email domain to all and sundry.

    In addition you shouldn’t be showing error messages at all. No matter what happens, a username is not actually registered, or too many requests have been made or the sky has fallen you should be telling the user that the password reset procedure has started. Informing a user that an account doesn’t exist is more information leakage.

    One final thing you could do is add a CSRF token to the reset request page, so it cannot be driven from other web sites.

    Followup

    So to answer your further questions.

    1. What message you show is up to you. “Instructions for resetting your password have been emailed to the registered email for this account” is one idea, but really it’s down to your audience.
    2. Already addressed above.
    3. Wikipedia is a good starting point. How you do it depends on your platform and is a complete other question! For ASP.NET you could look at my codeplex project, http://anticsrf.codeplex.com or look at ViewStateUserKey.
    4. When the link is clicked I would first validate the token in the URL against the username it’s being applied to then I would either allow the user to enter a new password, or generate a new one and email it. You can’t prompt for the old one, as the whole point is the user has forgotten it!
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 400k
  • Answers 400k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer What you're looking for is called apply. May 15, 2026 at 4:08 am
  • Editorial Team
    Editorial Team added an answer I found out myself but thanks anyway for looking but… May 15, 2026 at 4:08 am
  • Editorial Team
    Editorial Team added an answer Here are some responses prepared earlier: What Ruby and Rails… May 15, 2026 at 4:08 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.