Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/extension/networkInspector/certificateProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ export class CertificateProvider {
}

private validateDestinationPath(destination: string, os: ClientOS): void {
if (destination.split(/[\\/]+/).includes("..")) {
if (destination.split(path.sep).includes("..")) {
throw new Error(`Path traversal not allowed in destination: ${destination}`);
}

Expand Down
3 changes: 3 additions & 0 deletions test/extension/commands/installPods.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ suite("installPodsCommand", function () {

suite("Enhanced environment", function () {
test("should inject Ruby and CocoaPods paths and default shell and locale values", function () {
if (process.platform !== "darwin") {
this.skip();
}
const homeDir = "/Users/test-user";
const originalEnv = {
PATH: process.env.PATH,
Expand Down