Skip to content

Commit 6ec804f

Browse files
authored
Merge pull request #1588 from contentstack/fix/DX-1498
fix: Path Traversal via Path Join/Resolve
2 parents a155ae7 + 00ced19 commit 6ec804f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/contentstack-variants/src/import/experiences.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export default class Experiences extends PersonalizationAdapter<ImportConfig> {
162162
* function import experience versions from a JSON file and creates them in the project.
163163
*/
164164
async importExperienceVersions(experience: ExperienceStruct, oldExperienceUid: string) {
165-
const versionsPath = resolve(sanitizePath(this.experiencesDirPath), 'versions', `${oldExperienceUid}.json`);
165+
const versionsPath = resolve(sanitizePath(this.experiencesDirPath), 'versions', `${sanitizePath(oldExperienceUid)}.json`);
166166

167167
if (!existsSync(versionsPath)) {
168168
return;

0 commit comments

Comments
 (0)