Gossamer Forum
Home : Products : DBMan : Customization :

Re: Still having trouble with .pass file (secure password mod)

Quote Reply
Re: Still having trouble with .pass file (secure password mod) In reply to
Ahha! Fixed it!

I am both happy and humbled to say that I have found what turns out to be (don't they all?) the simple fix for the secure password lookup mod.

Seems Carol's currently published mod is missing a few lines in the subroutine change_password.

After
Code:
PASS: foreach $pass (@passwds) { # Go through each pass and see if we match..
next PASS if ($pass =~ /^$/); # Skip blank lines.
chomp ($pass);
($userid, $pw, @rest) = split (/:/, $pass);
if ($userid eq $db_userid) {
$found = $pass;
unless (crypt($in{'old'}, $pw) eq $pw) {
$message = "old password is incorrect";
}
}

but BEFORE the next closing curly brace, you need to add
Code:
else {
$output .= $pass . "\n";
}

This does the trick.

I've posted the complete sub change_password at
http://www.canopydigital.com/fixed-mod/sub-change_password-FIXED.pl.txt
in case anyone can benefit from having the whole subroutine.


I guess I ought to let Carol know so she can fix her mod on her site. She progammed the mod correctly, because she explained it correctly to fharris in a post I mentioned in a prior message.

It was probably just a copy/paste error when she rewrote the mod to incorporate what fharris wanted.

Whew! Crushing your head to find a small typo like that IS humbling. I'm glad I could contribute something, anyway, to Carol's excellent mod!



[This message has been edited by Glen Payne (edited September 17, 1999).]
Subject Author Views Date
Thread Still having trouble with .pass file (secure password mod) Glen Payne 4014 Sep 14, 1999, 5:10 PM
Post Re: Still having trouble with .pass file (secure password mod)
ER 3935 Sep 15, 1999, 7:04 PM
Post Re: Still having trouble with .pass file (secure password mod)
ER 3955 Sep 15, 1999, 7:16 PM
Post Re: Still having trouble with .pass file (secure password mod)
Glen Payne 3934 Sep 15, 1999, 8:22 PM
Post Re: Still having trouble with .pass file (secure password mod)
Glen Payne 3972 Sep 16, 1999, 3:18 AM
Post Re: Still having trouble with .pass file (secure password mod)
Eliot 4008 Sep 16, 1999, 4:44 AM
Post Re: Still having trouble with .pass file (secure password mod)
ER 3923 Sep 16, 1999, 8:25 AM
Post Re: Still having trouble with .pass file (secure password mod)
ER 3942 Sep 16, 1999, 9:14 AM
Post Re: Still having trouble with .pass file (secure password mod)
Glen Payne 4005 Sep 17, 1999, 2:30 AM
Post Re: Still having trouble with .pass file (secure password mod)
ER 3940 Sep 17, 1999, 5:20 AM
Post Re: Still having trouble with .pass file (secure password mod)
Glen Payne 3938 Sep 17, 1999, 5:55 AM
Post Re: Still having trouble with .pass file (secure password mod)
ER 3976 Sep 17, 1999, 11:30 AM
Post Re: Still having trouble with .pass file (secure password mod)
Glen Payne 3933 Sep 17, 1999, 1:55 PM
Post Re: Still having trouble with .pass file (secure password mod)
Glen Payne 3938 Sep 17, 1999, 3:03 PM
Post Re: Still having trouble with .pass file (secure password mod)
ER 3941 Sep 17, 1999, 4:48 PM
Post Re: Still having trouble with .pass file (secure password mod)
Glen Payne 4036 Sep 17, 1999, 5:45 PM
Post Re: Still having trouble with .pass file (secure password mod)
ER 3959 Sep 17, 1999, 11:06 PM