fix(server): read file permission checks (#3046)

This commit is contained in:
Jason Rasmussen 2023-06-30 12:25:08 -04:00 committed by GitHub
parent ad343b7b32
commit 455a36b0fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 12 deletions

View file

@ -23,7 +23,7 @@ export class FilesystemProvider implements IStorageRepository {
async createReadStream(filepath: string, mimeType?: string | null): Promise<ImmichReadStream> {
const { size } = await fs.stat(filepath);
await fs.access(filepath, constants.R_OK | constants.W_OK);
await fs.access(filepath, constants.R_OK);
return {
stream: createReadStream(filepath),
length: size,