Browse Source

!1 完善防护机制,修复了代码中存在的安全漏洞

Merge pull request !1 from 再遇雌鹿/master
tags/6.2.5
DedeBIZ Gitee 1 year ago
parent
commit
0141bd7645
No known key found for this signature in database GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      src/admin/sys_data_done.php
  2. +1
    -0
      src/apps/mytag_js.php

+ 1
- 0
src/admin/sys_data_done.php View File

@@ -100,6 +100,7 @@ if ($dopost == 'bak') {
$fs = array();
$bakStr = '';
//分析表里的字段信息
$nowtable = str_replace("`", "", $nowtable);
$dsql->GetTableFields($nowtable);
$intable = "INSERT INTO `$nowtable` VALUES(";
while ($r = $dsql->GetFieldObject()) {


+ 1
- 0
src/apps/mytag_js.php View File

@@ -36,6 +36,7 @@ if (isset($nocache) || !file_exists($cacheFile) || time() - filemtime($cacheFile
$myvalues = str_replace('"', '\"', $myvalues);
$myvalues = str_replace("\r", "\\r", $myvalues);
$myvalues = str_replace("\n", "\\n", $myvalues);
$myvalues = str_replace("<?", "", $myvalues);
$myvalues = "<!--\r\ndocument.write(\"{$myvalues}\");\r\n-->\r\n";
file_put_contents($cacheFile, $myvalues);
}


Loading…
Cancel
Save