mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-24 02:13:59 +08:00
modified 修复安全性漏洞
This commit is contained in:
parent
26bdb0f350
commit
0b7a6e889c
@ -184,7 +184,7 @@ class InterfaceList extends Base {
|
|||||||
$tplStr = file_get_contents($tplPath);
|
$tplStr = file_get_contents($tplPath);
|
||||||
$listInfo = AdminList::all(['status' => 1]);
|
$listInfo = AdminList::all(['status' => 1]);
|
||||||
foreach ($listInfo as $value) {
|
foreach ($listInfo as $value) {
|
||||||
$tplStr .= 'Route::rule(\'api/' . $value->hash . '\',\'api/' . $value->apiClass . '\', \'' . $methodArr[$value->method] . '\', [\'after_behavior\' => $afterBehavior]);';
|
$tplStr .= 'Route::rule(\'api/' . addslashes($value->hash) . '\',\'api/' . addslashes($value->apiClass) . '\', \'' . $methodArr[$value->method] . '\', [\'after_behavior\' => $afterBehavior]);';
|
||||||
}
|
}
|
||||||
|
|
||||||
file_put_contents($apiRoutePath, $tplStr);
|
file_put_contents($apiRoutePath, $tplStr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user