Skip to content

Commit

Permalink
Merge pull request #1588 from contentstack/fix/DX-1498
Browse files Browse the repository at this point in the history
fix: Path Traversal via Path Join/Resolve
  • Loading branch information
aman19K authored Sep 25, 2024
2 parents 28af8cd + ad3f969 commit bfbc0aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/contentstack-variants/src/import/experiences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export default class Experiences extends PersonalizationAdapter<ImportConfig> {
* function import experience versions from a JSON file and creates them in the project.
*/
async importExperienceVersions(experience: ExperienceStruct, oldExperienceUid: string) {
const versionsPath = resolve(sanitizePath(this.experiencesDirPath), 'versions', `${oldExperienceUid}.json`);
const versionsPath = resolve(sanitizePath(this.experiencesDirPath), 'versions', `${sanitizePath(oldExperienceUid)}.json`);

if (!existsSync(versionsPath)) {
return;
Expand Down

0 comments on commit bfbc0aa

Please sign in to comment.