Ignore:
Timestamp:
2013/11/18 15:20:47 (13 years ago)
Author:
m_uehara
Message:

#2465 r23269 - r23272, r23274 - r23275, r23277 - r23278 をマージ

Location:
branches/version-2_13-dev/data/class/pages/mypage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/data/class/pages/mypage/LC_Page_Mypage_DeliveryAddr.php

    r23124 r23279  
    8181            $ParentPage = htmlspecialchars($_POST['ParentPage'], ENT_QUOTES); 
    8282        } 
     83 
     84        // 正しい遷移かをチェック 
     85        $arrParentPageList = array(DELIV_URLPATH, MYPAGE_DELIVADDR_URLPATH, MULTIPLE_URLPATH); 
     86        if(!SC_Utils_Ex::isBlank($ParentPage) && !in_array($ParentPage, $arrParentPageList)) { 
     87            // 遷移が正しくない場合、デフォルトであるマイページの配送先追加の画面を設定する 
     88            $ParentPage  = MYPAGE_DELIVADDR_URLPATH; 
     89        } 
     90 
    8391        $this->ParentPage = $ParentPage; 
    8492 
    … …  
    9098         */ 
    9199        if (!$objCustomer->isLoginSuccess(true) && $ParentPage != MULTIPLE_URLPATH) { 
    92             $this->tpl_onload = "eccube.changeParentUrl('". $this->getLocation($_POST['ParentPage']) ."'); window.close();"; 
     100            $this->tpl_onload = "eccube.changeParentUrl('". $ParentPage ."'); window.close();"; 
    93101        } 
    94102 
  • branches/version-2_13-dev/data/class/pages/mypage/LC_Page_Mypage_Refusal.php

    r23124 r23279  
    6464        switch ($this->getMode()) { 
    6565            case 'confirm': 
     66                // トークンを設定 
     67                $this->refusal_transactionid = $this->getRefusalToken(); 
     68 
    6669                $this->tpl_mainpage     = 'mypage/refusal_confirm.tpl'; 
    6770                $this->tpl_subtitle     = '退会手続き(確認ページ)'; 
    … …  
    6972 
    7073            case 'complete': 
     74                // トークン入力チェック 
     75                if(!$this->isValidRefusalToken()) { 
     76                    // エラー画面へ遷移する 
     77                    SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true); 
     78                    SC_Response_Ex::actionExit(); 
     79                } 
     80 
    7181                $objCustomer = new SC_Customer_Ex(); 
    7282                $this->lfDeleteCustomer($objCustomer->getValue('customer_id')); 
    … …  
    7686 
    7787            default: 
     88                if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) { 
     89                    $this->refusal_transactionid = $this->getRefusalToken(); 
     90                } 
    7891                break; 
    7992        } 
    8093 
     94    } 
     95 
     96    /** 
     97     * トランザクショントークンを取得する 
     98     * 
     99     * @return string 
     100     */ 
     101    function getRefusalToken() { 
     102        if (empty($_SESSION['refusal_transactionid'])) { 
     103            $_SESSION['refusal_transactionid'] = SC_Helper_Session_Ex::createToken(); 
     104        } 
     105        return $_SESSION['refusal_transactionid']; 
     106    } 
     107 
     108    /** 
     109     * トランザクショントークンのチェックを行う 
     110     */ 
     111    function isValidRefusalToken() { 
     112        if(empty($_POST['refusal_transactionid'])) { 
     113            $ret = false; 
     114        } else { 
     115            $ret = $_POST['refusal_transactionid'] === $_SESSION['refusal_transactionid']; 
     116        } 
     117 
     118        return $ret; 
     119    } 
     120 
     121    /** 
     122     * トランザクショントークを破棄する 
     123     */ 
     124    function destroyRefusalToken() { 
     125        unset($_SESSION['refusal_transactionid']); 
    81126    } 
    82127 
Note: See TracChangeset for help on using the changeset viewer.