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: do not create read stream for zip entries that are not being extracted #13792

Merged
merged 1 commit into from
May 23, 2024

Conversation

Amplifiyer
Copy link
Contributor

Description of changes

Currently we are abandoning a zip entry after creating a red stream for it which doesn't get closed as nobody read from it.
This PR avoids creating read stream for zip entries that we won't be extracting.
Also adds a log message when we detect symlink

Issue #, if available

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Amplifiyer Amplifiyer requested a review from a team as a code owner May 23, 2024 08:09
@Amplifiyer Amplifiyer merged commit bf639d0 into dev May 23, 2024
5 checks passed
@Amplifiyer Amplifiyer deleted the extractZipFix3 branch May 23, 2024 08:28
Comment on lines +117 to +119
if (symlink) {
getAmplifyLogger().logError({ message: 'Found symlinks in the zipped directory. These symlinks will not be extracted' });
return;
Copy link
Member

Choose a reason for hiding this comment

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

should we log what symlink is that?

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