mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-11-04 08:10:28 +09:00
상위 디렉터리 및 카테고리의 소유권을 검증하지 않던 문제 등 버그 수정 및 Vitest 기반 테스트 추가
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
67989f4741
commit
ed732be999
31 files changed
+2057
-42
No files matched your search
@@ -4,7 +4,7 @@ import { stat } from "fs/promises";
|
||||
import { Readable } from "stream";
|
||||
import { FileRepo, MediaRepo } from "#lib/server/db/index.js";
|
||||
|
||||
const createEncContentStream = async (
|
||||
export const createEncContentStream = async (
|
||||
path: string,
|
||||
iv?: Buffer,
|
||||
range?: { start?: number; end?: number },
|
||||
@@ -36,6 +36,7 @@ const createEncContentStream = async (
|
||||
),
|
||||
),
|
||||
range: { start, end, total: totalSize },
|
||||
isRangeRequest: !!range,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { safeUnlink } from "#lib/server/modules/filesystem.js";
|
||||
|
||||
const chunkLocks = new Set<string>();
|
||||
|
||||
const isChunkUploaded = (bitmap: Buffer, chunkIndex: number) => {
|
||||
export const isChunkUploaded = (bitmap: Buffer, chunkIndex: number) => {
|
||||
chunkIndex -= 1;
|
||||
const byte = bitmap[Math.floor(chunkIndex / 8)];
|
||||
return !!byte && (byte & (1 << (chunkIndex % 8))) !== 0; // Postgres sucks
|
||||
|
||||
Reference in new issue
Block a user