The following is my personal analysis result. If any error occurs, please forgive me.
The main issue is password retrieval.
Member. php? Action = getpw
View code
Case getpw:
$ Showsubmenu = 0;
$ Log_status & showmsg ($ lang [login_already], $ forward );
If (isset ($ _ POST [submit]) {
$ Msg = $ _ POST [hash] = $ ghash? : $ Lang [hash_error];
If ($ set_captcha [1]) {
$ Msg or check_captcha ($ _ POST [captcha]) or $ msg = $ lang [checkcode_error];
}
$ Username = trim ($ _ POST [username]);
$ Email = trim ($ _ POST [email]);
If (! ($ Member-> checkuser ($ username, 0) & $ member-> checkemail ($ email, 0) {// 0 indicates that the check is not performed
Showmsg ($ member-> info );
}
$ R = $ member-> get (0, 'userid', 'email ', 'Question', 'answer', "username = $ username ");
If ($ r ){
$ Answer = shtmlspecialchars ($ _ POST [answer]);
If ($ r [email]! = $ Email) showmsg ($ lang [email_name_error]);
Elseif ($ r [question] & $ answer! = $ R [answer]) showmsg ($ lang [answer_error]);
Else {
$ Newpwd = substr (gethash ($ TIME. $ IP), 6, 12 );
$ Member-> modipwd ($ r [userid], $ newpwd, $ newpwd, 1) or showmg ($ member-> info );
Include JXCMS_ROOT. include/mail. func. php;
$ Mail_subject = & $ lang [getpw_emailtitle];
$ Mail_content = sprintf ($ lang [mail_body], $ username, $ lang [your_new_password]. $ newpwd, $ set_ceomail, $ set_contact );
If ($ set_sendtype = mail ){
Basic_sendmail ($ email, $ set_ceomail, $ set_name, $ mail_subject, $ mail_content, html );
} Elseif ($ set_sendtype = nmail ){
Nmail ($ email, $ set_ceomail, $ set_name, $ mail_subject, $ mail_content, html );
} Elseif ($ set_sendtype = smtp ){
Smtp_sendmail ($ email, $ set_ceomail, $ set_name, $ mail_subject, $ mail_content, html );
}
Showmsg ($ lang [getpw_sucess], login. php, 3000 );
}
} Else showmsg ($ lang [email_n