mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 09:17:38 +00:00
refactor(security): unify path alias guard policies
This commit is contained in:
@@ -6,9 +6,9 @@ export async function assertNoHardlinkedFinalPath(params: {
|
||||
filePath: string;
|
||||
root: string;
|
||||
boundaryLabel: string;
|
||||
allowFinalHardlink?: boolean;
|
||||
allowFinalHardlinkForUnlink?: boolean;
|
||||
}): Promise<void> {
|
||||
if (params.allowFinalHardlink) {
|
||||
if (params.allowFinalHardlinkForUnlink) {
|
||||
return;
|
||||
}
|
||||
let stat: Awaited<ReturnType<typeof fs.stat>>;
|
||||
|
||||
Reference in New Issue
Block a user