1
0
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:
Patrik J. Braun 2019-07-18 23:06:54 +02:00
parent a42674376a
commit 2cad2241e1

View File

@ -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();