Skip to content
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

fixed path traversal issue #152

Draft
wants to merge 1 commit into
base: staging
Choose a base branch
from
Draft

fixed path traversal issue #152

wants to merge 1 commit into from

Conversation

cs-raj
Copy link
Contributor

@cs-raj cs-raj commented Jan 17, 2025

No description provided.

@cs-raj cs-raj requested a review from a team as a code owner January 17, 2025 04:57
@cs-raj cs-raj marked this pull request as draft January 17, 2025 05:04
Comment on lines +1 to +5
str
?.replace(/^([\/\\])+/, "./") // Normalize leading slashes/backslashes to './'
.replace(/[\/\\]+/g, "/") // Replace multiple slashes/backslashes with a single '/'
.replace(/(\.\.(\/|\\|$))+/g, ""); // Remove directory traversal (../ or ..\)
Copy link
Contributor

Choose a reason for hiding this comment

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

@cs-raj , Since it will disrupt the current flow, we must manage the relative appropriately and it requires proper QA. Therefore, this kind of fix should be avoided. Kindly create a ticket regarding this issue.

CC: @netrajpatel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants