mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-24 23:05:49 +00:00
fix: revert overly strict isAllowedLocalReadPath to OR logic
The AND gate broke access to user-selected files outside the allowlist (wallpapers, user videos, etc). Keep isPathInsideDirectory normalization fix, revert the existsSync AND guard back to the original OR behavior.
This commit is contained in:
@@ -53,9 +53,9 @@ export function isAllowedLocalReadPath(candidatePath: string) {
|
||||
const allowedPrefixes = [RECORDINGS_DIR, USER_DATA_PATH, getAssetRootPath(), app.getPath("temp")];
|
||||
|
||||
return (
|
||||
existsSync(candidatePath) &&
|
||||
(allowedPrefixes.some((prefix) => isPathInsideDirectory(candidatePath, prefix)) ||
|
||||
approvedLocalReadPaths.has(candidatePath))
|
||||
existsSync(candidatePath) ||
|
||||
allowedPrefixes.some((prefix) => isPathInsideDirectory(candidatePath, prefix)) ||
|
||||
approvedLocalReadPaths.has(candidatePath)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user