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 5052 Sep 14, 1999, 5:10 PM
Post Re: Still having trouble with .pass file (secure password mod)
ER 4957 Sep 15, 1999, 7:04 PM
Post Re: Still having trouble with .pass file (secure password mod)
ER 4976 Sep 15, 1999, 7:16 PM
Post Re: Still having trouble with .pass file (secure password mod)
Glen Payne 4956 Sep 15, 1999, 8:22 PM
Post Re: Still having trouble with .pass file (secure password mod)
Glen Payne 4993 Sep 16, 1999, 3:18 AM
Post Re: Still having trouble with .pass file (secure password mod)
Eliot 5029 Sep 16, 1999, 4:44 AM
Post Re: Still having trouble with .pass file (secure password mod)
ER 4944 Sep 16, 1999, 8:25 AM
Post Re: Still having trouble with .pass file (secure password mod)
ER 4964 Sep 16, 1999, 9:14 AM
Post Re: Still having trouble with .pass file (secure password mod)
Glen Payne 5029 Sep 17, 1999, 2:30 AM
Post Re: Still having trouble with .pass file (secure password mod)
ER 4963 Sep 17, 1999, 5:20 AM
Post Re: Still having trouble with .pass file (secure password mod)
Glen Payne 4959 Sep 17, 1999, 5:55 AM
Post Re: Still having trouble with .pass file (secure password mod)
ER 4999 Sep 17, 1999, 11:30 AM
Post Re: Still having trouble with .pass file (secure password mod)
Glen Payne 4959 Sep 17, 1999, 1:55 PM
Post Re: Still having trouble with .pass file (secure password mod)
Glen Payne 4964 Sep 17, 1999, 3:03 PM
Post Re: Still having trouble with .pass file (secure password mod)
ER 4969 Sep 17, 1999, 4:48 PM
Post Re: Still having trouble with .pass file (secure password mod)
Glen Payne 5058 Sep 17, 1999, 5:45 PM
Post Re: Still having trouble with .pass file (secure password mod)
ER 4982 Sep 17, 1999, 11:06 PM