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

fix: use canoncial for staging and content #86

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

philcali
Copy link
Contributor

Issue #, if available:

Fortify caught this code path again.

Description of changes:

Why is this change necessary:

How was this change tested:

  • StreamManager test locally

Any additional information or context required to review the change:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

if (!contentPath.toFile().getAbsolutePath().startsWith(stagingPath.toAbsolutePath().toString())) {
final String contentCanonical = contentPath.toFile().getCanonicalPath();
final String stagingCanonical = stagingPath.toFile().getCanonicalPath();
if (!contentCanonical.startsWith(stagingCanonical)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I remember Urvashi facing an issue in windows tests , so we switched to absolute path. We should verify this works on windows before merging this in

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@urvashijain18 has confirmed that this works for both Mac (host) and Windows (DUT), so I think we're good here.

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.

3 participants