Skip to content

fix: normalize certificate paths in collection export and import #4964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AdeboyeDN
Copy link

Description

Fixes: #4869 (Path is not OS safe)
Added a normalizePath utility to ensure all certificate file paths in collections use forward slashes (/), making them OS-safe and cross-platform.
Applied normalizePath during collection export to prevent new exports from containing OS-specific paths (e.g., Windows backslashes).

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

Comment on lines 14 to 16
export function normalizePath(p) {
return p ? p.replace(/\\\\|\\/g, '/') : p;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Watch out for regressions around absolute WSL paths #2564 #2269. Switching \\wsl\localhost to /wsl/localhost is a bug. Care to include some unit tests for various situations?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will check and work on it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I just pushed an update. Kindly review.

@pull-request-size pull-request-size bot added size/L and removed size/M labels Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Path to client certificate is not OS safe
2 participants