This commit is contained in:
iVampireSP.com 2023-01-21 18:29:40 +08:00
parent 0509a1a124
commit d82f8049fe
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"));
// 只允许最基本的字符
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