Serious Problem Starting Out With Password Storage Changes

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
1/24/2009 6:23:23 PM
Gravatar
Total Posts 5

Serious Problem Starting Out With Password Storage Changes

I just downloaded mojoportal for the first time today, and loved it... but have run into a serious problem. I built quite a lot of content, and changed many settings. One of these was minimum password length (made it 6) and made it one way hash encoded for greater security. I then signed out to see what a guest might see of what I had done. Now I can't sign back in as admin@admin.com. I can't access anything. Is there a simple workaround? Now that passwords are one way encoded, I can't even go into the db to retrieve it, right?

1/24/2009 6:32:30 PM
Gravatar
Total Posts 5

Re: Serious Problem Starting Out With Password Storage Changes

I found a temporary solution, but still have a problem. The solution was to go into the db and change the PasswordFormat setting to 0 in the mp_Sites table. But I now still don't know how to change this setting to be one-way and still be able to log in.

1/25/2009 3:37:27 AM
Gravatar
Total Posts 18439

Re: Serious Problem Starting Out With Password Storage Changes

I have found that when changing to hashed passwords for some reason that I haven't been able to figure out yet, it doesn't seem to clear the site settings cache so login fails because it hasn't detected the change because the cached copy of site settings still has the previous password format.

You can work around it by touching Web.config file to recycle the app and clear the cache after changing the format (just type a space in it and save or download and re-upload the Web.config if on a host).

Changing password format is not something you want to do frequently, once you decide on it you should stick with it. I would first change your admin user to your own email address and password. I would recommend encrypted over hashed unless you have very high security needs. Password recovery only works with clear text and encrypted and we don't currently have a mechanism for users to reset their password if using hashed, though an admin can set it (but then the admin knows what it is).

To change to encrypted after having already changed to hashed, you would have to change back to clear text first. Since hashed can't be decrypted a new random password will be generated that you'll have to lookup in the db and optionally change to what you want then make the change to encrypted.

Hope it helps,

Joe

1/25/2009 8:00:48 AM
Gravatar
Total Posts 5

Re: Serious Problem Starting Out With Password Storage Changes

Thanks for your quick response Joe. I'm not sure the problem has to do with caching of the site. Because after I set it to hashed, when I went into the DB to look around, the passwords were still in clear text. So they were never encrypted and hashed after I changed the setting.

I personally think that hashed is going to become a very important security measure, for all web sites. Here's my thinking - curious about yours: While my site has no critical personal info, many people use a small set of passwords for many sites, rather than a unique one per site. If someone can retrieve users' passwords from a non-critical site, they'll be able to get into other critical sites. While that isn't my responsibility (you can say it's the user's fault for using the same password), as a good citizen I want to hash my sites, and I think all sites should hash. I know it makes password recovery impossible, but that's the point, right?

What do you think?

 

 

1/25/2009 8:20:12 AM
Gravatar
Total Posts 18439

Re: Serious Problem Starting Out With Password Storage Changes

If its not changing in the db it sounds like a bug. However I can't produce it here running the latest code. Any more info about your environment, db platform IIS version, medium trust or full?

I agree with your reasoning about the risky user behavior such as using the same password across sites, but its not for me to decide, I leave it up to site owners.

Generally I try to encourage use of OpenID or Windows Live ID among users in which case we don't have their passwords at all and they can use the same one across supported sites.

Not being able to recover a hashed password is a feature of using hashed passwords, however, we currently lack a usable alternative like the ability to reset it which is really needed for this case.   The idea would be that the user can click the "I forgot my password" link and be able to send an email to their own account. The email would have a link with a code to allow the user to change his password without knowing the current password. The code would have a short expiration.

I plan to implement this as soon as I have time but I have a lot of irons in the fire at the moment.

Best,

Joe

1/25/2009 8:43:49 AM
Gravatar
Total Posts 5

Re: Serious Problem Starting Out With Password Storage Changes

Joe, a couple of things.

1. For our application (www.innovationstyles.com), we use hashed, and if the user forgets their password, we email them a new, randomly generated one that they can use to log in (we generate the password, email it to them, then store it hashed). They can then change their password but only if they want to. The code is in Visual Basic (VS 2003). Would it be useful to you if I dug that up and sent it to you?

2. My environment: I'm running on my local XP Pro virtual machine (on a Mac) with IIS 5.1; SQL Server 2000; Not sure of the trust level (it's probably minimal, since it's on my local machine).

Regards,

--- Alain

1/25/2009 8:58:56 AM
Gravatar
Total Posts 18439

Re: Serious Problem Starting Out With Password Storage Changes

Hi Alain,

I don't need the code, but the approach is a good suggestion as it would certainly be easier to implement than what I had thought of and it seems a more obvious approach now that you've said it.

I will try to get to that very soon, hopefully before the next release which is coming out next week.

Best,

Joe

1/25/2009 10:23:27 AM
Gravatar
Total Posts 18439

Re: Serious Problem Starting Out With Password Storage Changes

fyi, I just implemented this, so it will definitely be in the next release coming soon.

Best,

Joe

1/25/2009 10:29:13 AM
Gravatar
Total Posts 5

Re: Serious Problem Starting Out With Password Storage Changes

Wow, I guess you got excited about doing it, cause I'm sure there's nothing else on your plate! Btw, is there an email address for you on the site, for me to ask some professional questions (as in hiring you or others to do some dev work)? Or should I keep writing here?

 

--- Alain

1/25/2009 10:36:35 AM
Gravatar
Total Posts 18439

Re: Serious Problem Starting Out With Password Storage Changes

Well it was an easy solution I figured might as well do it while its on my mind and be done with it.

I've got a pretty full plate so my availability is very limited. I created a Job Board forum, you might try posting there.

I do have a contact form on this site but I guess its a little too buried at the bottom of this page. I need to do some site reorganization and make that easier to find.

Best,

Joe

joe dot audette at g mail dotcom

You must sign in to post in the forums. This thread is closed to new posts.