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
|
// check if thumbnail already exist
|
||||||
if (fs.existsSync(fullMediaPath) === false) {
|
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()) {
|
if (fs.statSync(fullMediaPath).isDirectory()) {
|
||||||
return next();
|
return next();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user