Changeset 20933


Ignore:
Timestamp:
2011/05/18 06:01:16 (10 years ago)
Author:
Seasoft
Message:

#1310 (トランザクションID周りの冗長な処理を改善する)

Location:
branches/version-2_11-dev/data/class
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/data/class/helper/SC_Helper_Session.php

    r20764 r20933  
    187187     */ 
    188188    function isValidToken($is_unset = false) { 
    189  
    190         $checkToken = ""; 
    191  
    192         // $_POST の値を優先する 
    193         if (isset($_POST[TRANSACTION_ID_NAME])) { 
    194  
    195             $checkToken = $_POST[TRANSACTION_ID_NAME]; 
    196         } elseif (isset($_GET[TRANSACTION_ID_NAME])) { 
    197  
    198             $checkToken = $_GET[TRANSACTION_ID_NAME]; 
    199         } 
    200  
    201         $ret = false; 
    202189        // token の妥当性チェック 
    203         if ($checkToken === $_SESSION[TRANSACTION_ID_NAME]) { 
    204             $ret = true; 
    205         } 
     190        $ret = $_REQUEST[TRANSACTION_ID_NAME] === $_SESSION[TRANSACTION_ID_NAME]; 
     191 
    206192        if ($is_unset || $ret === false) { 
    207193            SC_Helper_Session_Ex::destroyToken(); 
  • branches/version-2_11-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Login.php

    r20810 r20933  
    8888 
    8989        $this->tpl_disable_logout = $this->lfCheckDisableLogout(); 
    90         $this->transactionid = SC_Helper_Session_Ex::getToken(); 
    9190    } 
    9291 
  • branches/version-2_11-dev/data/class/pages/mypage/LC_Page_AbstractMypage.php

    r20764 r20933  
    8282            $this->tpl_title        = 'MYページ(ログイン)'; 
    8383            $this->tpl_mainpage     = 'mypage/login.tpl'; 
    84             $this->transactionid    = SC_Helper_Session_Ex::getToken(); 
    8584 
    8685        } else { 
Note: See TracChangeset for help on using the changeset viewer.