woocommerce offtopic - Is this code collecting user password?

I am using an OTP SMS Plugin which has the following code which runs on checkout and loginregister page of woocommerce:

I am using an OTP SMS Plugin which has the following code which runs on checkout and login/register page of woocommerce:

function smsalert_site_challenge_otp($user_login, $user_email, $errors, $phone_number=null,$otp_type,$password="",$extra_data=null,$from_both=false)
    {
        SmsAlertUtility::checkSession();
        $_SESSION['current_url']    = SmsAlertUtility::currentPageUrl();
        $_SESSION['user_email']     = $user_email;
        $_SESSION['user_login']     = $user_login;
        $_SESSION['user_password']  = $password;
        $_SESSION['phone_number_mo']= $phone_number;
        $_SESSION['extra_data']     = $extra_data;
        _handle_otp_action($user_login,$user_email,$phone_number,$otp_type,$from_both);
    }

The function is called as follows:

function _handle_validate_otp_choice_form($postdata)
    {
        SmsAlertUtility::checkSession();
        if($postdata['mo_customer_validation_otp_choice'] == 'user_email_verification')
            smsalert_site_challenge_otp($_SESSION['user_login'],$_SESSION['user_email'],null,$_SESSION['phone_number_mo'],"email",$_SESSION['user_password'],$_SESSION['extra_data'],true);
        else 
            smsalert_site_challenge_otp($_SESSION['user_login'],$_SESSION['user_email'],null,$_SESSION['phone_number_mo'],"phone",$_SESSION['user_password'],$_SESSION['extra_data'],true);

Does this line $_SESSION['user_password'] = $password;mean that passwords are collected?

I am using an OTP SMS Plugin which has the following code which runs on checkout and login/register page of woocommerce:

function smsalert_site_challenge_otp($user_login, $user_email, $errors, $phone_number=null,$otp_type,$password="",$extra_data=null,$from_both=false)
    {
        SmsAlertUtility::checkSession();
        $_SESSION['current_url']    = SmsAlertUtility::currentPageUrl();
        $_SESSION['user_email']     = $user_email;
        $_SESSION['user_login']     = $user_login;
        $_SESSION['user_password']  = $password;
        $_SESSION['phone_number_mo']= $phone_number;
        $_SESSION['extra_data']     = $extra_data;
        _handle_otp_action($user_login,$user_email,$phone_number,$otp_type,$from_both);
    }

The function is called as follows:

function _handle_validate_otp_choice_form($postdata)
    {
        SmsAlertUtility::checkSession();
        if($postdata['mo_customer_validation_otp_choice'] == 'user_email_verification')
            smsalert_site_challenge_otp($_SESSION['user_login'],$_SESSION['user_email'],null,$_SESSION['phone_number_mo'],"email",$_SESSION['user_password'],$_SESSION['extra_data'],true);
        else 
            smsalert_site_challenge_otp($_SESSION['user_login'],$_SESSION['user_email'],null,$_SESSION['phone_number_mo'],"phone",$_SESSION['user_password'],$_SESSION['extra_data'],true);

Does this line $_SESSION['user_password'] = $password;mean that passwords are collected?

Share Improve this question edited Jun 22, 2019 at 8:46 dc09 asked Jun 22, 2019 at 8:24 dc09dc09 1952 silver badges14 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

No, it means that the password is stored in SESSION.

So yes, it is remembered for some time and it’s not the best idea.

The more important thing is what is it used for and how is it processed.

It looks like it stores the password, so it can delay login process - it sends SMS, checks One-Time Password and only then performs normal WP password check, I guess.

But to be sure, you should check if that’s the only thing the stored password is used for.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745377935a4625087.html

相关推荐

  • woocommerce offtopic - Is this code collecting user password?

    I am using an OTP SMS Plugin which has the following code which runs on checkout and loginregister page of woocommerce:

    6小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信