mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix(server): normalize external path (#4239)
* fix: use normalized external path * fix: move normalization to user core
This commit is contained in:
parent
35fa6397ea
commit
4dffae3f39
2 changed files with 4 additions and 1 deletions
|
|
@ -155,7 +155,7 @@ export class LibraryService {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!path.normalize(assetPath).match(new RegExp(`^${user.externalPath}`))) {
|
||||
if (!path.normalize(assetPath).match(new RegExp(`^${path.normalize(user.externalPath)}`))) {
|
||||
this.logger.error("Asset must be within the user's external path");
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue