改进
This commit is contained in:
parent
0fa6d1e2a6
commit
0509a1a124
@ -37,8 +37,8 @@ private function fixPath(Request $request, Module $module, $prefix): string
|
|||||||
{
|
{
|
||||||
$path = substr($request->path(), strlen("/$prefix/modules/$module->id"));
|
$path = substr($request->path(), strlen("/$prefix/modules/$module->id"));
|
||||||
|
|
||||||
// 去除 非法字符
|
// 只允许最基本的字符
|
||||||
return preg_replace('/[^a-zA-Z0-9\/\-]/', '', $path);
|
return preg_replace('/[^a-zA-Z0-9\/]/', '', $path);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function exportCall(Request $request, Module $module): Response|JsonResponse
|
public function exportCall(Request $request, Module $module): Response|JsonResponse
|
||||||
|
Loading…
Reference in New Issue
Block a user