-
Notifications
You must be signed in to change notification settings - Fork 87
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
lib389 should use filter for tarfile as recommended by PEP 706 - #5867
Comments
I checked git log and found that these functions were used to speed up testing: These days we use pytest fixtures and recreate instances for each test. So this is indeed a dead code. Maybe we should delete it? |
I wondered the same before creating the PR but I always hesitate to remove functions outside of a major version change. ( we know that some other projects (like freeipa) use directly lib389 and (as far as I know) there is no clear documentation of the public API so we may break something. |
…EP 706 (#5868) Problem: tarfile interface evolved after CVE-2007-4559 and using object generated by tarfile.open without setting explicitly a filter has been obsoleted. Solution: Add an extraction_filter after every tarfile.open call **Issue:** [5867](#5867) **Reviewed by:** @droideck Thanks !
…EP 706 (#5868) Problem: tarfile interface evolved after CVE-2007-4559 and using object generated by tarfile.open without setting explicitly a filter has been obsoleted. Solution: Add an extraction_filter after every tarfile.open call **Issue:** [5867](#5867) **Reviewed by:** @droideck Thanks ! (cherry picked from commit 92cc2b1)
…EP 706 (#5868) Problem: tarfile interface evolved after CVE-2007-4559 and using object generated by tarfile.open without setting explicitly a filter has been obsoleted. Solution: Add an extraction_filter after every tarfile.open call **Issue:** [5867](#5867) **Reviewed by:** @droideck Thanks ! (cherry picked from commit 92cc2b1)
…EP 706 (#5868) Problem: tarfile interface evolved after CVE-2007-4559 and using object generated by tarfile.open without setting explicitly a filter has been obsoleted. Solution: Add an extraction_filter after every tarfile.open call **Issue:** [5867](#5867) **Reviewed by:** @droideck Thanks ! (cherry picked from commit 92cc2b1)
…EP 706 (#5868) Problem: tarfile interface evolved after CVE-2007-4559 and using object generated by tarfile.open without setting explicitly a filter has been obsoleted. Solution: Add an extraction_filter after every tarfile.open call **Issue:** [5867](#5867) **Reviewed by:** @droideck Thanks ! (cherry picked from commit 92cc2b1)
…EP 706 (#5868) Problem: tarfile interface evolved after CVE-2007-4559 and using object generated by tarfile.open without setting explicitly a filter has been obsoleted. Solution: Add an extraction_filter after every tarfile.open call **Issue:** [5867](#5867) **Reviewed by:** @droideck Thanks ! (cherry picked from commit 92cc2b1)
…EP 706 (#5868) Problem: tarfile interface evolved after CVE-2007-4559 and using object generated by tarfile.open without setting explicitly a filter has been obsoleted. Solution: Add an extraction_filter after every tarfile.open call **Issue:** [5867](#5867) **Reviewed by:** @droideck Thanks ! (cherry picked from commit 92cc2b1)
96959cf..92cc2b1 main -> main |
Issue Description
Should add tarfile filter every time tarfile.open is called. (To avoid a deprecation warning.)
The impacted locations are:
In practice it is more about filling a checkbox than a real issue as the impacted lib389 functions
are not used within 389ds nor within freeipa
(IMHO that is plain dead code, BTW this sound logical because backup/restore is directly handled by the ns-slapd binary
and lib389 should only act as a wrapper to the online and offline backup/restore tasks )
So I will add:
tar.extraction_filter = (lambda member, path: member)
after each call to tarfile.open
See: BZ 2207691
Package Version and Platform:
Steps to Reproduce
No reproducer:
seen by code review whether tar.extraction_filter is set after tar = tarfile.open(...)
Result when issue is not fixed:
Expected result:
The text was updated successfully, but these errors were encountered: