diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index f09d6eb00..ee4f9d4be 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -50,6 +50,7 @@ - fixed #8818: Visitor sends a welcome message - added: "EditArea" code highlighter and editing tool for WebGUI::Form::Codearea, used in Template, Snippet, SQLReport, and more + - fixed: email password recovery allows sending recovery mail to arbitrary address 7.6.0 - added: users may now customize the post received page for the CS diff --git a/lib/WebGUI/Auth/WebGUI.pm b/lib/WebGUI/Auth/WebGUI.pm index 916f84c7f..67626733d 100644 --- a/lib/WebGUI/Auth/WebGUI.pm +++ b/lib/WebGUI/Auth/WebGUI.pm @@ -998,7 +998,7 @@ sub emailRecoverPasswordFinish { my $recoveryGuid = $session->id->generate(); my $url = $session->url->getSiteURL; my $userId = $user->userId; #get the user guid - $email = $user->profileField('email') unless $email; #get email address from the profile, unless we already have it + $email = $user->profileField('email'); my $authsettings = $self->getParams($userId); $authsettings->{emailRecoverPasswordVerificationNumber} = $recoveryGuid; @@ -1008,7 +1008,7 @@ sub emailRecoverPasswordFinish { my $mail = WebGUI::Mail::Send->create($session, { to=>$email, subject=>$i18n->get('WebGUI password recovery')}); $mail->addText($i18n->get('recover password email text1', 'AuthWebGUI') . $url. ". \n\n".$i18n->get('recover password email text2', 'AuthWebGUI')." \n\n ".$url."?op=auth;method=emailResetPassword;token=$recoveryGuid"."\n\n ". $i18n->get('recover password email text3', 'AuthWebGUI')); $mail->send; - return "