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

Make iexplore.downloads plugin more fail-safe #450

Merged
merged 6 commits into from
Nov 21, 2023

Conversation

Poeloe
Copy link
Contributor

@Poeloe Poeloe commented Nov 17, 2023

No description provided.

Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (9162507) 73.90% compared to head (55399d1) 73.89%.

Files Patch % Lines
dissect/target/plugins/apps/browser/iexplore.py 70.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #450      +/-   ##
==========================================
- Coverage   73.90%   73.89%   -0.01%     
==========================================
  Files         259      259              
  Lines       20838    20846       +8     
==========================================
+ Hits        15400    15405       +5     
- Misses       5438     5441       +3     
Flag Coverage Δ
unittests 73.89% <70.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Co-authored-by: Erik Schamper <[email protected]>
@Poeloe Poeloe requested a review from Schamper November 20, 2023 12:26

try:
response_headers = container_record.ResponseHeaders.decode("utf-16-le", errors="ignore")
ref_url, mime_type, temp_download_path, down_url, down_path = response_headers.split("\x00")[-6:-1]
Copy link
Member

Choose a reason for hiding this comment

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

To prevent future bugs, could you either initialize ref_url, mime_type and temp_download_path to None? Or replace those with _ and leave a comment explaining what those fields would be.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good one, changed it! Complemented the existing test as well, to prevent regression with the path/url value

@Poeloe Poeloe requested a review from Schamper November 20, 2023 14:18
@Poeloe Poeloe merged commit c272037 into main Nov 21, 2023
@Poeloe Poeloe deleted the fix/make-iexplore-downloads-plugin-more-fail-safe branch November 21, 2023 08:17
JSCU-CNI pushed a commit to JSCU-CNI/dissect.target that referenced this pull request Jan 2, 2024
Zawadidone pushed a commit to Zawadidone/dissect.target that referenced this pull request Apr 5, 2024
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