Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Verify Logged-In UserVerify Logged-In User's Password
Previous
 
Next
New Post
3/12/2009 11:32 PM
 

Hello,

My client wishes to allow a user to login to the website, change/add data, and then they need to click a button that produces a PDF with that data.

For "extra" security reasons, the module I am creating must ask for the password a 2nd time (even though the user is logged in), it needs to verify  that the password is correct, and then PDF can be created.

It would be great to get the clear text of the password, because then I would just use that as the password for the pdf.  I want to say this is impossible since it is a 1-way hash, but correct me if I am wrong.

If I could just pass in the entered password and have it return something that would suggest that the password is indeed correct, I could move on.

Thanks for your time.

Chad

 

 

 
New Post
3/12/2009 11:52 PM
 

I actually found the following code but there is something weird going on.

DotNetNuke.Entities.Users.UserController.ValidatePassword("PasswordString");

It isn't validating the currently logged-in user's password as it should.

I put in another password that I use frequently for my test users' passwords, and it returns true.  

Seems strange...

 
New Post
3/12/2009 11:56 PM
 

The ValidatePassword function only checks the web.config for needed strength of password.  That is why I was getting conflicting results.

So I am back to square one.

 
New Post
3/13/2009 12:12 AM
Accepted Answer 

Found what I was looking for.

using System.Web.Security;

....

if (Membership.ValidateUser("username", "password")) //returns true or false

I hope this helps anyone else with the same issue.

 
New Post
3/13/2009 12:54 AM
 

Getting the clear text password can be tricky, but depending on your setup / web.config settings / userbase it could be impossible to decrypt the stored value. However, if things are setup so you can retrieve the password, in the past I've used DotNetNuke.Entities.Users.UserController.GetPassword(DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo, String.Empty) to pull the password and hack SSO with OWA and a few other random web applications.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Verify Logged-In UserVerify Logged-In User's Password


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out