日韩亚洲AV无码一区二区三区|av在线国产哟哟|国产精品人人爽人人爽AV|免费一区二区精品无码视频

<th id="kwciy"><video id="kwciy"></video></th>
<code id="kwciy"><em id="kwciy"><optgroup id="kwciy"></optgroup></em></code>
    1. <center id="kwciy"></center>

      <code id="kwciy"></code>

      0712-2888027 189-8648-0214
      微信公眾號

      孝感風(fēng)信網(wǎng)絡(luò)科技有限公司微信公眾號

      當(dāng)前位置:主頁 > 技術(shù)支持 > PHPCMS > PHPCMS V9 /phpcms/modules/member/index.php phpcms注入漏洞修復(fù)補(bǔ)丁

      PHPCMS V9 /phpcms/modules/member/index.php phpcms注入漏洞修復(fù)補(bǔ)丁

      時間:2016-05-10來源:風(fēng)信官網(wǎng) 點(diǎn)擊: 1190次
      漏洞名稱:phpcms注入漏洞

      文件路徑:/phpcms/modules/member/index.php

      修復(fù)方法來源于網(wǎng)絡(luò),由風(fēng)信網(wǎng)整理提供。

      源代碼大概615行:

      if(empty($_SESSION['connectid'])) {
      //判斷驗(yàn)證碼
      $code = isset($_POST['code']) && trim($_POST['code']) ? trim($_POST['code']) : showmessage(L('input_code'), HTTP_REFERER);
      if ($_SESSION['code'] != strtolower($code)) {
          $_SESSION['code'] = '';
          showmessage(L('code_error'), HTTP_REFERER);
      }
      $_SESSION['code'] = '';
      }

      $username = isset($_POST['username']) && is_username($_POST['username']) ? trim($_POST['username']) : showmessage(L('username_empty'), HTTP_REFERER);
      $password = isset($_POST['password']) && trim($_POST['password']) ? trim($_POST['password']) : showmessage(L('password_empty'), HTTP_REFERER);

      針對phpsso模塊添加過濾代碼,最好的方式應(yīng)該是將轉(zhuǎn)義和過濾放在數(shù)據(jù)庫操作的前一步,這樣可以極有效緩解SQL注入帶來的問題

      修改代碼:

      $password = isset($_POST['password']) && trim($_POST['password']) ? trim($_POST['password']) : showmessage(L('password_empty'), HTTP_REFERER);

      改為:

      $password = isset($_POST[‘password‘]) && trim($_POST[‘password‘]) ? addslashes(urldecode(trim($_POST[‘password‘]))) : showmessage(L(‘password_empty‘), HTTP_REFERER);
      熱門關(guān)鍵詞: PHPCMS modules member index.ph
      欄目列表
      推薦內(nèi)容
      熱點(diǎn)內(nèi)容
      展開