XPressME Integration Kit

Trac

Changeset 130


Ignore:
Timestamp:
Mar 21, 2009, 4:42:39 PM (15 years ago)
Author:
toemon
Message:

ImpressCMSのパスワードがMD5ではなくicms_encryptPass()で生成された64bitのデータの場合ログインできなくなるバグ修正
ユーザ同期時のメッセージでワーニングとなるバグ修正

Location:
trunk/wp-content/plugins/xpressme/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/plugins/xpressme/include/pluggable-override.php

    r123 r130  
    6767function xpress_login(){ 
    6868        global $current_user; 
     69        global $xoopsModule,$xoopsUser,$xoopsUserIsAdmin; 
    6970         
    70         if(is_object($GLOBALS["xoopsUser"])){ 
    71                 $u_name = $GLOBALS["xoopsUser"]->getVar("uname"); 
    72                 $u_pass_md5 = $GLOBALS["xoopsUser"]->getVar("pass");     
     71        if(is_object($xoopsUser)){ 
     72                $u_name = $xoopsUser->getVar("uname"); 
     73                $u_pass_md5 = $xoopsUser->getVar("pass");        
    7374                if ( ! empty($u_name) && ! empty($u_pass_md5) ) { 
    7475                        include_once dirname( __FILE__ ).'/user_sync_xoops.php'; 
    7576                        repair_user_meta_prefix();  //Repair when data base prefix is changed on XOOPS side 
    7677                        $messege = ''; 
    77                         $ret = user_sync_to_wordpress($GLOBALS["xoopsUser"]->getVar("uid"),$messege); 
     78                        $ret = user_sync_to_wordpress($xoopsUser->getVar("uid"),$messege); 
    7879                        if ($ret){ 
    7980                                $user = new WP_User(0, $u_name); 
     
    130131        global $wp_hasher; 
    131132 
     133        if ($hash == $password){ // The password taken out of XOOPS is hash value. 
     134                return apply_filters('check_password', true, $password, $hash, $user_id); 
     135        } 
    132136        // If the hash is still md5... 
    133137        if ( strlen($hash) <= 32 ) { 
    134                 if (( $hash == md5($password)) || ($hash == $password)) {  // The password taken out of XOOPS is hash value. 
    135                         $check = true; 
    136                 } else { 
    137                         $check = false; 
    138                 } 
    139  
     138                $check = ( $hash == md5($password) );    
    140139/* A new hash is not used because it differs from the hash on the XOOPS password.  
    141140 *              if ( $check && $user_id ) { 
  • trunk/wp-content/plugins/xpressme/include/user_sync_xoops.php

    r95 r130  
    138138                                        $sycc_user = new WP_User($wp_user_id); 
    139139                                        $sycc_user->set_role($capabillities_name); 
    140                                         $message .= '...UPDATE ' . $user_login_name . '(' . $capabillities_name . ')'; 
     140                                        $message .= '...UPDATE ' . $xoops_user->uname . '(' . $capabillities_name . ')'; 
    141141 
    142142                                } else { 
    143                                         $message .= '...UPDATE ' . $user_login_name . '(Level Not Change)'; 
     143                                        $message .= '...UPDATE ' . $xoops_user->uname . '(Level Not Change)'; 
    144144                                } 
    145145                        }else{ 
Note: See TracChangeset for help on using the changeset viewer.