Fork me on GitHub

LostPassword fix  Bottom

Go to page 1 - 2 [+1]:

  • Many users get lost in this process!
    As a quick albeit imperfect fix, we changed modules/NS-LostPassword/user.php as follows.

    DEMO: this fix is in place at the ISSHO site: http://www.issho.org/

    Objective:
    1) Remove the line that advises the user to use the data received to get a new password at http://www.issho.org/user.php" . Users may assume that http://www.issho.org/user.php is the place to input the confirmation code. 2) Add "go back" in the hope that the user will click it, and go back a page with the browser.

    Code

    $message = ""._USERACCOUNT." '$uname' "._AT." $sitename \n\n"._YOURCODEIS." $areyou \n\n";
                $subject = ""._CODEFOR." $uname";
                // 11-09-01 eugeniobaldi not compliant with PHP < 4.0.5
                // pnMail($email, $subject, $message, "From: $adminmail\nX-Mailer: PHP/" . phpversion(), "-f$adminmail");
                pnMail($email, $subject, $message, "From: $adminmail\nX-Mailer: PHP/" . phpversion());
                                                                                   
                include 'header.php';
                                                                                   
                echo "<center><font class=\"pn-title\">"._CODEFOR." ".pnVarPrepForDisplay($who)." "._MAILED." - "._GOBACK."</font>";
  • I think we've all had this problem and users not understanding that they have to get the code first before they get a password. Perhaps it would help if we had a separate page for entering the confirmation code load upon the confirmation that it has been sent. In such case the email with the code would also link back to this same page.

    More importantly, forgotten passwords are common because people can't remember the passwords they're given. I'd like to see a different way of handling the new user registration which would allow them to write their own password but not get in until they activate the account by entering a code mailed to their email address. I'd give them a set amount of time and then 'expire" the activation code.

    Slugger
  • Quote


    I think we've all had this problem and users not understanding that they have to get the code first before they get a password. Perhaps it would help if we had a separate page for entering the confirmation code load upon the confirmation that it has been sent. In such case the email with the code would also link back to this same page.


    Well think about it, just to annoy you, a malicious mmber could reset your password for you, if htye knew your username, and the process was only one step. Adding in the confirmation code prevents this happening.

    Quote


    More importantly, forgotten passwords are common because people can't remember the passwords they're given. I'd like to see a different way of handling the new user registration which would allow them to write their own password but not get in until they activate the account by entering a code mailed to their email address. I'd give them a set amount of time and then 'expire" the activation code.


    An improved system for new user registrations is being looked at for .8.

    --
    itbegins.co.uk - Zikula Consulting

    birtwistle.me.uk - Personal Blog


    Please read the Support Guide
  • C'mon H-squared! You can't annoy me!

    I didn't say anything about dumping the two step process what I said was that many people don't understand that it is a two step process. Or, as Laszlo said, "many users get lost in the process."

    I understand why the confirmation code is needed, still, because it's a waste of everyone's time when users get confused and need hand holding, I'd like to see the process as idiot proof as possible.

    I think we can come up with a better system without compromising security and my reference to an "activation code" was with respect to new users and the original registration process. If new users picked their own passwords from the outset, I bet you'd have fewer forgotten passwords.

    Slugger
  • Slugger


    I think we can come up with a better system without compromising security and my reference to an "activation code" was with respect to new users and the original registration process.


    If you can come up with such a modification, I'd be happy to give it a spin. The most important thing for the persons working on the password-retrieval function:
    Actually forget your password and use the system to retrieve it, now and again. :)
  • Quote


    I understand why the confirmation code is needed, still, because it's a waste of everyone's time when users get confused and need hand holding, I'd like to see the process as idiot proof as possible.


    If you don't have a confirmation code, how do I know that you are the real-user who lost the password?

    Let's say that if I want to hack your account, so I go to the lost-password screen to reset your password. How would the system know if it should reset the password or not? (For if it goes ahead and reset as my suggestion, then you will be log out from your account for good, even if I can't get your new password in the process). What PN should have done is do it the X-User way: instead of mail out a confirm code, send it plus a link so that the user can just click on the link and activate their new password reset...
  • Slugger


    I understand why the confirmation code is needed


    Slugger
  • At present, the script changes the password and send it to the user.

    But that is not what the user wants. The user wants to retrieve the lost password, and not necessarily to have it changed.

    I think a simple function whioch sends the existing password without changing it to the e-mail which is on file would do the trick.
  • manarak

    I think a simple function whioch sends the existing password without changing it to the e-mail which is on file would do the trick.


    But that's not technically feasible. The password is stored in the database as an MD5 hash. MD5 hashes are one way i.e. once the password is hashed the original string cannot be determined except by brute force cracking techniques.

    The login function works by taking what the user typed into the password field, MD5 hashing it and comparing it to the hashed password in the DB. If the two match then the user typed the password correctly.

    So as you can see sending the user a copy of thier existing password is actually impossible.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • I understand.

    Well, I have a site with over 20,000 users.
    Everyday I get bounced mails in my root account, because people typed in their e-mail address wrong. Other people open 2 or 3 accounts because they cannot figure out how to type the password properly or because they do not activate cookies.
    This is the case for about 25% of the members (it is not a bright crowd, believe me).

    Second, I receive also nearly everyday mails from people telling me that the password retrieval/resetting function does not work. Mostly they do not read the instructions which I put on the page, and they do not read the e-mail they get with the confi code.

    They are stupid - ok. But this is a case where I would like to be able to switch to a weaker encryption than MD5 and change the password retrieval to a simple 1-step procedure.
    The 2-step procedure as it is now is not a problem for computer literate users (as we are all here) or for high security portals.
  • manarak,

    I can understand your problem but if you need to ask where and how to do it then i'd probably not recommend it. At a guess (a full code audit would be needed to be sure) then you'd have to alter the core pnUserLogin API, the user signup module (NS-NewUser module under .726), the Lost Password module (NS-LostPassword) and possibly the users module (NS-User). You would also not be able to use any additional users code (pncUserHack or xuser).

    As you can see this wouldn't be an easy undertaking and would require some decent PHP coding skills.

    Still if your users don't have the ability to type thier e-mail address correctly then I doubt there's too much you can do... As if it's not the lost password page it'll be something else ;)

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Users couldbe/should be more resourceful. I say that more than once per day.
    But as we cannot expect the average user to know that Backing Up with the browser is called for when the "confirmation code sent" screen appears, that particular flaw should be taken care of. If anyone can do a better job with my hack for pn726, please do.
  • Hello Lazlo and Mark

    Lazlo, you hack is a step in the right direction. In my opinion, the problem is not only about lost passwords, but also about features of the users module.
    I agree that users should be more resourceful, but... -ahem- well... you know how the users are.

    Your hack could maybe be improved further by including a javascript to automatically forward the user to a different looking screen where it says: "And now look into your mailbox and type your username here: ____ and your confirmation code here: ____".
    Just an idea.

    Mark, I would like to emphasize that it is not a good thing if larger general public sites (with users that are not particularly computer literate) are running into issues with PN, because exactly those sites are prescriptors for the product. Also, maximum security may not be needed for that kind of site.
    PN should be able to cope with the (dis-)abilities of users of these sites.

    I read that the users module is being reworked, so maybe it could be possible to think about the following points:
    - make the lost password module better (I think Lazlo's work is a good start)
    - give a choice at installation to choose a 2 way encryption for the password (and then make the password retrieval in only 1 step)
    - give an option to let the users choose their password at signup
    - give an option to force users to activate their membership by clicking on a link in their mail
    - give admin a function to wipe unactivated accounts after a period of time set by admin

    Best Regards
    Manarak
  • manarak


    - make the lost password module better (I think Lazlo's work is a good start)

    I certainly aim to make it more obvious as to the process involved. Some of the confusion certainly comes from some of the english language defines being written some whose first language isn't english. I'll be looking at keeping this as simple as possible while maintaining the security of the process.

    manarak


    - give a choice at installation to choose a 2 way encryption for the password (and then make the password retrieval in only 1 step)

    This is an incredidbly difficult feature to code as this would require significant changes. I personally see a one way hashed password as a minimum for a web application. Think about security issues resulting from the transmission of decodable content over the web, think about the potential abuse from a site admin that could decrypt users passwords - How many PN sites are you signed up too?, Do you use the same password for each? Now if I could get you to signup to my site and could then decrypt your password and use it to gain access to other sites you've signed up too... Next question do you use the same password for your PN sites admin password as your do for signups on other PN sites (I hope not..)

    As you can there are many, many issues. Saying that i'm in the process of opening up the authentication process to a more module structure so that new authentication module can be written to authenticate users to other source be it an LDAP directory, an existing DB (say phpbb etc.). So it would be possible for you to write an auth module with weaker encrytion.

    manarak


    - give an option to let the users choose their password at signup

    Done....

    manarak


    - give an option to force users to activate their membership by clicking on a link in their mail

    Done....

    manarak


    - give admin a function to wipe unactivated accounts after a period of time set by admin

    Currently with PN .8 this could be done via an SQL query that would take the acivated status and the registration date. However I can look at adding this as an admin selectable option.

    Overall I think you've got some good ideas but possibly 'hold the hand' of your users a little too much. Sometimes you have to be willing to say "that's the way it works and here's why".

    Working in a university I quite often find that users will ask and ask for something to made easier until you sit down with then and show then how and why something works the way it does and state clearly that's not going to change at which point they learn how to do it and get on with it. Not to say that this could or should apply to your users but.....

    Note that one of the overall goals for PN .8 is for a significant improvement in accessability and usability. This is being done in a number of ways. Firstly a significant cleaning of the outputed HTML, significant reduction in the use of tables i.e. CSS layouts with tables used for tabluar data, compliance with a strict HTML doctype. Thento look at each process to make sure that it functions in the easiest way possible while not compromising security.

    However security and usability are often at odds with other and is something that even corporate software authors struggle with. Take OutLook as an example; ease of use features like automatically displaying the contents of e-mail and attachments. While this made the process of reading e-mail simpler it's obvious the security that have been caused by this usability feature. Now if we look at the bigger picture has this really made things easier or has the ease by which virus can be spread meant there are more virus, meaning people have to take more steps to protect themselves. Ultimately meaning that the process of reading one's e-mail is now MORE difficult as the result of a feature that was meant to make it EASIER. A classic example of cause and effect at work.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • laszlo

    Users couldbe/should be more resourceful. I say that more than once per day.
    But as we cannot expect the average user to know that Backing Up with the browser is called for when the "confirmation code sent" screen appears, that particular flaw should be taken care of. If anyone can do a better job with my hack for pn726, please do.


    Tony,

    I'll be adding your change to my test .726 setup and making sure the .8 lost password process is as easy as possible.

    Thanks for taking the time to point out the flaw and come up with a solution. As i've commented on in my reply to manarak some of the problem stems from the english language defines not being written by a native english speaker.

    -Mark

    --
    Visit My homepage and Zikula themes.

Go to page 1 - 2 [+1]:

This list is based on users active over the last 60 minutes.