mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
solving absolute server path exposing issue
This commit is contained in:
parent
a42674376a
commit
2cad2241e1
@ -167,7 +167,7 @@ export class GalleryMWs {
|
||||
|
||||
// check if thumbnail already exist
|
||||
if (fs.existsSync(fullMediaPath) === false) {
|
||||
return next(new ErrorDTO(ErrorCodes.GENERAL_ERROR, 'no such file:' + fullMediaPath));
|
||||
return next(new ErrorDTO(ErrorCodes.GENERAL_ERROR, 'no such file:' + req.params.mediaPath, 'can\'t find file: ' + fullMediaPath));
|
||||
}
|
||||
if (fs.statSync(fullMediaPath).isDirectory()) {
|
||||
return next();
|
||||
|
Loading…
x
Reference in New Issue
Block a user