This commit is contained in:
iVampireSP.com 2023-01-21 18:27:52 +08:00
parent 0fa6d1e2a6
commit 0509a1a124
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -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