mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Allow path segments to start with 2 or more dots
This commit is contained in:
@@ -205,9 +205,9 @@ export class BaseFileIdentifierMapper implements FileIdentifierMapper {
|
||||
throw new BadRequestHttpError('URL needs a / after the base');
|
||||
}
|
||||
|
||||
if (path.includes('/..')) {
|
||||
this.logger.warn(`Disallowed /.. segment in URL ${identifier.path}.`);
|
||||
throw new BadRequestHttpError('Disallowed /.. segment in URL');
|
||||
if (path.includes('/../') || path.endsWith('/..')) {
|
||||
this.logger.warn(`Disallowed /../ segment in URL ${identifier.path}.`);
|
||||
throw new BadRequestHttpError('Disallowed /../ segment in URL');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user