脆弱性

お届け先入力ページでのSQLインジェクション

  • 情報公開日:2008年 11月 04日
  • 危険度:中
  • 対象:Ver 2.1.2未満
------------------------------------------
脆弱性の種類
------------------------------------------
SQLインジェクション
-----------------------------------------
脆弱性のあるファイル
-----------------------------------------
data/class/pages/shopping/LC_Page_Shopping_Deliv.php
-----------------------------------------
対策
-----------------------------------------
=========================================
変更前 2系
=========================================
155行目付近

2系 変更前
if (SC_Utils_Ex::sfIsInt($_POST['deliv_check'])) {
    // 登録済みの別のお届け先を受注一時テーブルに書き込む
    $this->lfRegistOtherDelivData($uniqid, $objCustomer, $_POST['deliv_check']);
    // 正常に登録されたことを記録しておく
    $objSiteSess->setRegistFlag();
    // お支払い方法選択ページへ移動
    $this->sendRedirect($this->getLocation(URL_SHOP_PAYMENT, array(), true));
    exit;
}


=========================================
変更後 2系
=========================================
$objQuery = new SC_Query();
if (SC_Utils_Ex::sfIsInt($_POST['deliv_check'])) {
    $deliv_count = $objQuery->count("dtb_other_deliv","customer_id=? and other_deliv_id = ?" ,array($objCustomer->getValue('customer_id'), $_POST['deliv_check']));
    if ($deliv_count != 1) {
        SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
    }
    // 登録済みの別のお届け先を受注一時テーブルに書き込む
    $this->lfRegistOtherDelivData($uniqid, $objCustomer, $_POST['deliv_check']);
    // 正常に登録されたことを記録しておく
    $objSiteSess->setRegistFlag();
    // お支払い方法選択ページへ移動
    $this->sendRedirect($this->getLocation(URL_SHOP_PAYMENT, array(), true));
    exit;
}


=========================================
変更前 2系モバイル
=========================================
343行目付近

if (SC_Utils_Ex::sfIsInt($_POST['other_deliv_id'])) {
                    // 登録済みの別のお届け先を受注一時テーブルに書き込む
                    $this->lfRegistOtherDelivData($uniqid, $objCustomer, $_POST['other_deliv_id']);
                    // 正常に登録されたことを記録しておく
                    $objSiteSess->setRegistFlag();
                    // お支払い方法選択ページへ移動
                    $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_PAYMENT), true);
                    exit;
                }

=========================================
変更後 2系モバイル
=========================================
$objQuery = new SC_Query();
if (SC_Utils_Ex::sfIsInt($_POST['other_deliv_id'])) {
    $deliv_count = $objQuery->count("dtb_other_deliv","customer_id=? and other_deliv_id = ?" ,array($objCustomer->getValue('customer_id'),$_POST['other_deliv_id']));
    if ($deliv_count != 1) {
        SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
    }
    // 登録済みの別のお届け先を受注一時テーブルに書き込む
    $this->lfRegistOtherDelivData($uniqid, $objCustomer, $_POST['other_deliv_id']);
    // 正常に登録されたことを記録しておく
    $objSiteSess->setRegistFlag();
    // お支払い方法選択ページへ移動
    $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_PAYMENT), true);
    exit;
}
close icon
EC-CUBEペイメントプラス

決済導入なら、EC-CUBE公式決済

公式決済について詳しく知る

EC-CUBE公式 Amazon Pay

CVRアップの事例多数

Amazon Payについて詳しく知る

無料相談受付中!

アドバイザーに相談する